Skip to content

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:

  1. MR is merged into master.
  2. GitLab triggers a pipeline and is run on the specified runner (see tags in the job definition in .gitlab-ci.yml).
  3. The job is going to execute on codedeploy1.shopfactory.io and 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:

  1. MR is merged into master.
  2. 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.
  3. After the upload has finished the upload job it will trigger a deployment job that is run on the specified runner (see tags in the job definition in .gitlab-ci.yml).
  4. The package is downloaded on codedeploy1.shopfactory.io and 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:

  1. MR is merged into master.
  2. The repo is built in the GitLab pipeline and uploaded to our S3 object storage in a restricted bucket.
  3. After the upload has finished the upload job it will trigger a deployment job that is run on the specified runner (see tags in the job definition in .gitlab-ci.yml).
  4. The package is downloaded on codedeploy1.shopfactory.io and 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:

  1. MR is merged into master.
  2. 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 with stag-*.
  3. 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:
  4. #dk-hostedshop.k8s-prod.
  5. #dk-hostedshop.k8s-stag.
  6. 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.