Initial Infrastructure Setup Guide
Use the following steps to set up the initial infrastructure. The initial setup of CloudOps for Kubernetes results in an Amazon EKS Kubernetes cluster with several basic Kubernetes services deployed. After the initial setup is complete, you can review a high-level list of the deployment. For more information about what is deployed, see the CloudOps for Kubernetes Cluster Infrastructure section of the Architecture Overview document.
Before You Begin
Review the following before you begin.
CloudOps for Kubernetes is made available as an Infrastructure-as-Code asset to Self Managed Commerce customers with the following value:
- Allows customers to begin developing Self Managed Commerce quickly.
- Provides an option for customers to accelerate their Self Managed Commerce infrastructure development.
Most customers can use CloudOps for Kubernetes to quickly begin their Self Managed Commerce development project while their full infrastructure requirements are being evaluated.
Elastic Path does not intend or expect that CloudOps for Kubernetes or the infrastructure and services it provisions will meet the needs of all Self Managed Commerce customers. The technology choices may not align with all customer’s preferences or available skills. The infrastructure architecture that is provisioned may not align with all customer’s requirements. The included Jenkins continuous integration environment may not serve all use cases.
There are other options available for deploying Self Managed Commerce. CloudOps for Kubernetes is not the only option available for building and running Self Managed Commerce.
For more information see the Introduction to CloudOps for Kubernetes.
Quick Overview
At a very high level, the steps required to initialize a Self Managed Commerce environment with this Infrastructure-as-Code asset are:
Obtain an empty AWS account to use for the Elastic Path infrastructure.
Obtain access to the Elastic Path source code and credentials for the Elastic Path Nexus artifact repository.
Host your own copies of the
ep-commerce
,cloudops-for-kubernetes
anddocker
Git repositories on a Git hosting service of your choice. The hosted repositories must be accessible to the AWS account.Prepare an operations workstation with the required software tools.
Clone the
cloudops-for-kubernetes
Git repository on the operations workstation.Make a copy of the
docker-compose.yml
file nameddocker-compose.override.yml
.Edit the
docker-compose.override.yml
file, filling out at least the required basic parameters.Run
docker-compose up --build
on the operations workstation. The Amazon EKS Kubernetes cluster will be provisioned with basic services deployed.Make necessary DNS changes so you can resolve hostnames to acess deployed services.
Log in to the deployed Jenkins service to begin running build, CI and deploy jobs.
For detailed descriptions of these steps, see the following sections.
Configure An Operations Workstation
Initializing and operating CloudOps for Kubernetes requires a certain set of tools. The operations workstation is a workstation that will contain the tools required to initialize the infrastructure. For more details see Operations Workstation.
Preparing to Setup CloudOps for Kubernetes
Before initializing the infrastructure in your AWS account, you must complete some preparation. You will need to prepare some tools and artifacts, and you will need to gather some values that you will later enter into the docker-compose.override.yml
file.
To complete the required preparation, follow the Preparing to Setup CloudOps for Kubernetes documentation.
note
We recommend that you take notes of the required values as you go along in the process.
Complete the docker-compose.override.yml File
The base infrastructure and cluster configuration is managed by the docker-compose tooling provided by CloudOps for Kubernetes. That tooling relies on a file named docker-commpose.override.yml
. Follow the steps below to create the docker-commpose.override.yml
file and update it with the configuration values for your cluster.
note
You must have completed the preceding sections Configure An Operations Workstation and Preparing to Setup CloudOps for Kubernetes before proceeding.
Perform the following steps on the operations workstation that you prepared in the preceding section Configure An Operations Workstation.
Go to the folder or directory where you locally cloned the CloudOps for Kubernetes code.
Copy the Docker Compose configuration file
docker-compose.yml
to a new file nameddocker-compose.override.yml
.Open the
docker-compose.override.yml
file in a text editor.Read through the
docker-compose.override.yml
file and fill out the rest of the configuration.tip
For more information about the parameters, see the comments inside the file.
Reduce the configuration to manage by deleting any parameters you do not modify from the default in the
docker-compose.override.yml
file. The default values in thedocker-compose.yml
file are used instead.Reduce the size of the override file by deleting the comments. You can always reference the original file.
Confirm that the parameter
TF_VAR_bootstrap_mode
is set tosetup
.Save the file.
warning
Do not check the docker-compose.override.yml
file into Git because it will contain sensitive information, such as keys.
After the parameters have been updated and in the docker-compose.override.yml
file you are ready to run setup.
Run Setup
note
Perform the following steps on the operations workstation.
Ensure that Docker is running on your operations workstation.
Open a shell prompt on the workstation.
Run the following command to build the Docker image and initialize the cluster and basic services:
docker-compose up --build
The setup process begins.
Save Important Files
Ensure that you save the docker-compose.override.yml
file and any dependencies, such as TLS keys, in a safe place.
important
You will need the docker-compose.override.yml
file and any dependencies again to perform the following:
- Update the cluster
- Show the current state of the cluster
- Create local Terraform configuration
- Clean up the cluster
warning
Do not commit these files into Git. The docker-compose.override.yml
file will contain secrets and should be stored somewhere securely.
Next Steps
Perform the post-bootstrap tasks listed in Post Bootstrap after the bootstrap process completes successfully.