Gitlab

Contents

Gitlab#

This page focuses on configuring and exploring the options in GitLab.

Running#

We are moving away from the usual paradigm of deploying a separate container for each notebook. Here, it is assumed that GitLab is deployed with a command line. The following cell shows how to run the GitLab server. For more details on running, check Configure GitLab running in a Docker container.

GitLab is a relatively complex tool that requires extensive configuration. To simplify this, a special Docker image has been created, which already contains all the necessary configuration:

  • The GITLAB_OMNIBUS_CONFIG environment variable is passed to set up GitLab’s configuration. In this case, it sets the default password for the root user.

  • The GitLab Runner is installed to allow interaction with GitLab pipelines.

  • The git utility is installed for Git operations.

The following cell show correspondin

cat gitlab_files/dockerfile
FROM gitlab/gitlab-ce

ENV GITLAB_OMNIBUS_CONFIG="gitlab_rails['initial_root_password'] = \"wow_wow_wow\";" 

RUN apt-get update && apt-get install -y git

# gitlab runners installation
RUN \
    curl -L --output /usr/local/bin/gitlab-runner \
        https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64 \
    && chmod +x /usr/local/bin/gitlab-runner \
    && useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash \
    && gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner

# Starting runner and executing script that is responsible for gitlab
# deployment
CMD gitlab-runner start && assets/wrapper

Build container if haven’t yet.

docker build -t custom-gitlab -f gitlab_files/dockerfile . &> /dev/null

Run gitlab instance that will be used for experiments.

docker run -p 80:80 --name gitlab --rm -d custom-gitlab
e7ddce79796365cc8828c17056965d8bbdd9719f3be03c9d08d0c5be4a352fbe

After a while, you can access your GitLab server using the following credentials:

  • user: root

  • password: wow_wow_wow