Skip to content

Ansible role to install/setup gitlab and/or gitlab-runner using docker-compose

License

Notifications You must be signed in to change notification settings

HP41/ansible-docker-gitlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: docker-gitlab

Build Status

Products

Docker Images used/suggested:

NOTE: The setup as a service part of this role at the moment, only support systemd. This was designed mostly for CoreOS but can easily be adapted into other systemd type distros.

  • gitlab.rb - If provided process the template and places it in the appropriate location for the gitlab docker container to read it and accordingly process it.
    • For gitlab
    • Check out this link for info on how this can be used.
    • Also check out the template posted here.
  • config.toml - If provided process the template and places it in the appropriate location for the gitlab-runner container to read and process it.
    • For gitlab-runner
    • Check out this link for info on how this can be used.
    • Also check out the template posted here.
  • gitlab-compose.yml - This is the docker-compose file defining the containers to run. If provided process the template and places it in the appropriate location.
    • Please check gitlab-compose-example.yml for an example on how to use it.
    • More information regarding environment variables that can be used for the registering of gitlab-runner container with gitlab can be found here

Requirements

  • Ansible >= 2.1
  • Docker >= 1.9.0
  • Guest machine: Debian
    • stretch
    • jessie
    • wheezy
  • Guest machine: Ubuntu
    • xenial
    • trusty
    • precise

Default Variables that can be overridden or used as-is when using this role:

gitlab.rb

  • docker_gitlab_gitlab_rb_template(Optional): Path to the gitlab.rb template file in context of the role/playbook.
    • The template processing and placing of gitlab.rb by THIS role will only happen if this variable is defined with a non-empty string
  • docker_gitlab_gitlab_rb_location: Folder where gitlab.rb should be placed in context of the host
    • Please ensure this location is mounted accordingly onto the container. Please check gitlab-compose-example.yml
    • Default=/opt/gitlab
  • docker_gitlab_gitlab_rb_file_name: The filename for gitlab.rb. This is provided for flexibility
    • Default=gitlab.rb

gitlab-runner config.toml

  • docker_gitlab_runner_config_toml_template(Optional): Path to the config.toml template file in context of the role/playbook.
    • The template processing and placing of config.toml by THIS role will only happen if this variable is defined with a non-empty string
  • docker_gitlab_runner_config_toml_location: Folder where config.toml should be placed in context of the host
    • Please ensure this location is mounted accordingly onto the container. Please check gitlab-compose-example.yml
    • Default=/opt/gitlab-runner
  • docker_gitlab_runner_config_toml_file_name: The filename for config.toml. This is provided for flexibility
    • Default=config.toml

docker-compose

  • docker_gitlab_docker_compose_template(Optional): Path to the docker-compose file template file in context of the role/playbook.
    • The template processing and placing of docker-compose file by THIS role will only happen if this variable is defined with a non-empty string
  • docker_gitlab_docker_compose_location: Folder where docker-compose file should be placed in context of the host.
    • Default=/opt/compose-files/gitlab-docker
  • docker_gitlab_docker_compose_file_name: The filename for docker-compose file.
    • Default=gitlab-compose.yml
  • docker_gitlab_docker_compose_binary_full_path: The full path to where the docker-compose binary is located.
    • Default=/opt/bin/docker-compose

systemd unit to run the above docker-compose file as a service

  • docker_gitlab_service_template(Optional): Path to the gitlab docker-compose systemd unit template file in context of the role/playbook.
    • The template processing and placing of gitlab docker-compose systemd unit by THIS role will only happen if this variable is defined with a non-empty string
  • docker_gitlab_service_location: Folder where gitlab docker-compose systemd unit should be placed in context of the host .
    • Default=/etc/systemd/system
  • docker_gitlab_service_name: The service name for gitlab docker-compose systemd unit.
  • Please note, this is the service name and not the systemd service file name
    • For eg: gitlab-docker and NOT gitlab-docker.service
    • Default=gitlab-docker

About

Ansible role to install/setup gitlab and/or gitlab-runner using docker-compose

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published