EKS reference architecture
The Octopus - EKS Reference Architecture step populates an existing Octopus space with deployment projects demonstrating how DevOps teams can deploy applications to the AWS EKS platform.
Configuring the step
Hosted Octopus users should use the
Hosted Ubuntu worker pool and run the step with the
octopuslabs/terraform-workertools container image accessed via the
Container Images feed. On-premises Octopus users need to ensure the step is run on a worker with a recent version of Terraform installed, or can use the
octopuslabs/terraform-workertools container image on a worker with Docker installed.
The step exposes a number of options, typically requesting credentials to the various platforms that are configured to support EKS deployments:
AWS Access Keyand
AWS Secret Keyrequire the access keys of the user that will create the EKS cluster.
Docker Hub Usernameand
Docker Hub Passwordrequire the credentials of a Docker Hub user that is used to access sample Docker images from public DockerHub repositories. These credentials are also used by a sample GitHub Actions workflow that publishes Docker images.
GitHub Access Tokenrequires the GitHub access token of a user that is used to create a new GitHub repository holding a sample application.
Octopus API Keyrequires an API key to the Octopus instance where the reference architecture projects and supporting resources are created.
Octopus Space IDrequires the space ID where the reference architecture projects and supporting resources are created. Leave the default value to populate the same space as the runbook.
Octopus Server URLrequires the URL of the Octopus instance where the reference architecture projects and supporting resources are created. Leave the default value to populate the same instance as the runbook.
Optional Terraform Apply Argsallows custom arguments to be passed to the
terraform applycommand. The Terraform module applied by this step exposes a number of optional variables that can be defined as apply arguments. These arguments can be defined by setting this field to a value like
-var=project_template_project_name=renamed -var=infrastructure_project_name=renamed2 -var=frontend_project_name=renamed3 -var=products_project_name=renamed4 -var=audits_project_name=renamed5:
infrastructure_project_namedefines the name of the
_ AWS EKS Infrastructureproject
project_template_project_namedefines the name of the
Docker Project Templatesproject
frontend_project_namedefines the name of the
EKS Octopub Frontendproject
products_project_namedefines the name of the
EKS Octopub Productsproject
audits_project_namedefines the name of the
EKS Octopub Auditsproject
Optional Terraform Init Argsallows custom argument to be passed to the
terraform initcommand. Leave this field blank unless you have a specific use case.
The step creates a number of reference projects demonstrating how to deploy applications to an EKS cluster.
_ AWS EKS Infrastructure project contains a runbook called
Create EKS Cluster. This runbook creates a Fargate EKS cluster with the supplied name in the supplied region and then installs the NGINX ingress controller on it. The script then creates a new Kubernetes target using dynamic infrastructure. This cluster can be destroyed with the
Delete EKS Cluster runbook.
EKS Octopub Audits,
EKS Octopub Frontend,
EKS Octopub Products projects deploy the Octopub sample application to the EKS cluster, performs a smoke test, and scans the SBOM associated with each image using Trivy. Each of these projects have a number of supporting runbooks to inspect Kubernetes resources.
In addition, there are two runbooks called
Scale Pods to One and
Scale Pods to Zero that scale the number of pods associated with the deployment. These runbooks are expected to be triggered in the morning and afternoon to scale non-production environments up and down. Because the pods are run on Fargate nodes, scaling a deployment to zero removes the compute costs associated with them.
_ Deploy EKS Octopub Stack project uses the Deploy a release step to orchestrate the deployment of the individual microservices that make up the Octopub sample application. Orchestration projects provide a convenient way of promoting multiple related releases between environments in a predefined order, which may be required when applications are tightly bound or a well-defined set of release versions must be installed as a group.
Docker Project Templates project contains a runbook called
Create Template Github Node.js Project that:
- Creates a new GitHub repository
- Adds Github Actions secrets to allow workflows to interact with the Octopus server and the DockerHub repository
- Populates the repo with a sample Node.js web application and GitHub Actions workflow to build the application, push it to DockerHub, and create a release in Octopus
This runbook is an example of platform engineering where DevOps teams can bootstrap sample applications with best practices such as versioning, security scanning, and CI/CD pipelines provided as part of a common base template.
Help us continuously improve
Please let us know if you have any feedback about this page.
Page updated on Monday, November 13, 2023