Skip to content

2. Preparation

Install Docker

To do these exercises you might want to install Docker It's not 100% necessary but helps to debug problems.

Linux

https://docs.docker.com/engine/install/

MacOs

https://docs.docker.com/docker-for-mac/install/

Windows

https://docs.docker.com/docker-for-windows/install/


Clone repository

Fork this repository: https://gitlab.com/polarsquad/workshops/example-project


Get AWS Credentials

Your instructor has created AWS credentials for you to do these exercises. Please, get both AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from your instructor.

You will need them later on.


Save your AWS Credentials to Gitlab

  1. Go to your Gitlab example-repository
  2. Go to Settings --> General --> CI/CD --> Variables
    Settings
    Settings
  3. Add both variables secrets AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
    AddVariable
    AddVariable

Note

Make sure you don't add variable as PROTECTED! Also make sure you check the Mask Variable option to hide credentials


Initialize your Gitlab CI/CD

Use this template file in the root (.gitlab-ci.yml) of the repository.

stages:

<stage_name>:<step_name>:
  stage: <stage_name>
  trigger:
    include:
      - local: <path>

Every practice section will have it's own Gitlab CI file in their respective directories. These files are then included in the main .gitlab-ci.yml file.

This keeps the CI YAML files / jobs clear and readable.

Every practice section should run parallel. This can be done with the stages option.

Next

To get started, let's do some GIT.