Apps#
Prerequisites#
Inputs#
export GIT_PATH="$HOME/git/"
export ZONE_NAME="ocb-..."
export DOMAIN_NAME="caascad.com" # ou cloudservicesfactory.com
export INFRA_ZONE_NAME="infra-..."
export BRANCH_NAME="pf-..."
Warning
During this procedure, several steps require restarts of different components in cloud zones. Before each restart:
- check there is no CAASCHR that is planned on the same component at the same time
- warn supervsion team on #supervision about the component/zone that is going to be restarted
envs-ng#
Tip
Many steps will consist of running trackbone apply -z "$ZONE_NAME" -c ...
Reusing the shell setup here is a good idea!
Repository: caascad/terraform/envs-ng
# git clone git@git.corp.caascad.com:caascad/terraform/envs-ng.git "$GIT_PATH/caascad/terraform/envs-ng"
cd "$GIT_PATH/caascad/terraform/envs-ng"
git pull
git switch -c "$BRANCH_NAME"
nix-shell
Checks#
- The new zone should be created on a branch which will be merged at the end.
- postgres-operator should be deployed
nix-shellmust be activated- Login to vault
export VAULT_ADDR=https://vault.[infra-stg, infra-prd].caascad.com
vault login -method oidc
Deploy Gitea#
Application
trackbone apply -z $ZONE_NAME -c gitea
Provisioning
trackbone apply -z $ZONE_NAME -c gitea_provision
Deploy Concourse#
Concourse Web#
Deploy Concourse Web component:
trackbone apply -z $ZONE_NAME -c concourse_web_infra -t bootstrap=true
trackbone apply -z $ZONE_NAME -c concourse_web_client -t bootstrap=true
Create teams and pipelines#
trackbone apply -z $ZONE_NAME -c concourse_provisioning_infra
trackbone apply -z $ZONE_NAME -c concourse_provisioning_client
Concourse Workers#
Deploy Concourse Workers (terraform deployment):
trackbone apply -z $ZONE_NAME -c fe_concourse_workers_infra
trackbone apply -z $ZONE_NAME -c fe_concourse_workers_client
trackbone apply -z $ZONE_NAME -c aws_concourse_workers_infra
trackbone apply -z $ZONE_NAME -c aws_concourse_workers_client
trackbone apply -z $ZONE_NAME -c azure_concourse_workers_infra
trackbone apply -z $ZONE_NAME -c azure_concourse_workers_client
Workers will boot and be configured with cloud-init and then reboot. This process take some time, please wait until the end.
Check if all the desired workers are available:
fly switch -z $ZONE_NAME -n main
fly workers
Tip
You need to be admin on Concourse in order to list the workers. If you have a blank page or a 401 error, please follow the Troobleshooting documentation.
Optional components#
Tip
You may retrieve optional components list for your zone:
curl -Ls https://git.corp.caascad.com/caascad/caascad-zones/-/raw/master/zones.json \
| jq --arg zone "${ZONE_NAME}" '.[$zone].parameters.apps'
For eg:
{
"quay": false,
"harbor": true
}
true, you must deploy harbor component.
Quay & Clair#
Deploy Quay on Kubernetes:
trackbone apply -z $ZONE_NAME -c quay
Deploy Clair on Kubernetes:
trackbone apply -z $ZONE_NAME -c clair
Harbor#
Prerequisites:
- A S3 bucket to store images registry
- A RDS PostgreSQL backend (FE only)
Deploy Harbor on Kubernetes:
trackbone apply -z $ZONE_NAME -c harbor -t bootstrap=true
Configure Harbor (OIDC authentication, etc.):
trackbone apply -z $ZONE_NAME -c harbor_provisioning