Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This cookbook provides a custom resource that is designed to streamline the process of enrolling nodes into a Chef-360 platform

License

NotificationsYou must be signed in to change notification settings

chef-cookbooks/chef360-node-enroll

Repository files navigation

Thenode_management_enroll custom resource is designed to streamline the process of enrolling nodes into a Chef-360 platform. This resource automates the configuration and setup required to ensure nodes are properly registered and managed by the Chef platform's node management service.

Enrollment and Enrollment Levels

Enrollment is the process that enables Chef 360 to interact with and potentially manage your node. The enrollment status level determines the extent of management and control Chef 360 has over the node. This level indicates the type and degree of management capabilities available.

Thenode_management_enroll resource supports two levels of enrollment:

  1. Full Enrollment: Chef 360 has both Node Management and Habitat installed on the node, running as a Habitat supervised service. This level allows Chef 360 to manage skill credentials, settings, installation, upgrades, and removal.

  2. Partial Enrollment: Chef 360 has Node Management running on the node, but as a native service (not under the Habitat supervisor or package manager). This level allows for the detection of native skills and skill credential management but does not support skill installation, upgrades, or configuration. This is suitable for nodes that do not support Habitat but require a specific skill like Courier Runner.

Resource Parameters

ParameterDescriptionValid ValueDefault Value
chef_platform_urlThe fully qualified domain name (FQDN) URL for the Chef 360 platform.A FQDN which must be accessible from the client node.None
api_portThe API port configured in the Chef 360 platform.A valid port number.31000
access_keyAccess key for secure communication with Chef 360. Store securely (e.g., Encrypted Chef data bags, Vault).Valid tokenNone
secret_keySecret key for secure communication with Chef 360. Store securely (e.g., Encrypted Chef data bags, Vault).Valid tokenNone
cohort_idA UUID representing a cohort. It provides all required skills and settings to the assigned node.UUIDNone
hab_builder_urlURL for the Chef Habitat builder in your organization.Valid URLhttps://bldr.habitat.sh
working_dir_pathTemporary working directory path where all required builds are downloaded. Specify a valid path based on the OS.A valid directory with read and write permission./tmp
root_caRoot certificate used for SSL/TLS communication. Only required for secure envA valid root certificateNone
ssl_verify_modeDefines the SSL verification mode. Useverify_none for self-signed certificates andverify_peer for legitimate certificates requiring verification.:verify_none,:verify_peer:verify_none
upgrade_skillsFor partial enrollment. If true, checks for the latest skill version and installs it if found.'true' or'false'false

Obtainingroot_ca

  1. Self-Signed Environment: Run the below command on the host where Chef 360 server is installed:
kubectl get secret --namespace<<namespace>> common-generated-certs -o jsonpath="{.data['ca\.crt']}" | base64 -d
  1. Custom Certificate: Use the sameroot_ca that was used while configuring the Chef 360 API/UI section.
  2. Chef 360 SaaS: Copy of the Chef 360 SaaS public key and add it to your wrapper cookbook:
-----BEGIN CERTIFICATE-----MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpHWD9f-----END CERTIFICATE-----

Example Usage

node_management_enroll'Enroll Node'dochef_platform_url'<CHEF-360-FQDN>'enroll_type'full/partial'api_port'<API_PORT>'access_key'<ACCESS_KEY>'secret_key'<SECRET_KEY>'cohort_id'<COHORT_ID>'hab_builder_url'<HABITAT_BUILDER_URL>'working_dir_path'<VALID_DIR_PATH>'root_canode['enroll']['root_ca']ssl_verify_mode <:verify_none/:verify_peer>upgrade_skills <false/true>end

Generating Access Key and Secret Key

To generate an access key and secret key, follow the steps below.

Note:
Ensure you run this command on a Chef Workstation that is registered with the Chef 360 server.

Command

Use the following CLI command to generate an access key and secret key:

chef-platform-auth-cli user-account self create-token --body'{"expiration": "EXPIRATION_DATE", "name": "ANY_TOKEN_NAME"}' --profile VALID_PROFILE_NAME

Example Response

{"item": {"accessKey":"6QIUKP4WIXD4RVAF0BQ3","expiration":"2027-12-31T11:42:23-05:00","id":"bcba5b7a-fb0b-4a62-b442-7ba7bda5e05a","name":"CI-CD Token","role": {"id":"5fcb0235-1e56-4ece-8857-404a5d39a290","name":"tenant-admin"    },"secretKey":"x6aCg1NckQoLsQnere26fmGgD0RiWOrf4RNXBhlg"  }}

Important Notes

  • The--profile you use in the command must have thenode-manager role assigned to it.
  • ReplaceEXPIRATION_DATE with the desired expiration timestamp (e.g.,2027-12-31T11:42:23-05:00).
  • ReplaceANY_TOKEN_NAME with a meaningful token name for easy identification.
  • ReplaceVALID_PROFILE_NAME with the name of a valid profile configured on your workstation.

About

This cookbook provides a custom resource that is designed to streamline the process of enrolling nodes into a Chef-360 platform

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp