/ansible-collection-gitlab

Ansible Collection for GitLab

Primary LanguageShellApache License 2.0Apache-2.0

Ansible Collection for GitLab

AlviStack

Gitlab pipeline status GitHub tag GitHub license Ansible Collection

Ansible collection for deploying GitLab.

This Ansible collection provides Ansible playbooks and roles for the deployment and configuration of an GitLab environment.

Requirements

This collection require Ansible community package 4.10 or higher.

This collection was designed for:

  • Ubuntu 18.04, 20.04, 22.04, 22.10
  • CentOS 7, 8 Stream, 9 Stream
  • openSUSE Leap 15.4, Tumbleweed
  • Debian 10, 11, Testing
  • Fedora 35, 36, 37, Rawhide
  • RHEL 7, 8, 9

Quick Start

Bootstrap Ansible and Roles

Start by cloning the repository, checkout the corresponding branch, and init with git submodule, then install Ansible (see https://software.opensuse.org/download/package?package=ansible&project=home%3Aalvistack):

# GIT checkout development branch
mkdir -p /opt/ansible-collection-gitlab
cd /opt/ansible-collection-gitlab
git init
git remote add upstream https://github.com/alvistack/ansible-collection-gitlab.git
git fetch --all --prune
git checkout upstream/develop -- .
git submodule sync --recursive
git submodule update --init --recursive

# Bootstrap Ansible
echo 'deb http://downloadcontent.opensuse.org/repositories/home:/alvistack/xUbuntu_22.04/ /' | tee /etc/apt/sources.list.d/home:alvistack.list
curl -fsSL https://downloadcontent.opensuse.org/repositories/home:alvistack/xUbuntu_22.04/Release.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/home_alvistack.gpg > /dev/null
apt update
apt install ansible

# Confirm the version of Ansible
ansible --version

AIO

All-in-one (AIO) build is a great way to perform an GitLab build for:

  • A development environment
  • An overview of how all the GitLab services fit together
  • A simple lab deployment

Simply execule our default Molecule test case and it will deploy all default components into your localhost:

# Run Molecule test case
molecule test -s default

Molecule

You could also run our Molecule test cases if you have Vagrant and Libvirt installed, e.g.

# Run Molecule on Ubuntu 22.04
molecule converge -s ubuntu-22.04

Please refer to .gitlab-ci.yml for more information on running Molecule.

Versioning

YYYYMMDD.Y.Z

Release tags could be find from GitHub Release of this repository. Thus using these tags will ensure you are running the most up to date stable version of this image.

YYYYMMDD.0.0

Version tags ended with .0.0 are rolling release rebuild by GitLab pipeline in weekly basis. Thus using these tags will ensure you are running the latest packages provided by the base image project.

License

Author Information