Skip to content

Commit

Permalink
added images
Browse files Browse the repository at this point in the history
Signed-off-by: dishanktiwari2501 <[email protected]>
  • Loading branch information
dishanktiwari2501 committed Mar 24, 2024
1 parent fe83845 commit ad1616e
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 106 deletions.
53 changes: 23 additions & 30 deletions content/saas/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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**.
Expand All @@ -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:
Expand All @@ -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:

Expand All @@ -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))
Expand All @@ -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)
23 changes: 11 additions & 12 deletions content/saas/opsworks_migration.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
+++
title = "Migrate from AWS OpsWorks to Chef SaaS"
draft = false

[menu]
[menu.saas]
title = "OpsWorks Migration"
Expand All @@ -14,21 +13,21 @@ This guide will walk you through the migration scenarios from AWS OPSWorks to Ch

{{< note >}} Assuming that you have upgraded to Automate 2.0 {{< /note >}}

If you have already upgraded to Chef Automate 2.0, no further installation, upgrade or maintenance is required.
If you have already upgraded to Chef Automate 2.0, no further installation, upgrade, or maintenance is required.

## Prerequisites

* Running Automate 2.0 in AWS OpsWorks.

* A Chef SaaS Environment. Refer to the [Getting Started](/get_started/) with Chef SaaS page.
* A Chef SaaS Environment. Refer to the [Getting Started](/get_started/) with the Chef SaaS page.

* An S3 bucket provided by Progress Chef.

## High level steps to migrate from AWS OpsWorks to Chef SaaS (REPHRASE)
## High-level steps to migrate from AWS OpsWorks to Chef SaaS (REPHRASE)

Advantages to migrate from AWS OpsWorks to Chef SaaS is given below:
The advantages of migrating from AWS OpsWorks to Chef SaaS are:

* Customer reviews ans reduced current data as needed.
* Customer reviews and reduced current data as needed.

* Creates Data Backup.

Expand All @@ -40,11 +39,11 @@ Advantages to migrate from AWS OpsWorks to Chef SaaS is given below:

## Prepare DNS for cutover

Check failure on line 40 in content/saas/opsworks_migration.md

View workflow job for this annotation

GitHub Actions / cspell-action

Unknown word (cutover)

As part of the migration process, we deploy with a Blue/Green method that links to your existing public DNS. Refer to an example shown in the code snippet below:
As part of the migration process, we deploy a Blue/Green method that links to your existing public DNS. Refer to an example shown in the code snippet below:

```ruby
# The external fully qualified domain name.
# When the application is deployed you should be able to access 'https://<fqdn>/' to login.
# When the application is deployed, you should be able to access 'https://<fqdn>/' to log in.
fqdn = "june15.opsworks.chef.co"
```

Expand All @@ -56,16 +55,16 @@ You can take the backup of your OpsWorks using the following steps:

1. Create a `.zip` file of the OpsWorks backup.

1. Copy the backup .zip file to provide the S3 Bucket. (This bucket will expire in 7 days after the environment is set up and will only allow one backup file. If you provide two or more .zip files, the last upload will remain in the bucket)
1. Copy the backup .zip file to provide the S3 Bucket. (This bucket will expire seven days after the environment is set up and will only allow one backup file. If you provide two or more .zip files, the last upload will remain in the bucket)

## Restore OpsWorks backup to Chef SaaS

The restore process is taken care by Progress Chef Engineers. You will be notified by your account manager once the restoration is complete.
Progress Chef Engineers handle the restoration process. Your account manager will notify you once the restoration is complete.

## Verify Restore

Once the restore is complete, you can log into the Chef SaaS using your OpsWorks credentials. Once logged in, you will see data in the environment upto day of the backup. This will include users, cookbooks, client runs, etc.
Once the restore is complete, you can log into the Chef SaaS using your OpsWorks credentials. Once logged in, you will see data in the environment up to the day of the backup. This will include users, cookbooks, client runs, etc.

## Update DNS

The final step in the migration process will point your OpsWorks Nodes to the new Chef SaaS DNS to have node data flow going forward.
The final step in the migration process will point your OpsWorks Nodes to the new Chef SaaS DNS so that node data flows forward.
16 changes: 7 additions & 9 deletions content/saas/register_nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ draft = false
weight = 50
+++

Once everything has been set up and restored to the new Chef environment, the nodes under management must be redirected from AWS OpsWorks to Chef SaaS. This guide will provide recommendations on how this can be accomplished.
Once everything has been set up and restored to the new Chef environment, the nodes under management must be redirected from AWS OpsWorks to Chef SaaS. This guide will provide recommendations on how to accomplish this.

## Prerequisites

* Running Automate 2.0 in AWS OpsWorks.

* A Chef SaaS Environment. Refer to the [Getting Started](/get_started/) with Chef SaaS page.
* A Chef SaaS Environment. For more information, refer to the [Getting Started](/get_started/) with the Chef SaaS page.

* Restoration performed of AWS OpsWorks to Chef SaaS.
* Restoration is performed on AWS OpsWorks for Chef SaaS.

* Splay mode and baseline are up to 2 client runs an hour. Refer to the [Chef Infra Client](https://docs.chef.io/ctl_chef_client/) page for more details on how to configure splay mode in the `client.rb` file.
* Splay mode and baseline are up to 2 client runs an hour. Refer to the [Chef Infra Client](https://docs.chef.io/ctl_chef_client/) page for more details on configuring splay mode in the `client.rb` file.

* One compliance scan an hour.

## Obtain an example Cookbook/Recipe to point nodes to the new Chef SaaS instance

Progress Chef has developed a Cookbook and Recipe that can run against all nodes under management in the AWS OpsWorks environment. This Cookbook will redirect all nodes to the new Chef SaaS instance. Some samples of the cookbooks, PolicyFile.rb, attribute file and recipe file are shown below:
Progress Chef has developed a Cookbook and Recipe that can run against all nodes under management in the AWS OpsWorks environment. This Cookbook will redirect all nodes to the new Chef SaaS instance. Some samples of the cookbooks, PolicyFile.rb, attribute file, and recipe file, are:

* Cookbook

Expand All @@ -38,14 +38,13 @@ Progress Chef has developed a Cookbook and Recipe that can run against all nodes
#
# For more information on the Policyfule feature, visit https://docs.chef.io/policyfile

# A name that describes what the system you're building with Chef docs.

# A name that describes the system you're building with Chef docs.
name 'your_client'

# Where to find external cookbooks:
default_source :supermarket

# run_list: chef_client will run there recipes in the order specified.
# run_list: chef_client will run their recipes in the order specified.
run_list 'your_client::default'

# Specify a custom source for a single cookbook:
Expand All @@ -57,7 +56,6 @@ cookbook 'your_client', path: '.'
{{< figure src="/images/saas-attributes-folder.png" alt="Attributes Folder">}}

`default[‘your_client']['chef_server_old'] = ‘<Old chef-server URL>’`

`default[‘your_client']['chef_server_new'] = ‘<New chef-server URL>'`

* Recipe
Expand Down
Loading

0 comments on commit ad1616e

Please sign in to comment.