Rollout


Rollout step 1/

Deploy a containerized stack for this workshop

Obviously GitLab

Visual Studio Code for editing

Portainer to manage Docker

traefik routes requests to containers


Rollout 2/

Use SSH to login to you VM

ssh seat@seatN.inmylab.de

Clone repository with slides and demos

git clone https://github.com/nicholasdille/container-slides

Deploy stack

cd container-slides/160_gitlab_ci/000_rollout
docker compose \
    --project-name gitlab \
    up -d

Go to https://seatN.inmylab.de where seatN matches your subdomain


Rollout 3/

Wait for GitLab to be available (status is running (healthy)):

docker compose ps

Retrieve the initial root password for GitLab:

docker ps --filter "label=com.docker.compose.service=gitlab" --quiet \
| xargs -I{} \
    docker exec {} \
        cat /etc/gitlab/initial_root_password \
| grep ^Password \
| cut -d' ' -f2

Login to GitLab


Rollout step 4/4

Connect GitLab runner

  1. Go to Menu > Admin > Overview > Runners
  2. Click Register an instance runner and copy the registration token
  3. Make the registration token available:

     echo "export REGISTRATION_TOKEN=<REGISTRATION_TOKEN>" \
         >/etc/profile.d/gitlab_registration_token.sh
     source /etc/profile.d/gitlab_registration_token.sh
    
  4. Restart runner:

     docker compose \
         --project-name gitlab \
         up -d
    

GitLab runner

Needed to executed CI jobs

Uses the docker executor

Isolates jobs in dedicated containers

Containers are based on alpine by default


IDE

Use the web-based Visual Studio Code

  1. Go to https://vscode.seatN.inmylab.de
  2. Authenticate using the user seat and your personal password
  3. Finish the configuration wizard
  4. Open a terminal and configure git:

     git config --global user.email "seatN@inmylab.de"
     git config --global user.name "seatN"
    
  5. Clone https://github.com/nicholasdille/container-slides