-
Notifications
You must be signed in to change notification settings - Fork 2
Destroy Base ArcGIS Enterprise on Windows in AWS
This walkthrough will guide you through the process of destroying deployments of standalone highly available base ArcGIS Enterprise in Amazon Web Services (AWS) that were deployed with Deploy Base ArcGIS Enterprise on Windows in AWS walkthrough.
The walkthrough uses aws/arcgis-enterprise-base-windows template.
Duration: about 15 minutes
Before you begin this walkthrough:
- A private GitHub repository "gitops-demo" for the site must be created and properly configured.
- A highly available base ArcGIS Enterprise on Windows operating system must be deployed in the site using Deploy Base ArcGIS Enterprise on Windows in AWS walkthrough.
You will need the following resources and accounts:
- GitHub.com user account
- Access keys of an AWS user with permissions to update IAM users (IAMFullAccess AWS managed IAM policy)
This step creates a codespace workspace in the "gitops-demo" repository, installs AWS CLI v2, and configures it with the AWS account access keys.
Open the GitHub.com URL in a web browser, log in to your GitHub.com account, and select "gitops-demo" private repository form the "Your repositories" list.
In the "gitops-demo" repository, click the green "Code" button, switch to the "Codespaces" tab, and click the "Create codespace on main" button. The codespace will be created and opened in a new browser tab.
Note that instead of creating a codespace, you can also reuse the codespace created in Getting Started in AWS walkthrough if it is still available. In this case, you can skip this step and go to Step 1.5.
In the codespace, click on the "Terminal" tab in the bottom panel, and run the following commands:
cd /tmp
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Output:
You can now run: /usr/local/bin/aws --version
Run the following commands and enter the AWS account user's access keys and the default AWS region ID when prompted:
aws configure
Attach the policies required for running the workflows to gitops-demo IAM user.
export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
aws iam attach-user-policy --policy-arn arn:aws:iam::$AWS_ACCOUNT_ID:policy/ArcGISEnterpriseDestroy --user-name gitops-demo
This step cleans up the AWS resources used by the base ArcGIS Enterprise deployment.
Before destroying the deployment, it is recommended to create a backup of the deployment. The backup will be stored in the site's backups S3 bucket.
Run "enterprise-base-windows-aws-backup" workflow in the GitHub Actions tab of the repository with the main branch to backup the deployment.
Run "enterprise-base-windows-aws-destroy" workflow with the main branch to destroy the base ArcGIS Enterprise deployment.
Note that the workflow does not destroy the deployment's backups.
This step updates the configuration files in the "gitops-demo" repository to remove the base ArcGIS Enterprise deployment from the site.
In the EXPLORER sidebar of the codespace window, click on "config" folder and then on "aws" subfolder. Double-click on "site-index.json" file to open it in the editor.
Remove "arcgis-enterprise-base-windows" entry from the "deployments" property array in config/aws/site-index.json
file.
git add --all
git commit -m "Removed arcgis-enterprise-base-windows from site-index.json"
git push origin main
This walkthrough demonstrated how to destroy a deployment of highly available base ArcGIS Enterprise in AWS that was deployed with Deploy Base ArcGIS Enterprise on Windows in AWS walkthrough.