-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation of Process to Upgrade AMI for AWS Deployment #7680
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
17e78e1
Documentation for AMI upgrade
bvtejaswi ab7819f
Documentation for AMI upgrade
bvtejaswi d33173f
Documentation for AMI upgrade
bvtejaswi 21365f9
Documentation for AMI upgrade
bvtejaswi d30979f
Documentation for AMI upgrade
bvtejaswi 935a029
Documentation for AMI upgrade
bvtejaswi 644f814
Documentation for AMI upgrade
bvtejaswi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -79,4 +79,92 @@ We can also pass a flag in upgade command to avoid prompt for workspace upgrade. | |||||
chef-automate upgrade run --airgap-bundle latest.aib --auto-approve --workspace-upgrade no | ||||||
``` | ||||||
|
||||||
{{< note >}} | ||||||
|
||||||
AMI Upgrade is only for AWS deployment, as in On-Premise Deployment all the resources are managed by the customers themselves. | ||||||
|
||||||
{{< /note >}} | ||||||
|
||||||
## AMI Upgrade Setup For AWS Deployment | ||||||
|
||||||
{{< note >}} | ||||||
|
||||||
In this following section, the old cluster with older AMI Images is referred as the **Primary Cluster** and the cluster which has upgraded AMI is referred as the **New Cluster**. | ||||||
|
||||||
{{< /note >}} | ||||||
|
||||||
{{< note >}} | ||||||
|
||||||
The AWS deployment should be configured with S3, Both Primary and New cluster should be configured with same s3 bucket. | ||||||
|
||||||
{{< /note >}} | ||||||
|
||||||
### Steps to set up the AMI Upgraded Cluster | ||||||
|
||||||
1. Deploy the New cluster into a same/different region with S3 backup configuration.you can refer [AWS Deployment steps](/automate/ha_aws_deploy_steps/#deployment). | ||||||
|
||||||
2. Do the backup configuration only when you have not provided the (backup information) configuration at the time of deployment. Refer backup section for [s3 configuration](/automate/ha_backup_restore_aws_s3/#configuration-in-provision-host). | ||||||
|
||||||
3. On Primary Cluster | ||||||
|
||||||
- Take a backup of Primary cluster from bastion by running below command: | ||||||
|
||||||
```sh | ||||||
chef-automate backup create --no-progress > /var/log/automate-backups.log | ||||||
``` | ||||||
|
||||||
- Create a bootstrap bundle; this bundle captures any local credentials or secrets that aren't persisted to the database. To create the bootstrap bundle, run the following command in one of the Automate nodes: | ||||||
|
||||||
```sh | ||||||
chef-automate bootstrap bundle create bootstrap.abb | ||||||
``` | ||||||
|
||||||
- Copy `bootstrap.abb` to all Automate and Chef Infra frontend nodes in the New cluster. | ||||||
|
||||||
|
||||||
4. On New AMI upgraded Cluster | ||||||
|
||||||
- Install `bootstrap.abb` on all the Frontend nodes (Chef-server and Automate nodes) by running the following command: | ||||||
|
||||||
```cmd | ||||||
sudo chef-automate bootstrap bundle unpack bootstrap.abb | ||||||
``` | ||||||
|
||||||
- Run the following command in bastion to get the ID of the backups: | ||||||
|
||||||
```sh | ||||||
chef-automate backup list | ||||||
``` | ||||||
|
||||||
- Make sure all the services in New cluster are up and running by running the following command from bastion: | ||||||
|
||||||
```sh | ||||||
chef-automate status | ||||||
``` | ||||||
|
||||||
- On New Cluster Trigger restore command from bastion. | ||||||
|
||||||
- To run the restore command, you need to add the OpenSearch credentials to the applied config. If using Chef Managed OpenSearch,we need to have automate config.Run the below command in the Chef-Automate node to get the applied config into `current_config.toml`: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```bash | ||||||
sudo chef-automate config show > current_config.toml | ||||||
``` | ||||||
|
||||||
- Add the below config into `current_config.toml` (without any changes) and copy `current_config.toml` to bastion | ||||||
|
||||||
```bash | ||||||
[global.v1.external.opensearch.auth.basic_auth] | ||||||
username = "admin" | ||||||
password = "admin" | ||||||
``` | ||||||
|
||||||
- On New cluster, use the following restore command to restore the backup of Primary Cluster from bastion. | ||||||
|
||||||
```cmd | ||||||
sudo chef-automate backup restore s3://<s3-bucket-name>/<path-to-backup>/<backup-id>/ --patch-config /path/to/current_config.toml --airgap-bundle /path/to/airgap-bundle --skip-preflight --s3-access-key "Access_Key" --s3-secret-key "Secret_Key" | ||||||
|
||||||
``` | ||||||
|
||||||
- If you want to reuse the same custom domain used previously, then make sure to update the DNS entry to the Load-Balancer FQDN of the New cluster. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
- Once the restore is successful ,you can destroy the Primary Cluster. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.