Skip to main content

Deployment process

Argo CD monitors the following git repositories for changes:

The deployment consists of several parts:

Configuration in Git

  • The app definition. This is defined in the Argo CD Repo and contains information about the other parts.
  • Base Kubernetes configuration. This is defined in a set of files in the /manifests/base folder in the Deployment Repo. It contains templates for the shared infrastructure for all deployments of the app.
  • Region and environment specific Kubernetes overlay. This is defined in a files in a region & environment specific subfolder of /manifests/overlays in the Deployment Repo. It contains the specific infrastructure configuration for each region and environment combination, and the specific versions of the DCS docker images to deploy.

Configuration in Docker

  • The Helm charts. The source code for the helm charts are in the /charts folder of the DCS Repo. When a change is pushed to main, an updated Helm chart image will be built and stored in the container registry.

Argo CD monitors Git, and any update to Argo CD Repo or Deployment Repo will trigger an update deployment. Argo CD will then determine if anything has changed and potentially initiate an update of the changed components.

*An update to the charts in the main repo, will not trigger anything. To update the charts the image version must be updated in the application definition in the Argo CD Repo*.

Application Definition

Usually you will not need to change the application definition. :::

The application definitions for each environment and region are defined in the Transport-ArgoCD repo:

The version of the chart image is in the value: spec.sources.chart.repoUrl.

The branch for the region specific variables is given in: spec.sources.repoUrl.targetRevision.

The path to the kustomization overlays and the files containing the region specific variables are also in this file. In general they should not be changed.

Customization Overlays

The region specific configurations are stored in the Deployment Repo in the manifests/overlays folder. The overlays are named after the region and environment:

The overlay folder contains 3 files:

  • kustomization.yaml - kustomize configuration with paths to customize infrastructure names like Azure Resource Groups, DNS etc.
  • globaldcc-values.yaml - Helm values file with most app configuration including image versions of each service.
  • roadnets.yaml - Helm values file for roadnets. We store it in a separate file for UX purposes so that PS and other stakeholders can easily update roadnets without getting lost in all other app settings.

To deploy a new version of one of the DCS components update the tag of the docker image in the globaldcc-values.yaml file in the corresponding overlay directory.

This could look like this:

backend:
image:
registry: amcsmainprdcr.azurecr.io
repository: globaldcc
tag: backend-2.0.0

Deployment

Once Argo CD has the charts and path to the region specific configuration it will build and deploy the DCS:

  • Pull the configured chart docker image.
  • Apply the base configuration in the /manifests/base folder.
  • Apply the region specific configuration from kustomization.yaml in the overlay folder.
  • Build the configuration yml and json files using the values in globaldcc-values.yaml and roadnets.yaml.

Argo CD will configure storage, queues/pub-sub, databases and kubernetes pods from the generated yml and json files.

We use Crossplane to configure the DCS resources. Partial documentation for our implementation of Crossplane can be found here: https://docs.amcsgroup.io/dev-platform/docs/products/crossplane/introduction/

We're using deprecated options from an older version of the implementation, and these are sadly not documented.

The tags are pretty self-explanatory, so minor changes aren't difficult. Should we need to change something major, we will need to switch to the new implementations.