GitLab is a complete DevOps platform, delivered as a single application.
This makes GitLab unique and creates a streamlined software workflow,
unlocking your organization from the constraints of a pieced together
toolchain. Learn how GitLab offers unmatched visibility and higher levels
of efficiency in a single application across the DevOps lifecycle.
Target audience
The course material presented here is meant for a technically inclined person
with a basic proficiency in the Git source management system and an inclination
to learn about combining the power of Git with the versatility of GitLab.
Scope & Terminology
GitLab is tightly wedded, as the name suggests, to the git source code
management system, its concepts, command and terminology. It helps to be
familiar with Git’s interpretations of working directory, staging,
repository, branch, tag, commit and revision among others.
GitLab setup
GitLab setup prerequisites
For the course the following prerequisites have to be met:
Recent version of docker.io
All docker commands are invoked without sudo. It is therefore
assumed that the participants user is part of the docker Unix group.
Gitlab docker setup
The examples in this tutorial are based on gitlab-ce (community edition).
The docker image and instruction on how to install it can be found on the
gitlab docker hub page.
Table 2. Port mapping
Protocol
Local Port
Docker Port
HTTPS
8443
443
HTTP
8480
80
SSH
8422
22
Container start script with prefilled port numbers.
For the purpose of the excercises conducted during this tutorial
no particular changes in the user profile need to be made but for better
recognition the avatar, the privacy setting and the ssh keys are being
discussed here.
Navigate to the user' settings
Figure 4. Navigate to the user settings
Change the avatar
Figure 5. Change the avatar
Figure 6. Upload new avatar from image file
For Joe Developer the chosen avatar is a construction worker with hard hat.
Review privacy settings
Figure 7. Privacy settings
Upload ssh public keys
Generate a ssh public key on the command line
$ ssh-keygen -t ed25519 -f ~/.ssh/gitlab (1)
Generating public/private ed25519 key pair.
Enter passphrase (empty for no passphrase): (2)
Enter same passphrase again: (3)
Your identification has been saved in /home/uroesch/.ssh/gitlab
Your public key has been saved in /home/uroesch/.ssh/gitlab.pub
The key fingerprint is:
SHA256:hXWPmuLBU8fnrEYPNBoSDKwXaITn5Jn/Vtvdin6gJI4 uroesch@uroesch-puzzle
The key's randomart image is:
+--[ED25519 256]--+
| o.o.o. . . |
| . = o .+ o o |
| * + .o + * o |
| * .. + B = |
| o S + o o |
| ...+o..+ |
| +.+ +oo.. |
| E + o...o .|
| . .o... |
+----[SHA256]-----+
$ ls -l ~/.ssh/gitlab*
-rw------- 1 jdev jdev 464 Nov 9 12:09 /home/jdev/.ssh/gitlab (4)
-rw-r--r-- 1 jdev jdev 104 Nov 9 12:09 /home/jdev/.ssh/gitlab.pub (5)
Figure 8. Upload a ssh public key
Figure 9. Upload confirmation for ssh public key
Module 2 - Gitlab project
Goals
Create a new GitLab project.
How to navigate a project.
Protect certain branches like master.
Create a new project
In the following steps a new personal public repository is created.
The process of creating a new project is assisted and straight forward.
The creation starts with clicking on the boxed plus sign left to the
search field.
Figure 10. Create a new project from the top navigation bar