Deploy ArcGIS Notebook Server on Linux in AWS - Esri/arcgis-gitops GitHub Wiki

This walkthrough will guide you through the process of initial deployment of a highly available ArcGIS Notebook Server 11.4 on Ubuntu 22.04 LTS operating system in Amazon Web Services (AWS) using GitHub Actions.

The ArcGIS Notebook Server is federated with Portal for ArcGIS of base ArcGIS Enterprise deployment and uses the base deployment's load balancer.

The walkthrough uses aws/arcgis-notebook-server-linux template.

Duration: about 1 hour

Prerequisites

Before you begin this walkthrough:

  • A private GitHub repository "gitops-demo" for the site must be created and properly configured.
  • A base ArcGIS Enterprise deployment must be created using arcgis-enterprise-base-linux template.

Refer to the Deploy Base ArcGIS Enterprise on Linux in AWS walkthrough for detailed instructions.

This walkthrough uses base ArcGIS Enterprise on Linux. However, ArcGIS Notebook Server on Linux can also be federated with Portal for ArcGIS on Windows.

You will need the following resources and accounts:

  • GitHub.com user account
  • Access keys of an AWS user with permissions to create and update IAM users and read SSM parameters (IAMFullAccess and AmazonSSMFullAccess AWS managed IAM policies)
  • Software authorization file for ArcGIS Notebook Server 11.4 Standard or Advanced license.

Step 1: Create and Configure a Codespace Workspace

This step creates a codespace workspace in the "gitops-demo" repository, installs AWS CLI v2, and configures it with the AWS account access keys.

1.1 Log in to GitHub.com account

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.

1.2 Create a codespace workspace in the new repository

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.

Create codespace

Note that instead of creating a codespace, you can also reuse the codespace created in Deploy Base ArcGIS Enterprise on Linux in AWS walkthrough if it is still available. In this case, you can skip this step and go to Step 2.

1.3 Install AWS CLI v2 in the codespace

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

1.4 Configure the AWS CLI

Run the following commands and enter the AWS account user's access keys and the default AWS region ID when prompted:

aws configure

Step 2: Enable the Required Workflows

This step enables all arcgis-notebook-server-linux template's workflows by copying them to .github/workflows directory.

All the required IAM policies should be already attached to the IAM user by Deploy Base ArcGIS Enterprise on Linux in AWS walkthrough.

2.1 Copy the required workflows to .github/workflows directory

Switch back to the codespace browser tab and run the following commands:

cd /workspaces/gitops-demo
cp -r aws/arcgis-notebook-server-linux/workflows/* .github/workflows/
git add --all
git commit -m "Enable arcgis-notebook-server-linux workflows"
git push origin main

Step 3: Update Config Files

This step updates the configuration files used by the workflows.

3.1 Update image.vars.json file

Update config/aws/arcgis-notebook-server-linux/image.vars.json config file to specify the ArcGIS Notebook Server version and patches to be installed.

In EXPLORER sidebar of the codespace window, click on "config" folder, then on "aws" subfolder, and then on "arcgis-notebook-server-linux" subfolder. Double-click on "image.vars.json" file to open it in the editor.

Set "arcgis_version" value to "11.4".

3.2 Update application.tfvars.json file

Upload the ArcGIS Notebook Server 11.4 authorization file to the "config/authorization/11.4/" directory in the codespace workspace.

In the EXPLORER sidebar of the codespace window, click on "config" folder, then right-click on "authorization" folder, select "New Folder..." from the context menu, and enter "11.4" as the folder name. Right-click on the new "11.4" folder, and select "Upload..." from the context menu. In the file selector dialog window navigate to the ArcGIS Notebook Server authorization file location, select the file and click "Open" button to upload the file to the workspace.

Open config/aws/arcgis-notebook-server-linux/application.tfvars.json file in the editor and update the following properties:

  • Set "arcgis_version" value to "11.4".
  • Replace "notebook_server_authorization_file_path" property value by the uploaded authorization file paths "~/config/authorization/11.4/<authorization file name>".

The workflows link '~/config/' paths to the repository's 'config/' directory.

3.3 Update site-index.json file

Add "arcgis-notebook-server-linux" to "deployments" property values in config/aws/site-index.json file.

3.4 Commit and push the changes to the repository

git add --all
git commit -m "Update config files"
git push origin main

3.5 Verify the configuration files

Run "verify-site-config-aws" workflow to verify the site configuration.

Click on "Actions" tab in the repository, select "verify-site-config-aws" workflow on the left sidebar, click "Run workflow" on the right, and click "Run workflow" button.

Step 4: Deploy ArcGIS Notebook Server

This step runs the workflows build ArcGIS Notebook Server AMI, provision AWS resources for the deployment, configure ArcGIS Notebook Server, test and backup the deployment.

4.1 Build AMI for the deployment

Run "notebook-server-linux-aws-image" workflow that creates EC2 AMI for the ArcGIS Notebook Server deployment.

Wait for the workflow to complete.

4.2 Provision AWS resources for the deployment

Run "notebook-server-linux-aws-infrastructure" workflow that creates AWS resources for ArcGIS Notebook Server deployment.

4.3 Configure the deployment's applications

Run "notebook-server-linux-aws-application" workflow to configure the ArcGIS Notebook Server deployment.

After the workflow run is complete, the ArcGIS Notebook Server deployment will be accessible at https://<deployment FQDN>/notebooks URL.

4.4 Test the deployment

Run "notebook-server-linux-aws-test" workflow.

4.5 Backup the deployment

Run "notebook-server-linux-aws-backup" workflow.

arcgis-notebook-server-linux template workflows

4.6 Open the deployment's CloudWatch dashboard

Sign in to the AWS Console and open the URL https://console.aws.amazon.com/cloudwatch/home?#dashboards:name=arcgis-notebook-server-linux in a web browser.

arcgis-notebook-server-linux CloudWatch dashboard

Conclusion

The walkthrough demonstrates only the basic capabilities of ArcGIS Automation using GitHub Actions. Check instructions of the templates and workflows for more advanced features and options.

Follow Destroy ArcGIS Notebook Server on Linux in AWS walkthrough to destroy the deployment and clean up the resources created during this walkthrough.