-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: dishanktiwari2501 <[email protected]>
- Loading branch information
1 parent
fe83845
commit ad1616e
Showing
8 changed files
with
89 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ draft = false | |
weight = 20 | ||
+++ | ||
|
||
This getting started guide will walk through the necessary setup and configuration for Chef SaaS to connect and begin to utilize the solution. | ||
This getting started guide will walk through the necessary setup and configuration for Chef SaaS to connect and utilize the solution. | ||
|
||
## Prerequisites | ||
|
||
|
@@ -18,12 +18,9 @@ This getting started guide will walk through the necessary setup and configurati | |
* Supported [Platforms and System Requirements](https://docs.chef.io/workstation/install_workstation/) | ||
|
||
1. Chef SaaS Starter Kit (Provided by Progress Chef) | ||
|
||
* SaaS Environment URL | ||
|
||
* SaaS Credentials | ||
|
||
* Pivotal PEM file for the initial setup of the environment (this PEM is only temporary and will be replaced in a later step) | ||
* Pivotal PEM file for the initial setup of the environment (the PEM is temporary, so replace it in a later step) | ||
|
||
## Connect to Chef SaaS | ||
|
||
|
@@ -42,11 +39,8 @@ Connected to the Chef SaaS Automate Web User Interface, following these steps to | |
1. Enter the following fields: | ||
|
||
* Provide a unique Name for the Chef Infra Server. | ||
|
||
* Ensure that the Type selected is FQDN. | ||
|
||
* Enter the FQDN by copying the same URL used to connect to the Automate Web User Interface. (Example: mycompany-demo.saas.chef.io) | ||
|
||
{{< figure src="/images/automate/add-chef-server-popup-menu-with-error.png" width="500" alt="Add Chef Server Form">}} | ||
|
||
1. Select **Add Chef Infra Server**. | ||
|
@@ -63,10 +57,12 @@ To install the Chef Workstation, go through our extended [Instal Chef Workstatio | |
|
||
### Setup Chef Repo | ||
|
||
If you’re setting up Chef for the very first time in your organization, then you will need a Chef Infra repository for saving your cookbooks and other work. The chef-repo is a directory on your workstation that stores everything you need to define your infrastructure with Chef Infra: | ||
If you’re setting up Chef for the first time in your organization, you will need a Chef Infra repository to save your cookbooks and other work. The chef-repo is a directory on your workstation that stores everything you need to define your infrastructure with Chef Infra: | ||
|
||
* Cookbooks (including recipes, attributes, custom resources, libraries, and templates) | ||
|
||
* Data bags | ||
|
||
* Policyfiles | ||
|
||
Use the [chef generate repo](https://docs.chef.io/workstation/ctl_chef/#chef-generate-repo) command to create your Chef Infra repository. For example, to create a repository called chef-repo: | ||
|
@@ -77,17 +73,16 @@ chef generate repo chef-repo | |
|
||
### Setup Chef Credentials file | ||
|
||
To continue configuring Workstation with Chef SaaS, a credentials file must be created. This file will be updated with new credentials that are created later in the setup. | ||
To continue configuring Workstation with Chef SaaS, a credentials file must be created. This file will be updated with new credentials created later in the setup. | ||
|
||
1. On the workstation run: knife configure init | ||
1. On the workstation, run: `knife configure init` | ||
|
||
1. This will prompt you with several questions: | ||
|
||
* Enter the Chef Server URL provided in the Starter Kit (Example: mycompany-demo.saas.chef.io) | ||
* For the existing API username or clientname, enter pivotal, which is the Super User account provided in the Starter Kit. | ||
|
||
* For the existing username or clientname for the API, enter pivotal which is the Super User account provided in the Starter Kit. | ||
|
||
1. Ensure that the pivotal.pem file provided in the Starter Kit is copied to the ~/.chef directory before running any additional commands with Knife. | ||
1. Copy the pivotal.pem file provided in the Starter Kit to the ~/.chef directory before running any additional commands with Knife. | ||
|
||
The credentials file that gets created in the ~/.chef directory looks like as shown below: | ||
|
||
|
@@ -100,39 +95,40 @@ chef_server_url - 'https://mycompany-demo.saas.chef.io' | |
|
||
### Create Organization in CLI | ||
|
||
A Chef Organization must be added to the Infra Server and act as a top-level entity for role-based access control. Use the [knife org create](https://docs.chef.io/workstation/knife_org/) command to create your Chef Organization. For example, to create an Organization called myorg: | ||
Add the Chef Organization to the Infra Server and act as a top-level entity for role-based access control. Use the [knife org create](https://docs.chef.io/workstation/knife_org/) command to create your Chef Organization. For example, to create an Organization called myorg: | ||
|
||
```sh | ||
Knife org create myorg “My New Organization” | ||
``` | ||
|
||
The private key for the organization’s validator client is returned. | ||
The above code returns the private key for the organization’s validator client. | ||
|
||
### Create a User in CLI | ||
|
||
A new user must be created which will be associated with the new Chef Organization and will be leveraged in the credentials file. Use the [knife user create](https://docs.chef.io/workstation/knife_user/) command to create your new user account. For example, to create a User named chefadmin: | ||
Create a new user associated with the new Chef Organization and leverage in the credentials file. Create your new user account using the [knife user create](https://docs.chef.io/workstation/knife_user/) command. For example, to create a User named chefadmin: | ||
|
||
```sh | ||
knife user create chefadmin --first-name Chef --last-name Admin --email [email protected] –password securepassword -f chefadmin.pem | ||
``` | ||
|
||
Ensure the new chefadmin.pem file that is created with this command is copied to the ~/.chef directory before updating the credentials file later in this document. | ||
Copy the new chefadmin.pem file created with this command to the ~/.chef directory before updating the credentials file later in this document. | ||
|
||
### Add New User to Organization in CLI | ||
|
||
Now that the Organization and User are created, the two must be associated together. Use the [knife org user](https://docs.chef.io/workstation/knife_org/) command to add the user to an organization. For example, to add the User named chefadmin to the Organization called myorg: | ||
Associate the created Organization and User to each other. Use the [knife org user](https://docs.chef.io/workstation/knife_org/) command to add the user to an organization. For example, to add the User named chefadmin to the Organization called myorg: | ||
|
||
```sh | ||
knife org user add myorg chefadmin | ||
``` | ||
|
||
### Update the Credentials file to use a new account | ||
|
||
The credentials file under the ~/.chef directory on the Chef Workstation must be updated to reflect the new Organization, User, and PEM file. | ||
Update the credentials file under the ~/.chef directory on the Chef Workstation to reflect the new Organization, User, and PEM file. | ||
|
||
1. Navigate to ~/.chef | ||
|
||
1. Modify the credentials file | ||
|
||
* Change the client_name to the new account that was created (Example: chefadmin) | ||
|
||
* Change the client_key to the new PEM file that was created (Example: [home/admin/.chef/chefadmin.pem](https://mycompany-demo.saas.chef.io/organizations/myorg)) | ||
|
@@ -150,34 +146,31 @@ The credentials file under the ~/.chef directory on the Chef Workstation must be | |
|
||
### Create Organization in Web User Interface | ||
|
||
The following steps will add the Organization in the Chef SaaS Web User Interface to allow for visualization of Cookbooks, Data Bags, Nodes, Policyfiles, etc. Connect to the URL provided by Progress Chef and log in with the admin account credentials. | ||
The following steps will add the Organization to the Chef SaaS Web User Interface, allowing visualization of Cookbooks, Data Bags, Nodes, Policyfiles, etc. Connect to the URL provided by Progress Chef and log in with the admin account credentials. | ||
|
||
1. Select Infrastructure in the top navigation. | ||
|
||
1. Select Chef Infra Servers in the left-hand navigation. | ||
|
||
1. Select the Infra Server that was created earlier. | ||
1. Select the Infra Server created previously. | ||
|
||
1. Select **Add Chef Organization**. | ||
|
||
* Provide the Name of the Organization that was created earlier in the CLI. (Example: myorg) | ||
|
||
* For Admin User, enter the new account that was created earlier (Example: chefadmin) | ||
|
||
* For Admin Key, paste the contents of the new PEM file that was created along with the account (Example: chefadmin.pem) | ||
|
||
* Provide the Name of the Organization created earlier in the CLI (Example: myorg). | ||
* For Admin User, enter the new account created previously (Example: chefadmin). | ||
* For Admin Key, paste the contents of the new PEM file created previously along with the account (Example: chefadmin.pem) | ||
* Select **Add Chef Organization** | ||
|
||
{{< figure src="/images/automate/add-chef-organization-popup-menu.png" width="500" alt="Add Chef Organization Form">}} | ||
|
||
### Run Knife SSL Check | ||
|
||
Chef SaaS leverages public certificates to ensure a secure connection to the service. It is always best to run an SSL check on the Workstation to verify that the certificate is trusted to eliminate any connection issues. | ||
Chef SaaS leverages public certificates to ensure a secure connection to the service. To eliminate connection issues, it is always best to run an SSL check on the Workstation to verify that the certificate is trusted. | ||
|
||
1. Run the following command: knife SSL checks and ensure a successful message is displayed. | ||
|
||
### Run Knife client list | ||
|
||
Lastly, run a client list command to verify that a successful connection can be made to the new organization. | ||
Lastly, run a client list command to verify a successful connection to the new organization. | ||
|
||
1. Run the following command: knife client list and ensure a validator entry is returned (Example: myorg-validator) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.