Skip to content

Latest commit

 

History

History
47 lines (24 loc) · 1.67 KB

xtra4_GitLab.md

File metadata and controls

47 lines (24 loc) · 1.67 KB

Lab: GitLab

This lab sets up a GitLab Community Edition server with MongoDB and Redis backends. It also uses Ansible to provision users and repository.

Using git, clone the following repository locally: https://github.com/OSE3Sandbox/gitlab-ocp3

A GitLab template have been added to the environment in the openshift namespace. You can look at the template here: https://raw.githubusercontent.com/OSE3Sandbox/gitlab-ocp3/master/gitlab.yaml

Alternately, you can create the template in your own project: oc create -f https://raw.githubusercontent.com/OSE3Sandbox/gitlab-ocp3/master/gitlab.yaml

Create a new project using oc or the OpenShift console.

oc new-project gitlab-USERNAME

Using the OpenShift console, select "Add to Project" and select the gitlab template:

image

Make sure to specify Gitlab instance hostname which should be the fully qualified name of the GitLab server

Also assign a github root user password.

For example: gitlab-ce-PROJECTNAME.apps.ose3sandbox.com

image

Wait for all the containers to start.

The next part of this lab is using Ansible. If you don't have Ansible install on your machine, please follow the instructions described here:

In your local copy of your github repository, edit the gitlab_repo playbook: ansible/gitlab_repo.yaml and set the variables for your GitLab environment.

This playbook will clone an existing repository into your GitLab installation.

to execute the playbook:

ansible-playbook ansible/gitlab_repo.yaml

Login to the gitlab console.

You should see the project:

image