GitLab: Unterschied zwischen den Versionen
Rkr (Diskussion | Beiträge) K (→Help) |
Rkr (Diskussion | Beiträge) K (→Weblinks) |
||
(151 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
<!--[[File:Gitlab_screenshot_dashboard.png|right|500px|thumb|The GitLab dashboard]]--> | <!--[[File:Gitlab_screenshot_dashboard.png|right|500px|thumb|The GitLab dashboard]]--> | ||
This page describes '''GitLab''', which is a software for [[Git]] repository management and software development that can run on your own server. | This page describes '''GitLab''', which is a software for [[Git]] repository management and software development that can run on your own server. GitLab also offers a hosted online service at https://gitlab.com. | ||
__TOC__ | __TOC__ | ||
{{Clr}} | {{Clr}} | ||
Zeile 24: | Zeile 24: | ||
*Notifications. | *Notifications. | ||
*Visualization of commits, branches, etc. | *Visualization of commits, branches, etc. | ||
*[https://about.gitlab.com/blog/2020/03/30/new-features-to-core/ 18 GitLab features are moving to open source] (März 2020) | |||
*Web IDE | |||
**[https://www.heise.de/news/Gitpod-bietet-native-IDE-Integration-in-GitLab-4923817.html mit Gitpod] | |||
==== Planning ==== | |||
*Issues (tickets) can only be created on project level. Issue are passed from bottom to down (project -> subgroup -> group). The higher the level, the more issues are gathered and shown in issue boards. | |||
*Epics can only be created on subgroup and group level. Epics are passed from bottom to down (subgroup -> group). The higher the level, the more epics are gathered and shown in epic list/board and roadmaps. | |||
*Roadmaps are based on epics (after dates are given). Roadmaps are passed and enriched from bottom to down (subgroup -> group). | |||
*Permissions (members) are inherited and passed from top to bottom (group -> subgroup -> project). A permission granted on group level cannot be removed on subgroup or project level. Therefore, if we need to split permissions (e.g. for product and customer train), subgroups are needed. | |||
*Each group can contain multiple subgroups and each subgroup can contain multiple projects. | |||
*Group, subgroup and project names can be changed easily without impact on references. But paths (in URL) shall remain stable in order to keep references (merge requests, commits, links) valid. Therefore, paths shall be generic (e.g. team1, team2, ...) and short. | |||
== Access to repositories == | == Access to repositories == | ||
Zeile 66: | Zeile 85: | ||
== Operations == | == Operations == | ||
See [[/Operations|Operations]] for info about installing and maintaining GitLab. | See [[/Operations|Operations]] for info about installing and maintaining GitLab. | ||
== Docker == | |||
See [https://hub.docker.com/r/gitlab/gitlab-ce/ hub.docker.com] for running GitLab as Docker container. | |||
Creating the container: | |||
<syntaxhighlight lang="docker"> | |||
docker run --detach \ | |||
--hostname gitlab.example.com \ | |||
--publish 9443:9443 --publish 9080:9080 --publish 9022:22 \ | |||
--name gitlab \ | |||
--restart always \ | |||
--volume /srv/gitlab/config:/etc/gitlab \ | |||
--volume /srv/gitlab/logs:/var/log/gitlab \ | |||
--volume /srv/gitlab/data:/var/opt/gitlab \ | |||
gitlab/gitlab-ce:latest | |||
</syntaxhighlight> | |||
GitLab configuration ''gitlab.rb'': | |||
<syntaxhighlight lang="ruby"> | |||
external_url 'https://gitlab.example.com:9443' | |||
nginx['ssl_certificate']= "/etc/gitlab/ssl/fullchain.pem" | |||
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/privkey.pem" | |||
gitlab_rails['gitlab_shell_ssh_port'] = 9022 | |||
gitlab_rails['gitlab_email_from'] = 'gitlab@example.com' | |||
gitlab_rails['gitlab_email_display_name'] = 'GitLab example.com' | |||
gitlab_rails['gitlab_email_reply_to'] = 'gitlab@example.com' | |||
gitlab_rails['smtp_enable'] = true | |||
gitlab_rails['smtp_address'] = "mail.example.com" | |||
gitlab_rails['smtp_port'] = 587 | |||
gitlab_rails['smtp_user_name'] = "user" | |||
gitlab_rails['smtp_password'] = "pass" | |||
gitlab_rails['smtp_domain'] = "mail.example.com" | |||
gitlab_rails['smtp_authentication'] = "plain" | |||
gitlab_rails['smtp_enable_starttls_auto'] = true | |||
</syntaxhighlight> | |||
Notes about running GitLab on a Docker host with Port 80, 443 and 22 already occupied: | |||
*GitLab must be configured to set the external ports like 9443 and/or 9080. Once you set "external_url 'https://gitlab.example.com:9443'", nginx will listen on port 9443. | |||
*Setting the SSH port | |||
gitlab_rails['gitlab_shell_ssh_port'] = 9022 | |||
:does only work when the port forwarding from Docker is e.g. 9022->22. 9022->9022 did not work for me. | |||
*All these HTTP/HTTPS and SSH configured are used as ports in the GitLab user interface, e.g. in the clone URL. | |||
*You can/should create virtual webservers on the Docker host serving port 443 and 80 and redirecting both the the external GitLab URL. | |||
*For TLS with Let's Encrypt see [[#TLS|TLS]]. | |||
Update: | |||
<pre> | |||
docker stop gitlab | |||
docker rm gitlab | |||
docker pull gitlab/gitlab-ce:latest | |||
docker run ... | |||
</pre> | |||
Troubleshooting: | |||
<pre> | |||
docker logs gitlab | |||
docker exec -it gitlab bash | |||
</pre> | |||
Ports: | |||
*https://gitlab.com/gitlab-org/gitlab-ce/issues/1551 | |||
Weblinks: | |||
*https://blog.jscrambler.com/migrating-your-gitlab-infrastructure-into-docker/ | |||
== TLS == | |||
*https://about.gitlab.com/2016/04/11/tutorial-securing-your-gitlab-pages-with-tls-and-letsencrypt/ | |||
*https://webnugget.de/setting-up-gitlab-with-free-ssl-certs-from-lets-encrypt-on-ubuntu-14-04/ | |||
**http://stackoverflow.com/questions/34189199/how-do-i-use-let-s-encrypt-with-gitlab | |||
*https://gitlab.com/gitlab-com/blog-posts/issues/24 | |||
*https://rootco.de/2016-05-16-letsencrypt-on-leap/ | |||
== Help == | == Help == | ||
Zeile 71: | Zeile 167: | ||
http://gitlab.example.com/help | http://gitlab.example.com/help | ||
== | == Agile Project/Product Management == | ||
*[ | *[https://www.youtube.com/watch?v=VR2r1TJCDew How to set up GitLab groups and projects to run multiple Agile teams with microservices] | ||
: | === Issues === | ||
*https://docs.gitlab.com/ee/user/project/issues/ | |||
*Issue Templates | |||
**Defined within ''.gitlab/issue_templates/'' | |||
**Exmaple for a "Bug" template ''Bug.md'': | |||
<syntaxhighlight lang="markdown"> | |||
# Details | |||
# Customer information | |||
* Client reported the bug: | |||
# Workflow | |||
Please mark the checks if the corresponding step is __finished__. | |||
- [ ] Bug can be reproduced :frame_photo: | |||
- [ ] Shipment :cruise_ship: | |||
- [ ] Yes, the feature can be shipped automatically (continuous delivery) | |||
- [ ] No, we need to align date of shipment | |||
- [ ] Approved :vertical_traffic_light: | |||
## Additional information | |||
* Effort Estimation (in PT): _please add estimated duration using a [quick action](https://gitlab.kruedewagen.de:9443/help/user/project/quick_actions)_ | |||
* Is a date of shipment communicated to the client (yes|no)? | |||
- If yes, which date: | |||
/label ~"bug" | |||
</syntaxhighlight> | |||
*Story Points per [https://docs.gitlab.com/ce/user/project/issues/issue_weight.html Weight] (nur ab Starter) | |||
*[https://docs.gitlab.com/ee/user/project/time_tracking.html Time Tracking] | |||
*[https://docs.gitlab.com/ee/user/project/issues/crosslinking_issues.html Crosslinking Issues] | |||
#xxx | |||
https://gitlab.com/<username>/<projectname>/issues/<xxx> | |||
===Issue Boards=== | |||
Issue boards are controlled by labels. Board can be created by project/repo and also on group level. | |||
A feature board respective product backlog with a workflow for requirement engineering could look like: | |||
* backlog | |||
* new requirement | |||
* business analysis | |||
* technical analysis | |||
* ready for development | |||
* in progress | |||
* in qa | |||
* ready for production | |||
* on production | |||
* closed | |||
This feature boards looks like following: | |||
[[Datei:Issue board part1.png|500px|miniatur|ohne|Feature Board Part 1]] | |||
[[Datei:Issue board part2.png|500px|miniatur|ohne|Feature Board Part 2]] | |||
=== EPICs === | |||
*[https://about.gitlab.com/2018/08/23/epics-roadmap/ Seamless top-down and bottoms-up planning with epics and roadmap] | |||
*[https://about.gitlab.com/blog/2020/01/21/epics-three-features-accelerate-your-workflow/ 3 Major improvements to epics in GitLab 12.7] | |||
=== User Story === | |||
*[https://about.gitlab.com/blog/2020/03/27/how-we-utilize-user-stories-as-a-collaborative-design-tool/ Improving iteration and collaboration with user stories] | |||
===See also=== | |||
*https://docs.gitlab.com/ee/user/project/issue_board.html | |||
*[https://about.gitlab.com/2018/08/02/4-ways-to-use-gitlab-issue-boards/ 4 ways to use GitLab Issue Boards] | |||
== Operations == | |||
=== Alerts und Incidents === | |||
*[https://about.gitlab.com/blog/2020/11/03/designing-alerts-and-incidents/ Designing Incident Management from scratch] | |||
*https://docs.gitlab.com/ce/operations/incident_management/ | |||
*https://docs.gitlab.com/ce/operations/incident_management/generic_alerts.html | |||
*[https://about.gitlab.com/blog/2021/11/30/gitlab-incident-management/ Downtime happens, but GitLab Incident Management can help] | |||
*Alerts werden per Schnittstelle erzeugt | |||
*Beispiel | |||
<syntaxhighlight lang="json"> | |||
TIMESTAMP=$(date +%Y-%m-%dT%H:%M:%S%z) | |||
FINGERPRINT=$(date +%s) | |||
curl --request POST \ | |||
--data '{"title": "Test Alert", "description": "Short description of the alert", "start_time": "'$TIMESTAMP'", "service": "My little service", "monitoring_tool": "Icinga", "hosts": "server", "severity": "medium", "fingerprint": "'$FINGERPRINT'"}' \ | |||
--header "Authorization: Bearer <key>" \ | |||
--header "Content-Type: application/json" \ | |||
https://gitlab.example.com/group1/project1/alerts/notify.json | |||
</syntaxhighlight> | |||
:Achtung: "fingerprint" muss unique sein, sonst wird kein neuer Alert/Issue erzeugt (z.B. als UUID um wiederkehrende Alert erkennen, Anzahl "Events" wird sonst hochgezählt). "key" wird aus den GitLab-Einstellungen für den Aufruf der Schnittstelle übernommen. | |||
*Incidents können automatisch aus Alerts erzeugt werden (Einstellungen, Template möglich) oder manuell aus einem Alert in der GitLab GUI erstellt werden. | |||
*Incidents sind eine bestimmte Art von Issues mit anderen Detail-Infos (z.B. Severity). | |||
*Incidents haben einen Tag "incident" | |||
==Docker Registry == | |||
*Aufräumen: | |||
gitlab-ctl registry-garbage-collect | |||
== GitLab Pages == | |||
*https://docs.gitlab.com/ee/user/project/pages/introduction.html | |||
*https://docs.gitlab.com/ee/user/project/pages/index.html#getting-started | |||
*https://docs.gitlab.com/ee/administration/pages/ | |||
*https://gitlab.com/gitlab-org/gitlab-pages | |||
*https://gitlab.com/pages?page=1 | |||
*https://docs.gitlab.com/ee/user/project/pages/getting_started/pages_from_scratch.html | |||
*https://about.gitlab.com/blog/2016/06/17/ssg-overview-gitlab-pages-part-3-examples-ci/ | |||
*https://how-to-stuff.gitlab.io/gitlab-pages-how-to/ | |||
*[http://heise.de/-6044148 heise+ | Projektdokumentation mit Git leicht gemacht] | |||
In combination with other tools (e.g. markdown converter, CMS): | |||
*See project import tamples in GitLab | |||
*https://www.reddit.com/r/gitlab/comments/870mgo/is_it_possible_to_create_a_gitlab_page_from/ | |||
*https://docs.gitlab.com/ee/development/documentation/styleguide/ | |||
*https://www.r-bloggers.com/2020/09/rendering-an-r-markdown-presentation-to-gitlab-pages/ | |||
*https://github.com/showdownjs/showdown | |||
*https://getpublii.com/docs/host-static-website-gitlab-pages.html | |||
*[https://about.gitlab.com/blog/2022/04/18/comparing-static-site-generators/ How to choose the right static site generator] (gitlab.com) | |||
*MkDocs - Project documentation with Markdown. | |||
**https://www.mkdocs.org/ | |||
**https://gitlab.com/pages/mkdocs | |||
**[https://about.gitlab.com/blog/2022/03/15/publishing-obsidian-notes-with-gitlab-pages/ Publishing Obsidian.md notes with GitLab Pages] (mit MkDocs zur Umwandlung von Markdown in static website) | |||
*https://gitlab.com/pages/hugo | |||
*VitePress | |||
**https://duckduckgo.com/?q=vitepress+gitlab+pages&t=fpas&ia=web | |||
*[https://about.gitlab.com/blog/2022/10/24/publishing-an-astro-site-with-pages/ How to publish your Astro Site with GitLab Pages] | |||
*[https://about.gitlab.com/blog/2023/09/13/hosting-vuejs-apps-using-gitlab-pages/ How to host VueJS apps using GitLab Pages] | |||
=== Troubleshooting === | |||
*https://docs.gitlab.com/ee/administration/pages/#troubleshooting | |||
*https://forum.gitlab.com/t/gitlab-ce-docker-gitlab-pages-fails-after-upgrade-to-14-0/54756 | |||
*Logs | |||
gitlab-ctl tail gitlab-pages | |||
== GitLab Wiki == | |||
=== Move / Migrate / Import a GitLab wiki === | |||
* https://stackoverflow.com/questions/54401112/gitlab-wiki-how-to-import-wiki-when-importing-a-repository | |||
* If you have a mix of master/main: https://www.git-tower.com/learn/git/faq/git-rename-master-to-main | |||
* Delete Wiki: https://stackoverflow.com/questions/4922104/is-it-possible-to-completely-empty-a-remote-git-repository | |||
== Mattermost == | |||
*[https://github.com/mattermost/mattermost-plugin-gitlab GitLab plugin for Mattermost] | |||
== Literature and Tutorials == | |||
*[[/GitLab Cookbook|GitLab Cookbook]] | |||
*[[c't]] 13/16 S.134 | |||
*[https://about.gitlab.com/2017/01/23/video-tutorial-idea-to-production-on-google-container-engine-gke/ Video Tutorial: Idea to Production on Google Container Engine (GKE)] | |||
*Continuous Integration (CI) mit [[Docker]] und GitLab: siehe [http://www.linux-magazin.de/ausgaben/2018/01/ci-mit-gitlab/ LM 01/18 S.58] | |||
*GitLab CI/CD: siehe [https://www.heise.de/ct/ausgabe/2017-25-GitLab-CI-CD-Mietserver-bauen-Software-3894126.html c't 25/17 S.88] | |||
*[https://www.heise.de/developer/meldung/GitLab-11-0-Auto-DevOps-Feature-fuer-alle-Nutzer-4090828.html GitLab 11.0: Auto-DevOps-Feature für alle Nutzer] | |||
*[https://www.heise.de/developer/meldung/GitLab-automatisiert-die-Integration-von-Kubernetes-4013141.html GitLab automatisiert die Integration von Kubernetes] | |||
*[https://about.gitlab.com/blog/2022/11/15/simple-kubernetes-management-with-gitlab/ Simple Kubernetes management with GitLab] (gitlab.com) | |||
*Continuous Integration: GitLab-CI-Setup: (Ansible und Vagrant) siehe [https://www.heise.de/ix/heft/Bausatz-zur-Automatisierung-4117100.html iX 08/18 S.102] | |||
*GitLab für DevOps-Teams: siehe [[LM]] 04/19 S.22 | |||
*GitLab CI und CD installieren und konfigurieren: siehe [https://www.heise.de/select/ix/2019/4/1553943972989985 iX 04/19 S.118] | |||
*[https://about.gitlab.com/blog/2020/05/28/using-gitlab-web-ide-gitlab-ci-cd/ How to make small changes using GitLab’s Web IDE] | |||
*[https://about.gitlab.com/handbook/product-development-flow/ GitLab Product Development Flow]: Validation backlog, Problem validation, Design, Solution Validation | |||
*[https://about.gitlab.com/handbook/product/product-principles/#the-minimal-viable-change-mvc Minimal Viable Change (MVC)] | |||
*GitLab als DevOps Toolchain: siehe iX 06/20 S.56, http://ix.de/zy83 | |||
*[https://about.gitlab.com/blog/2021/01/12/learn-gitlab-devops-version-control/ How to use GitLab for DevOps, version control, and more] | |||
*[https://about.gitlab.com/blog/2021/02/18/improve-your-gitlab-productivity-with-these-10-tips/ 10 tips to make you a productive GitLab user] (quick actions) | |||
*[https://about.gitlab.com/blog/2021/05/20/vscode-workflows-for-working-with-gitlab/ Visual Studio code editor: Eight tips for using GitLab VS Code] | |||
*[https://about.gitlab.com/blog/2021/11/17/vscode-workflow-new-features/ Four new tools for your Visual Studio Code and GitLab tool belt] | |||
*[https://www.heise.de/ratgeber/Einstieg-in-Git-Eigenen-Gitlab-Server-mit-Docker-aufsetzen-6050420.html Einstieg in Git: Eigenen Gitlab-Server mit Docker aufsetzen | heise online] | |||
*[https://about.gitlab.com/blog/2021/10/19/top-10-gitlab-hacks/ Top ten GitLab hacks for all stages of the DevOps Platform] | |||
*[https://about.gitlab.com/blog/2022/01/24/gitlab-value-stream-analytics/ The role of Value Stream Analytics in GitLab's DevOps Platform] | |||
*[https://about.gitlab.com/blog/2022/02/22/parent-child-vs-multi-project-pipelines/ Breaking down CI/CD complexity with parent-child and multi-project pipelines] | |||
*[https://about.gitlab.com/blog/2022/03/03/how-to-protect-gitlab-connected-ssh-key-with-yubikey/ How to protect GitLab-connected SSH key with Yubikey] | |||
*[https://icinga.com/blog/2022/03/24/parameterizing-gitlab-ci-cd/ Parameterizing GitLab CI/CD?] (icinga.com Blog) | |||
*[https://about.gitlab.com/blog/2022/11/09/how-we-boosted-webauthn-adoption-from-20-percent-to-93-percent-in-2-days/ How we boosted WebAuthn adoption from 20 percent to 93 percent in two days] | |||
*[https://icinga.com/blog/2023/04/26/a-short-overview-gitlab-tokens/ A Short Overview: GitLab Tokens] | |||
== Tools == | |||
*[http://requestb.in RequestBin] | |||
**Testen von HTTP Requests, z.B. für den Empfang von Webhooks bei Git/GitLab. | |||
**Siehe "GitLab Cookbook" S.113 - Using webhooks. | |||
**RequestBin gives you a URL that will collect requests made to it and let you inspect them in a human-friendly way. Use RequestBin to see what your HTTP client is sending or to inspect and debug webhook requests. | |||
*[http://goo.gl/SmDU3j Postman] | |||
**REST Client, Testen von APIs | |||
**Chrome Browser Extension | |||
**Sendet HTTP Request zu einem Server, auch mit Parameter/Value Variablen von simulierten Formularen | |||
**Siehe "GitLab Cookbook" S.121 - Managing your projects via the API. | |||
== Shortkeys == | |||
*"." öffnet Web IDE im jeweiligen Kontext | |||
== Weblinks == | == Weblinks == | ||
Zeile 79: | Zeile 360: | ||
*[https://www.gitlab.com GitLab Homepage] | *[https://www.gitlab.com GitLab Homepage] | ||
*[https://forum.gitlab.com GitLab Community Forum], see also this [https://about.gitlab.com/2015/01/12/gitlab-community-forum/ blog post]. | *[https://forum.gitlab.com GitLab Community Forum], see also this [https://about.gitlab.com/2015/01/12/gitlab-community-forum/ blog post]. | ||
*[https://gitter.im/gitlabhq/gitlabhq Chatroom] on Gitter | |||
*[https://www.gitlab.com/gitlab-ce/ GitLab Community Edition] | *[https://www.gitlab.com/gitlab-ce/ GitLab Community Edition] | ||
*[http://doc.gitlab.com/ce/ GitLab Community Edition Documentation] | *[http://doc.gitlab.com/ce/ GitLab Community Edition Documentation] | ||
*[https://about.gitlab.com/upcoming-releases/ GitLab upcoming releases | GitLab] | |||
*[https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md Installation] | *[https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md Installation] | ||
*[http://doc.gitlab.com/ce/update/README.html GitLab Community Edition Update] | *[http://doc.gitlab.com/ce/update/README.html GitLab Community Edition Update] | ||
Zeile 87: | Zeile 370: | ||
*[https://github.com/gitlabhq/gitlabhq GitLab repository] on GitHub | *[https://github.com/gitlabhq/gitlabhq GitLab repository] on GitHub | ||
*[https://about.gitlab.com/2014/09/29/gitlab-flow/ GitLab Flow] | *[https://about.gitlab.com/2014/09/29/gitlab-flow/ GitLab Flow] | ||
*[https://about.gitlab.com/upcoming-releases/ GitLab upcoming releases] | |||
*[https://about.gitlab.com/handbook/product/product-principles GitLab Product Principles] | |||
*[https://about.gitlab.com/community/gitlab-first-look/ GitLab First Look] - Research program for invites to usability tests, user interviews, surveys, etc. | |||
Communities: | |||
* [https://stackoverflow.com/collectives/gitlab GitLab Collectives Stackoverflow], see [https://about.gitlab.com/blog/2021/11/08/join-the-new-gitlab-collective-on-stack-overflow/ Join the new GitLab Collective on Stack Overflow!]: | |||
Additional components: | Additional components: | ||
*[http://sidekiq.org Sidekiq] | *[http://sidekiq.org Sidekiq] | ||
*[http://redis.io Redis] | *[http://redis.io Redis] | ||
Webcasts: | |||
*[https://www.youtube.com/watch?v=enMumwvLAug GitLab Workflow] | |||
Other resources: | Other resources: | ||
Zeile 104: | Zeile 396: | ||
*https://github.com/n3rdbeere/Installation-guide-for-GitLab6-on-SLES11/blob/master/README.md | *https://github.com/n3rdbeere/Installation-guide-for-GitLab6-on-SLES11/blob/master/README.md | ||
*http://www.badzilla.co.uk/openSUSE-12-3-Installation-of-GitLab-Nginx-Apache-and-Drupal-PHP | *http://www.badzilla.co.uk/openSUSE-12-3-Installation-of-GitLab-Nginx-Apache-and-Drupal-PHP | ||
Markdown: | |||
*https://about.gitlab.com/2018/08/17/gitlab-markdown-tutorial/ | |||
Continuous Integration (CI/CD): | |||
*[https://about.gitlab.com/features/gitlab-ci-cd/ GitLab Continuous Integration & Deployment] | |||
*[https://docs.gitlab.com/ee/ci/quick_start/README.html GitLab CI Quick Start] | |||
*[https://about.gitlab.com/features/jenkins/ Jenkins Integration] | |||
*[https://about.gitlab.com/features/jira/ JIRA Integration] | |||
**[https://about.gitlab.com/blog/2021/04/12/gitlab-jira-integration-selfmanaged/ How to achieve a Gitlab Jira integration] | |||
**[https://about.gitlab.com/blog/2021/05/24/gitlab-and-jira-integration-the-final-steps/ GitLab and Jira integration: the final steps] | |||
**[https://about.gitlab.com/blog/2023/10/24/tips-for-a-successful-jira-to-gitlab-migration/ Tips for a successful Jira to GitLab migration] | |||
*[https://about.gitlab.com/2015/08/19/quayio/ Continuous Integration of GitLab-Hosted Docker Projects with Quay.io] (gitlab.com) | |||
*[http://www.pro-linux.de/artikel/2/1808/gitlab-continuous-integration.html GitLab Continuous Integration] (pro-linux.de) | |||
*[https://about.gitlab.com/2018/04/24/getting-started-gitlab-ci-gcp/ Getting started with GitLab CI/CD and Google Cloud Platform] (GitLab) | |||
*[https://entwickler.de/online/php/self-hosted-continuous-integration-php-579838010.html Continuous Integration für PHP Anwendungen mit GitLab], [https://www.youtube.com/watch?v=m35iG5v-rRw Video] | |||
*[https://about.gitlab.com/2018/07/18/using-the-gitlab-ci-slash-cd-for-smart-home-configuration-management/ Using GitLab CI/CD for smart home configuration management] | |||
*[https://about.gitlab.com/2018/07/30/gitlab-workflow-with-jira-jenkins/ Demo: GitLab + Jira + Jenkins] | |||
*[https://about.gitlab.com/2019/07/01/using-ansible-and-gitlab-as-infrastructure-for-code/ How to use GitLab and Ansible to create infrastructure as code] | |||
*[https://about.gitlab.com/2019/07/12/guide-to-ci-cd-pipelines/ A quick guide to GitLab CI/CD pipelines] | |||
*[https://about.gitlab.com/blog/2020/12/17/gitlab-for-cicd-agile-gitops-cloudnative/ How to use GitLab for Agile, CI/CD, GitOps, and more] | |||
*[https://about.gitlab.com/blog/2020/12/17/cd-solution-overview/ GitLab’s continuous delivery] | |||
*[https://about.gitlab.com/blog/2021/02/05/ci-deployment-and-environments/ How to use GitLab CI to deploy to multiple environments] | |||
*[https://about.gitlab.com/blog/2023/05/23/how-to-harden-your-self-managed-gitlab-instance/ How to harden your self-managed GitLab instance] | |||
Serverless / FaaS: | |||
*https://about.gitlab.com/2018/12/11/introducing-gitlab-serverless/ | |||
*https://entwickler.de/online/agile/gitlab-serverless-angekuendigt-natives-faas-fuer-gitlab-579871325.html | |||
Cloud / GitOps: | |||
*[https://about.gitlab.com/blog/2019/11/18/gitops-prt-3/ How to deploy to any cloud using GitLab for GitOps] | |||
*[https://about.gitlab.com/blog/2021/12/02/gitops-with-gitlab-secrets-management/ GitOps with GitLab: How to tackle secrets management] | |||
*[https://about.gitlab.com/blog/2022/04/07/the-ultimate-guide-to-gitops-with-gitlab/ The ultimate guide to GitOps with GitLab] | |||
Release Strategy: | |||
*[https://about.gitlab.com/2015/12/17/gitlab-release-process/ How we managed 49 monthly releases] | |||
Agile Software Development: | |||
*[https://about.gitlab.com/2018/03/05/gitlab-for-agile-software-development/ How to use GitLab for Agile software development] (i.e. Issue Board = Product Backlog, Milestone = Sprint, etc.) | |||
*[https://about.gitlab.com/blog/2020/11/30/why-gitlab-is-the-right-design-collaboration-tool-for-the-whole-team/ Why GitLab is the right design collaboration tool for the entire team] | |||
*[https://about.gitlab.com/solutions/agile-delivery/scaled-agile/ Scaled Agile Framework (SAFe) with GitLab] | |||
Planning: | |||
*[https://about.gitlab.com/blog/2020/11/11/gitlab-for-agile-portfolio-planning-project-management/ How to use GitLab for Agile portfolio planning and project management] | |||
*[https://about.gitlab.com/blog/2023/10/17/five-reasons-to-simplify-agile-planning-tool-configuration-gitlab/ 5 reasons to simplify your agile planning tool configuration with GitLab] | |||
Cloud-Deployment: | |||
*[https://about.gitlab.com/blog/2020/12/15/deploy-aws/ How to deploy to AWS with GitLab] | |||
Automation: | |||
*[https://about.gitlab.com/blog/2021/11/16/engineering-managers-automate-their-jobs/ How GitLab automates engineering management | GitLab] | |||
Compliance: | |||
*[https://about.gitlab.com/blog/2022/07/13/top-5-compliance-features-to-leverage-in-gitlab/ Top 5 compliance features to leverage in GitLab] | |||
Documentation: | |||
*[https://about.gitlab.com/blog/2022/10/12/five-fast-facts-about-docs-as-code-at-gitlab/ Five fast facts about docs as code at GitLab] (gitlab.com) | |||
== Comparisons == | |||
*[https://de.linkedin.com/pulse/praxisbericht-gitlab-vs-jira-jens-werschmoeller Praxisbericht Gitlab vs. JIRA] | |||
*[https://rigorousthemes.com/blog/jira-vs-gitlab-which-is-better/ Jira vs GitLab - Which Is Better? - Rigorous Themes] | |||
== See also == | == See also == | ||
*[[Git]] | *[[Git]] | ||
*My [https://gitlab.com/formwandler GitLab profile] | |||
[[Category:Git]] | [[Category:Git]] |
Aktuelle Version vom 31. Oktober 2023, 12:00 Uhr
This page describes GitLab, which is a software for Git repository management and software development that can run on your own server. GitLab also offers a hosted online service at https://gitlab.com.
Overview
GitLab is Open Source and offers Git repository management, code reviews, issue tracking, activity feeds and wikis.
Features
Major GitLab features are depicted in this article on techdo.me.
Some highlights:
- User management.
- SSH key management for accessing a repo via SSH and mapping to GUI user.
- Repository/project permissions (private, protected or public). Users and groups.
- View commits.
- Comments.
- Issue tracking.
- Markdown support.
- Branches and tags can be created in GUI.
- Merge requests. Code review.
- New files can be created and in the GUI.
- Files can be edited in the GUI.
- A wiki per project (in separate Git repo).
- Notifications.
- Visualization of commits, branches, etc.
- 18 GitLab features are moving to open source (März 2020)
- Web IDE
Planning
- Issues (tickets) can only be created on project level. Issue are passed from bottom to down (project -> subgroup -> group). The higher the level, the more issues are gathered and shown in issue boards.
- Epics can only be created on subgroup and group level. Epics are passed from bottom to down (subgroup -> group). The higher the level, the more epics are gathered and shown in epic list/board and roadmaps.
- Roadmaps are based on epics (after dates are given). Roadmaps are passed and enriched from bottom to down (subgroup -> group).
- Permissions (members) are inherited and passed from top to bottom (group -> subgroup -> project). A permission granted on group level cannot be removed on subgroup or project level. Therefore, if we need to split permissions (e.g. for product and customer train), subgroups are needed.
- Each group can contain multiple subgroups and each subgroup can contain multiple projects.
- Group, subgroup and project names can be changed easily without impact on references. But paths (in URL) shall remain stable in order to keep references (merge requests, commits, links) valid. Therefore, paths shall be generic (e.g. team1, team2, ...) and short.
Access to repositories
The GitLab GUI always shows the links you need to use for accessing (cloning) the Git repositories either via HTTP or SSH.
Example URLs for project/repository:
HTTP access:
http://gitlab.example.com/group1/project1.git
SSH access on port 22:
git@gitlab.example.com/group1/project1.git
- Note: The repo must be addressed with a absolute path (do not use ":" between hostname and pathname)
The corresponding clone commands are:
git clone http://gitlab.example.com/group1/project1.git git clone ssh://git@gitlab.example.com/group1/project1.git
Notes:
- For HTTP you need to authenticate with your GitLab user credentials, if it's not a public repo.
- It's recommended using SSH for accessing the repositories with a Git client.
- The SSH connect must go directly to the host GitLab has been installed on (no proxy in between).
- For SSH you need to always login as user git. The user mapping will be made via your SSH key(s).
- For SSH you need to authenticate with a SSH private key matching the public key you need to register in your GitLab user profile.
- The SSH keys must be unique. You can't add a public key to multiple user profiles. The keys are added to ~git/.ssh/authorized_keys.
- For SSH you need to take care using the correct SSH key, e.g. just add following to ~/.ssh/config:
Host gitlab.example.com IdentityFile ~/.ssh/id_rsa_emptypass StrictHostKeyChecking no UserKnownHostsFile /dev/null
- For SSH you can check the general SSH access and authentication by just connecting to the server with a native SSH client. In addition, your GitLab user mapping will be responded by the server as e.g. Welcome to GitLab, Peter Pan!. A successful connect (using SSH port forwarding) looks like:
> ssh git@gitlab.example.com
X11 forwarding request failed on channel 0
PTY allocation request failed on channel 0
Welcome to GitLab, Peter Pan!
Connection to gitlab.example.com closed.
Operations
See Operations for info about installing and maintaining GitLab.
Docker
See hub.docker.com for running GitLab as Docker container.
Creating the container:
docker run --detach \
--hostname gitlab.example.com \
--publish 9443:9443 --publish 9080:9080 --publish 9022:22 \
--name gitlab \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
GitLab configuration gitlab.rb:
external_url 'https://gitlab.example.com:9443'
nginx['ssl_certificate']= "/etc/gitlab/ssl/fullchain.pem"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/privkey.pem"
gitlab_rails['gitlab_shell_ssh_port'] = 9022
gitlab_rails['gitlab_email_from'] = 'gitlab@example.com'
gitlab_rails['gitlab_email_display_name'] = 'GitLab example.com'
gitlab_rails['gitlab_email_reply_to'] = 'gitlab@example.com'
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "mail.example.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "user"
gitlab_rails['smtp_password'] = "pass"
gitlab_rails['smtp_domain'] = "mail.example.com"
gitlab_rails['smtp_authentication'] = "plain"
gitlab_rails['smtp_enable_starttls_auto'] = true
Notes about running GitLab on a Docker host with Port 80, 443 and 22 already occupied:
- GitLab must be configured to set the external ports like 9443 and/or 9080. Once you set "external_url 'https://gitlab.example.com:9443'", nginx will listen on port 9443.
- Setting the SSH port
gitlab_rails['gitlab_shell_ssh_port'] = 9022
- does only work when the port forwarding from Docker is e.g. 9022->22. 9022->9022 did not work for me.
- All these HTTP/HTTPS and SSH configured are used as ports in the GitLab user interface, e.g. in the clone URL.
- You can/should create virtual webservers on the Docker host serving port 443 and 80 and redirecting both the the external GitLab URL.
- For TLS with Let's Encrypt see TLS.
Update:
docker stop gitlab docker rm gitlab docker pull gitlab/gitlab-ce:latest docker run ...
Troubleshooting:
docker logs gitlab docker exec -it gitlab bash
Ports:
Weblinks:
TLS
- https://about.gitlab.com/2016/04/11/tutorial-securing-your-gitlab-pages-with-tls-and-letsencrypt/
- https://webnugget.de/setting-up-gitlab-with-free-ssl-certs-from-lets-encrypt-on-ubuntu-14-04/
- https://gitlab.com/gitlab-com/blog-posts/issues/24
Help
The GitLab GUI has an excellent online help available at
http://gitlab.example.com/help
Agile Project/Product Management
Issues
- https://docs.gitlab.com/ee/user/project/issues/
- Issue Templates
- Defined within .gitlab/issue_templates/
- Exmaple for a "Bug" template Bug.md:
# Details
# Customer information
* Client reported the bug:
# Workflow
Please mark the checks if the corresponding step is __finished__.
- [ ] Bug can be reproduced :frame_photo:
- [ ] Shipment :cruise_ship:
- [ ] Yes, the feature can be shipped automatically (continuous delivery)
- [ ] No, we need to align date of shipment
- [ ] Approved :vertical_traffic_light:
## Additional information
* Effort Estimation (in PT): _please add estimated duration using a [quick action](https://gitlab.kruedewagen.de:9443/help/user/project/quick_actions)_
* Is a date of shipment communicated to the client (yes|no)?
- If yes, which date:
/label ~"bug"
- Story Points per Weight (nur ab Starter)
- Time Tracking
- Crosslinking Issues
#xxx https://gitlab.com/<username>/<projectname>/issues/<xxx>
Issue Boards
Issue boards are controlled by labels. Board can be created by project/repo and also on group level.
A feature board respective product backlog with a workflow for requirement engineering could look like:
- backlog
- new requirement
- business analysis
- technical analysis
- ready for development
- in progress
- in qa
- ready for production
- on production
- closed
This feature boards looks like following:
![](/w/images/thumb/0/0d/Issue_board_part1.png/500px-Issue_board_part1.png)
![](/w/images/thumb/0/0c/Issue_board_part2.png/500px-Issue_board_part2.png)
EPICs
- Seamless top-down and bottoms-up planning with epics and roadmap
- 3 Major improvements to epics in GitLab 12.7
User Story
See also
Operations
Alerts und Incidents
- Designing Incident Management from scratch
- https://docs.gitlab.com/ce/operations/incident_management/
- https://docs.gitlab.com/ce/operations/incident_management/generic_alerts.html
- Downtime happens, but GitLab Incident Management can help
- Alerts werden per Schnittstelle erzeugt
- Beispiel
TIMESTAMP=$(date +%Y-%m-%dT%H:%M:%S%z)
FINGERPRINT=$(date +%s)
curl --request POST \
--data '{"title": "Test Alert", "description": "Short description of the alert", "start_time": "'$TIMESTAMP'", "service": "My little service", "monitoring_tool": "Icinga", "hosts": "server", "severity": "medium", "fingerprint": "'$FINGERPRINT'"}' \
--header "Authorization: Bearer <key>" \
--header "Content-Type: application/json" \
https://gitlab.example.com/group1/project1/alerts/notify.json
- Achtung: "fingerprint" muss unique sein, sonst wird kein neuer Alert/Issue erzeugt (z.B. als UUID um wiederkehrende Alert erkennen, Anzahl "Events" wird sonst hochgezählt). "key" wird aus den GitLab-Einstellungen für den Aufruf der Schnittstelle übernommen.
- Incidents können automatisch aus Alerts erzeugt werden (Einstellungen, Template möglich) oder manuell aus einem Alert in der GitLab GUI erstellt werden.
- Incidents sind eine bestimmte Art von Issues mit anderen Detail-Infos (z.B. Severity).
- Incidents haben einen Tag "incident"
Docker Registry
- Aufräumen:
gitlab-ctl registry-garbage-collect
GitLab Pages
- https://docs.gitlab.com/ee/user/project/pages/introduction.html
- https://docs.gitlab.com/ee/user/project/pages/index.html#getting-started
- https://docs.gitlab.com/ee/administration/pages/
- https://gitlab.com/gitlab-org/gitlab-pages
- https://gitlab.com/pages?page=1
- https://docs.gitlab.com/ee/user/project/pages/getting_started/pages_from_scratch.html
- https://about.gitlab.com/blog/2016/06/17/ssg-overview-gitlab-pages-part-3-examples-ci/
- https://how-to-stuff.gitlab.io/gitlab-pages-how-to/
- heise+ | Projektdokumentation mit Git leicht gemacht
In combination with other tools (e.g. markdown converter, CMS):
- See project import tamples in GitLab
- https://www.reddit.com/r/gitlab/comments/870mgo/is_it_possible_to_create_a_gitlab_page_from/
- https://docs.gitlab.com/ee/development/documentation/styleguide/
- https://www.r-bloggers.com/2020/09/rendering-an-r-markdown-presentation-to-gitlab-pages/
- https://github.com/showdownjs/showdown
- https://getpublii.com/docs/host-static-website-gitlab-pages.html
- How to choose the right static site generator (gitlab.com)
- MkDocs - Project documentation with Markdown.
- https://www.mkdocs.org/
- https://gitlab.com/pages/mkdocs
- Publishing Obsidian.md notes with GitLab Pages (mit MkDocs zur Umwandlung von Markdown in static website)
- https://gitlab.com/pages/hugo
- VitePress
Troubleshooting
- https://docs.gitlab.com/ee/administration/pages/#troubleshooting
- https://forum.gitlab.com/t/gitlab-ce-docker-gitlab-pages-fails-after-upgrade-to-14-0/54756
- Logs
gitlab-ctl tail gitlab-pages
GitLab Wiki
Move / Migrate / Import a GitLab wiki
- https://stackoverflow.com/questions/54401112/gitlab-wiki-how-to-import-wiki-when-importing-a-repository
- If you have a mix of master/main: https://www.git-tower.com/learn/git/faq/git-rename-master-to-main
- Delete Wiki: https://stackoverflow.com/questions/4922104/is-it-possible-to-completely-empty-a-remote-git-repository
Mattermost
Literature and Tutorials
- GitLab Cookbook
- c't 13/16 S.134
- Video Tutorial: Idea to Production on Google Container Engine (GKE)
- Continuous Integration (CI) mit Docker und GitLab: siehe LM 01/18 S.58
- GitLab CI/CD: siehe c't 25/17 S.88
- GitLab 11.0: Auto-DevOps-Feature für alle Nutzer
- GitLab automatisiert die Integration von Kubernetes
- Simple Kubernetes management with GitLab (gitlab.com)
- Continuous Integration: GitLab-CI-Setup: (Ansible und Vagrant) siehe iX 08/18 S.102
- GitLab für DevOps-Teams: siehe LM 04/19 S.22
- GitLab CI und CD installieren und konfigurieren: siehe iX 04/19 S.118
- How to make small changes using GitLab’s Web IDE
- GitLab Product Development Flow: Validation backlog, Problem validation, Design, Solution Validation
- Minimal Viable Change (MVC)
- GitLab als DevOps Toolchain: siehe iX 06/20 S.56, http://ix.de/zy83
- How to use GitLab for DevOps, version control, and more
- 10 tips to make you a productive GitLab user (quick actions)
- Visual Studio code editor: Eight tips for using GitLab VS Code
- Four new tools for your Visual Studio Code and GitLab tool belt
- Einstieg in Git: Eigenen Gitlab-Server mit Docker aufsetzen | heise online
- Top ten GitLab hacks for all stages of the DevOps Platform
- The role of Value Stream Analytics in GitLab's DevOps Platform
- Breaking down CI/CD complexity with parent-child and multi-project pipelines
- How to protect GitLab-connected SSH key with Yubikey
- Parameterizing GitLab CI/CD? (icinga.com Blog)
- How we boosted WebAuthn adoption from 20 percent to 93 percent in two days
- A Short Overview: GitLab Tokens
Tools
- RequestBin
- Testen von HTTP Requests, z.B. für den Empfang von Webhooks bei Git/GitLab.
- Siehe "GitLab Cookbook" S.113 - Using webhooks.
- RequestBin gives you a URL that will collect requests made to it and let you inspect them in a human-friendly way. Use RequestBin to see what your HTTP client is sending or to inspect and debug webhook requests.
- Postman
- REST Client, Testen von APIs
- Chrome Browser Extension
- Sendet HTTP Request zu einem Server, auch mit Parameter/Value Variablen von simulierten Formularen
- Siehe "GitLab Cookbook" S.121 - Managing your projects via the API.
Shortkeys
- "." öffnet Web IDE im jeweiligen Kontext
Weblinks
GitLab official sites:
- GitLab Homepage
- GitLab Community Forum, see also this blog post.
- Chatroom on Gitter
- GitLab Community Edition
- GitLab Community Edition Documentation
- GitLab upcoming releases | GitLab
- Installation
- GitLab Community Edition Update
- GitLab Architecture Overview
- GitLab repository on GitLab
- GitLab repository on GitHub
- GitLab Flow
- GitLab upcoming releases
- GitLab Product Principles
- GitLab First Look - Research program for invites to usability tests, user interviews, surveys, etc.
Communities:
Additional components:
Webcasts:
Other resources:
- Installing GitLab in your local network or your own PC and setting it up to work perfectly, with a guide to change SMTP settings
- Archlinux Wiki
- https://blog.netways.de/2012/06/29/web-oberflache-fur-git-gefallig/
- https://github.com/gitlabhq/gitlab-public-wiki/wiki/Comparison-to-other-Git-web-interfaces
- GitLab as an Alternative Development Platform for Github.com (LinuxCon Europe 2014)
Using under openSUSE:
- https://gist.github.com/rriemann/5163741
- https://gist.github.com/jniltinho/5565606
- https://github.com/n3rdbeere/Installation-guide-for-GitLab6-on-SLES11/blob/master/README.md
- http://www.badzilla.co.uk/openSUSE-12-3-Installation-of-GitLab-Nginx-Apache-and-Drupal-PHP
Markdown:
Continuous Integration (CI/CD):
- GitLab Continuous Integration & Deployment
- GitLab CI Quick Start
- Jenkins Integration
- JIRA Integration
- Continuous Integration of GitLab-Hosted Docker Projects with Quay.io (gitlab.com)
- GitLab Continuous Integration (pro-linux.de)
- Getting started with GitLab CI/CD and Google Cloud Platform (GitLab)
- Continuous Integration für PHP Anwendungen mit GitLab, Video
- Using GitLab CI/CD for smart home configuration management
- Demo: GitLab + Jira + Jenkins
- How to use GitLab and Ansible to create infrastructure as code
- A quick guide to GitLab CI/CD pipelines
- How to use GitLab for Agile, CI/CD, GitOps, and more
- GitLab’s continuous delivery
- How to use GitLab CI to deploy to multiple environments
- How to harden your self-managed GitLab instance
Serverless / FaaS:
- https://about.gitlab.com/2018/12/11/introducing-gitlab-serverless/
- https://entwickler.de/online/agile/gitlab-serverless-angekuendigt-natives-faas-fuer-gitlab-579871325.html
Cloud / GitOps:
- How to deploy to any cloud using GitLab for GitOps
- GitOps with GitLab: How to tackle secrets management
- The ultimate guide to GitOps with GitLab
Release Strategy:
Agile Software Development:
- How to use GitLab for Agile software development (i.e. Issue Board = Product Backlog, Milestone = Sprint, etc.)
- Why GitLab is the right design collaboration tool for the entire team
- Scaled Agile Framework (SAFe) with GitLab
Planning:
- How to use GitLab for Agile portfolio planning and project management
- 5 reasons to simplify your agile planning tool configuration with GitLab
Cloud-Deployment:
Automation:
Compliance:
Documentation:
- Five fast facts about docs as code at GitLab (gitlab.com)
Comparisons