Skip to content

Latest commit

 

History

History
130 lines (81 loc) · 9.49 KB

README.md

File metadata and controls

130 lines (81 loc) · 9.49 KB

Templates for ArcGIS Enterprise on AWS

The templates provide GitHub Actions workflows for ArcGIS Enterprise operations on Amazon Web Services (AWS) for Windows, Linux, and Kubernetes platforms.

The workflows require:

  • GitHub.com user account or GitHub Enterprise Server with enabled GitHub Actions
  • Amazon Web Services (AWS) account
  • (For Windows and Linux platforms) ArcGIS Online user account to download ArcGIS Enterprise installation media from MyEsri
  • (For Kubernetes platform) Docker Hub account that has access to private repositories with ArcGIS Enterprise on Kubernetes container images
  • Authorization files for ArcGIS Enterprise software
  • SSL certificates for the ArcGIS Enterprise site domain names

On Windows and Linux platforms the workflows use:

On Kubernetes platform the workflows use:

Basic knowledge of Git and AWS is required to use the templates. Knowledge of the other technologies is recommended to modify or extend the templates.

Templates

An ArcGIS Enterprise site in this context is a group of deployments that typically include a base ArcGIS Enterprise deployment or ArcGIS Enterprise on Kubernetes deployment plus additional server deployments in different roles.

The following templates are available for AWS:

Triggering Workflows

By default, the workflows are configured with "workflow_dispatch" event that enables workflows to be triggered manually. To trigger a workflow manually, navigate to the repository on GitHub, click on the "Actions" tab, select the workflow to run, select the branch, and click the "Run workflow" button.

Note that the deployments may belong to different environments such as "production" and "staging". Each environment may have its own branch in the repository. The list of workflows in GitHub Actions page shows only the workflows present in /.github/workflows directory of the "main" branch, but the workflow runs use the workflow files from the selected branch. To enable workflows, copy the workflows' .yaml files from the template's workflows directory to /.github/workflows directory in both the main branch and the environment branch, commit the changes, and push the branches to GitHub.

The workflows can be modified to use other triggering events such as push, pull_request, or schedule. Consider using "schedule" event to schedule backups and "pull_request" event to check the infrastructure changes by "terraform plan" command.

Configuration Files

The workflows use configuration files to define the parameters of the deployments. The configuration files are in JSON format and are stored in the /config/aws directory of the repository. The configuration files must be in the same branch as the workflows that use them.

The configuration files may reference other files such as software authorization files and SSL certificates. The workflows symlink ~/config/ paths to the config directory path in the GitHub Actions runner workspace. Keep the referenced files in subdirectories of the /config directory and reference them as ~/config/<dir>/<file>.

IAM Policies

AWS permissions required by the workflows are defined in IAM policies JSON files. Modify the JSON files if needed and use them to create IAM policies.

Terraform Child Modules

A Terraform module can call other modules to include their resources into the configuration. A module that has been called by another module is often referred to as a child module. The templates use a collection of child modules that can be called multiple times within the same configuration, and multiple configurations can use the same child module.

Instructions

The specific guidance for using the templates depends on the use case and may involve various customizations. The following steps just demonstrate the typical use case.

1. Create GitHub Repository

Create a new private GitHub repository from https://github.com/esri/arcgis-gitops template repository.

Use separate GitHub repositories for each ArcGIS Enterprise site and separate Git branches for different environments.

When operating multiple similar ArcGIS Enterprise sites, consider first forking and modifying https://github.com/esri/arcgis-gitops template repository and then creating repositories for the sites from the modified template.

2. Create Required AWS Resources

Create IAM user that will be used by the workflows and add the required policies to the user.

The templates use the same AWS credentials for all the workflows. To implement the principle of least privilege and enforce separation of duties with appropriate authorization for each interaction with AWS resources, consider modifying the workflows to use different AWS credentials for different workflows. Consider using separate IAM users for core infrastructure, deployments infrastructure, and application workflows.

Create a private S3 bucket for the Terraform backend. Make sure that the IAM user has the S3 bucket permissions required by Terraform.

It is recommended that to enable bucket versioning on the S3 bucket to allow for state recovery in the case of accidental deletions and human error.

3. GitHub Repository Settings

Configure secrets and variables for GitHub Actions in the repository settings.

Secrets

Name Description
AWS_ACCESS_KEY_ID AWS access key Id
AWS_SECRET_ACCESS_KEY AWS secret access key

For ArcGIS Enterprise on Windows and Linux:

Name Description
ARCGIS_ONLINE_USERNAME ArcGIS Online user name
ARCGIS_ONLINE_PASSWORD ArcGIS Online user password

For ArcGIS Enterprise on Kubernetes:

Name Description
CONTAINER_REGISTRY_USER Docker Hub user name
CONTAINER_REGISTRY_PASSWORD Docker Hub user password

Variables

Name Description
AWS_DEFAULT_REGION Default AWS region Id
TERRAFORM_BACKEND_S3_BUCKET Terraform backend S3 bucket

Run validate-settings-aws GitHub Actions workflow to validate the settings.

If the GitHub subscription plan supports GitHub Actions Environments, consider environment secrets to use secrets specific to each environment.

4. Use the Templates

Follow the arcgis-site-core template instructions to provision core AWS resources for the ArcGIS Enterprise site.

Consult the README files of the other templates to create and operate the required ArcGIS Enterprise deployments.