Release steps
- Merge feature branches to
develop. - Release
adbif needed and update dependent services with a new release version. - Run corresponding
releasepipeline in bitbucket for the service which has to be released:integration: pipeline -custom:release, branch -developproduction: pipeline -custom:release, branch -integration
- Depending on changes made to services while developing a feature, there might be a need to upgrade
messagingand/orservicesmodules usingterraform. To do so, please, refer to the corresponding section of remove environment setup documentation. - Run database scripts from
releases/R0/adb-reports/metadatafolder ofadb-chartsproject. - Upload templates from
releases/templatesfolder to the target environment templates bucket. - Run feature-related database scripts if needed.
- Run
custom:catalog-[branch]pipeline inadb-utilitiesbitbucket repository. - Log in and deploy released images on a target cluster. Currently,
intandprodare on Azure, so steps are following:
Export variables:
export AZ_PASSWORD=[PASSWORD]
export AZ_CLIENT_ID=[CLIENT_ID]
export AZ_TENANT_ID=[TENANT_ID]
export ENV=[ENV]
export AKS_CLUSTER_NAME="adb-$ENV-aks"
export RESOURCE_GROUP="adb-$ENV"
export NAMESPACE=[NAMESPACE]
Log in to Azure and get credentials
az login --service-principal -u $AZ_CLIENT_ID -p $AZ_PASSWORD --tenant $AZ_TENANT_ID
az aks get-credentials --name $AKS_CLUSTER_NAME --resource-group $RESOURCE_GROUP
Get current cluster service tags
helm -n $NAMESPACE get values adb-services > ./envs/$ENV/services/values.yaml -o yaml
Update values.yml file with released services tags and deploy
For integration:
helm -n $NAMESPACE upgrade adb-services -f ./envs/$ENV/services/values.yaml ../charts/services
For production:
helm -n $NAMESPACE upgrade adb-services -f ./envs/$ENV/services/values.yaml ../charts/services_prod
Important notes for production release:
- In file
terraform -> clusters -> azure_prod -> providers.tfon line 6 add:subscription_id = [SUBSCRIPTION_ID] - After deploying released images:
Check versions of running pods using the following command:
kubectl --namespace $NAMESPACE describe pod [POD-1] [POD-2]...[POD-N] \
| grep "Image:" \
| sed -E 's/.*:([^:]+)$/\1/'
Determine pod which has old service tag, delete it and repeat until all running pods have required version.
- In case release pipeline failed in bitbucket:
- Open service project in IDE
- Run
git tagcommand and find the latest tag - If it is bigger than currently deployed, then merge it manually to the target branch and resolve merge conflicts:
git merge [TAG]