Code Deployment
SmartWeb
Repository:
- https://gitlab.group.team.blue/hostedshop/proj/smartweb
The deployment is made with GitLab pipelines and the deployment flow is as follows:
- MR is merged into master.
- GitLab triggers a pipeline and is run on the specified runner (see
tagsin the job definition in.gitlab-ci.yml). - The job is going to execute on
codedeploy1.shopfactory.ioand runs the defined job to sync the code out.
Template
Repositories:
- https://gitlab.group.team.blue/hostedshop/templates
The deployment is made with GitLab pipelines and the deployment flow is as follows:
- MR is merged into master.
- The template is built, packaged and uploaded to: https://verdaccio-registry.hostedshop.dk/. We upload the package by constantly un-publishing and publishing the version:
1.0.0. - After the upload has finished the upload job it will trigger a deployment job that is run on the specified runner (see
tagsin the job definition in.gitlab-ci.yml). - The package is downloaded on
codedeploy1.shopfactory.ioand is synced out to the production servers.
Widgets
Repositories:
- https://gitlab.group.team.blue/hostedshop/des
The deployment is made with GitLab pipelines and the deployment flow is as follows:
- MR is merged into master.
- The repo is built in the GitLab pipeline and uploaded to our S3 object storage in a restricted bucket.
- After the upload has finished the upload job it will trigger a deployment job that is run on the specified runner (see
tagsin the job definition in.gitlab-ci.yml). - The package is downloaded on
codedeploy1.shopfactory.ioand is synced out to the production servers.
Services
Repositories:
- https://gitlab.group.team.blue/hostedshop/proj/apps
- https://gitlab.group.team.blue/hostedshop/proj/design-store
- https://gitlab.group.team.blue/hostedshop/proj/blog-service
- https://gitlab.group.team.blue/hostedshop/proj/news-service
The deployment is made with flux and the deployment flow is as follows:
- MR is merged into master.
- A container image (Dockerfile) is created via GitLab CI and pushed to the Docker container registry: https://hub.docker.com. Production is prefixed with
master-*and staging images withstag-*. - Image Automation Controllers pick up the new image and updates the Helm resource yaml and pushes it to Git. See production and staging as well as the following Slack channels:
#dk-hostedshop.k8s-prod.#dk-hostedshop.k8s-stag.- Helm Controller picks up the update and deploys the new version to the K8s cluster.
Common failures that happen with deployments
Rolling back migration and forgetting to use "Automatic-with-migrations"
It's important when rolling back features with migrations that you use "Automatic-with-migrations". Because otherwise your migration will still be deployed to new demos.