Skip to content

Commit

Permalink
Final slides for 20220323
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Mar 23, 2023
1 parent 5403187 commit 7a3b1af
Show file tree
Hide file tree
Showing 17 changed files with 86 additions and 29 deletions.
2 changes: 1 addition & 1 deletion 150_gitlab/001_quickstart/gitlab.demo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ docker run -d --name gitlab \
--volume gitlab_config:/etc/gitlab \
--volume gitlab_logs:/var/log/gitlab \
--volume gitlab_data:/var/opt/gitlab \
gitlab/gitlab-ce:15.4.4-ce.0
gitlab/gitlab-ce:15.9.2-ce.0

# Wait for container to finish starting
while docker container inspect gitlab \
Expand Down
2 changes: 1 addition & 1 deletion 150_gitlab/001_quickstart/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ docker run -d --name gitlab \
--volume gitlab_logs:/var/log/gitlab \
--volume gitlab_data:/var/opt/gitlab \
--publish 80:80 \
gitlab/gitlab-ce:15.4.4-ce.0
gitlab/gitlab-ce:15.9.2-ce.0
```

Wait for container to finish starting:
Expand Down
2 changes: 1 addition & 1 deletion 150_gitlab/050_server_settings/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Password length

Domain allowlist and denylist

Sign-up test
Sign-up text

---

Expand Down
4 changes: 3 additions & 1 deletion 150_gitlab/060_api/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Resources for every aspect of GitLab [<i class="fa-solid fa-arrow-up-right-from-

Authentication [<i class="fa-solid fa-arrow-up-right-from-square"></i>](https://docs.gitlab.com/ee/api/#authentication) using a token (personal/group/project)

Token requires `read_api` or `api` scope

Send token in HTTP header using `Private-Token`:

```
Expand Down Expand Up @@ -97,7 +99,7 @@ Keyset-based pagination [<i class="fa-solid fa-arrow-up-right-from-square"></i>]

### `glab`

glab [<i class="fa-solid fa-arrow-up-right-from-square"></i>](https://gitlab.com/gitlab-org/cli) is in the process of being adopted as the official CLI
glab [<i class="fa-solid fa-arrow-up-right-from-square"></i>](https://gitlab.com/gitlab-org/cli) was adopted as the official CLI in November 2022:

1. Configure `glab`:

Expand Down
4 changes: 4 additions & 0 deletions 150_gitlab/090_maintenance/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Switch GitLab into read-only mode [<i class="fa-solid fa-arrow-up-right-from-squ

<i class="fa-brands fa-git-alt fa-4x" style="float: right;"></i>

Configure under Menu <i class="fa-regular fa-arrow-right"></i> Admin <i class="fa-regular fa-arrow-right"></i> Settings <i class="fa-regular fa-arrow-right"></i> Repository

### Settings

Runs `git fsck` to find silent disk corruption

Incremental `git repack` after 10 pushes
Expand Down
4 changes: 2 additions & 2 deletions 150_gitlab/100_reverse_proxy/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:

# https://doc.traefik.io/traefik/
traefik:
image: traefik:v2.8
image: traefik:v2.9
command:
- --log=true
- --log.level=DEBUG
Expand Down Expand Up @@ -43,7 +43,7 @@ services:

# https://docs.gitlab.com/ee/install/docker.html
gitlab:
image: gitlab/gitlab-ce:15.4.4-ce.0
image: gitlab/gitlab-ce:15.9.2-ce.0
environment:
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template
GITLAB_OMNIBUS_CONFIG: |
Expand Down
14 changes: 8 additions & 6 deletions 150_gitlab/100_reverse_proxy/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,23 @@ Examples in this workshop use [`traefik`](https://traefik.io/traefik/)

<i class="fa-duotone fa-signs-post fa-4x fa-duotone-colors" style="float: right;"></i>

Services are reachable by...

- `NAME.seatN.inmylab.de`
- `NAME.IP.nip.io` (fallback)

Deploy using `docker compose` v2:

```
# Clone repository with slides and demos
git clone https://github.com/nicholasdille/container-slides
cd container-slides/150_gitlab/100_reverse_proxy
# Remove existing instance of GitLab
docker rm -f gitlab
# Deploy new instance
docker compose --project-name gitlab up -d
```

Your VM has the necessary environment variables: `DOMAIN` and `IP`

Extract password:
Extract password (or [reset](#/gitlab_troubleshooting)):

```bash
docker compose --project-name gitlab exec gitlab
Expand Down
15 changes: 13 additions & 2 deletions 150_gitlab/110_directories/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@

GitLab uses a clean top level directory layout

Explore:

```
docker compose --project-name gitlab exec gitlab bash
```

### Configuration

`/etc/gitlab`
Expand Down Expand Up @@ -45,11 +51,16 @@ Repository info for a hash can be found in...
```
/var/opt/gitlab
/git-data/repositories/
@hashed/ab/cd
/abcdefg0123456789.git
@hashed/ab/cd/abcdef0123456789.git
/config
```

Hashed are generated from project ID:

```
echo -n "${CI_PROJECT_ID}" | sha256sum
```

---

## Logs
Expand Down
4 changes: 4 additions & 0 deletions 150_gitlab/120_ldap/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ docker volume create keycloak_data
Deploy additional components:

```bash
# Switch to directory for this topics
cd ../120_ldap/

# Deploy components for LDAP
docker compose --project-name gitlab \
--file ../100_reverse_proxy/compose.yml \
--file compose.yml \
Expand Down
2 changes: 1 addition & 1 deletion 150_gitlab/130_registries/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Authentication using personal/group/project/job token

<i class="fa-duotone fa-flag fa-duotone-colors-inverted"></i> Alpha: debian, go, ruby

<i class="fa-duotone fa-hand-holding-medical fa-duotone-colors"></i> Open for contributon: chef, cocoapods, conda, cran, opkg, p2, puppet, rpm, sbt, swift, vagrant
<i class="fa-duotone fa-hand-holding-medical fa-duotone-colors"></i> Open for contribution: chef, cocoapods, conda, cran, opkg, p2, puppet, rpm, sbt, swift, vagrant

---

Expand Down
6 changes: 4 additions & 2 deletions 150_gitlab/135_integrations/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ Self-hosted deployment requires Kubernetes

Render diagrams from textual descriptions [<i class="fa-solid fa-arrow-up-right-from-square"></i>](https://docs.gitlab.com/ee/administration/integration/kroki.html) using Kroki [<i class="fa-solid fa-arrow-up-right-from-square"></i>](https://kroki.io/)

Many examples [<i class="fa-solid fa-arrow-up-right-from-square"></i>](https://kroki.io/examples.html)

### Hands-On

Deploy in addition to GitLab:

```bash
# Switch to directory for this topic
cd ../135_integrations

# Deploy kroki
docker compose --project-name gitlab \
--file ../100_reverse_proxy/compose.yml \
--file compose.yml \
Expand Down
4 changes: 3 additions & 1 deletion 150_gitlab/150_update/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@ You must update to every minor version due to schema updates

## Hands-On

1. Update `compose.yml` in 100_reverse_proxy<br>with new image `gitlab/gitlab-ce:15.5.3-ce.0`
1. Update `compose.yml` in 100_reverse_proxy<br>with new image `gitlab/gitlab-ce:15.9.3-ce.0`
1. Run deployment from [reverse proxy section](#/gitlab_traefik)

(Minor update to v15.10.0 possible.)
24 changes: 19 additions & 5 deletions 150_gitlab/160_runner/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,28 @@ Jobs select runners by specifying a tag

Extensive configuration [<i class="fa-solid fa-arrow-up-right-from-square"></i>](https://docs.gitlab.com/runner/configuration/advanced-configuration.html)

### Hands-On
### Heads-up

Add runner to GitLab instance:
New runner registration process [](https://docs.gitlab.com/ee/architecture/blueprints/runner_tokens/)

Implementation completed by v15.11 (April 2023)

Enforcement in v16.6 (November 2023)

---

## Hands-On

Add runner to GitLab instance

```bash
CI_SERVER_URL=http://gitlab.seatN.inmylab.de \
REGISTRATION_TOKEN=<TOKEN> \
RUNNER_EXECUTOR=docker \
# Switch to directory for this topic
cd ../160_runners

# Deploy GitLab runner
export CI_SERVER_URL=http://gitlab.seatN.inmylab.de
export REGISTRATION_TOKEN=<TOKEN>
export RUNNER_EXECUTOR=docker
docker compose --project-name gitlab \
--file ../100_reverse_proxy/compose.yml \
--file compose.yml \
Expand Down
10 changes: 8 additions & 2 deletions 150_gitlab/170_monitoring/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@ Grafana ships with custom dashboards

### Hands-On

1. Enable link to integrated Grafana (Menu <i class="fa-regular fa-arrow-right"></i> Admin <i class="fa-regular fa-arrow-right"></i> Settings <i class="fa-regular fa-arrow-right"></i> Monitoring and profiling <i class="fa-regular fa-arrow-right"></i> Metrics - Grafana)
1. Enable link to integrated Grafana (Menu <i class="fa-regular fa-arrow-right"></i> Admin <i class="fa-regular fa-arrow-right"></i> Settings <i class="fa-regular fa-arrow-right"></i> Metrics and profiling <i class="fa-regular fa-arrow-right"></i> Metrics - Grafana)

1. Go to Grafana (Menu <i class="fa-regular fa-arrow-right"></i> Admin <i class="fa-regular fa-arrow-right"></i> Monitoring <i class="fa-regular fa-arrow-right"></i> Metrics Dashboard)

1. Log in to Grafana using GitLab

--

## If SSO to Grafana fails

1. Reset password for Grafana [<i class="fa-solid fa-arrow-up-right-from-square"></i>](https://docs.gitlab.com/omnibus/settings/grafana.html#resetting-the-admin-password):

```bash
Expand All @@ -33,7 +39,7 @@ Grafana ships with custom dashboards

---

## GitLab CI Pipeline Exporter (GCPE)
## GitLab CI Pipelines Exporter (GCPE)

<i class="fa-duotone fa-hose fa-4x fa-duotone-colors" style="float: right;"></i>

Expand Down
10 changes: 7 additions & 3 deletions 150_gitlab/190_database/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@

---

## Database
## Important database tables

<i class="fa-duotone fa-database fa-4x fa-duotone-colors" style="float: right;"></i>

Important tables:

| Table | Contents |
|--------------|----------------------------------------------------------------------------------|
| users | Users [<i class="fa-solid fa-arrow-right-to-bracket"></i>](#/gitlab_users) |
Expand All @@ -21,3 +19,9 @@ Important tables:
| ci_pipelines | CI Pipelines |
| ci_stages | CI Stages |
| ci_runners | CI Runners [<i class="fa-solid fa-arrow-right-to-bracket"></i>](#/gitlab_runner) |

### Enter database

```
docker compose --project-name gitlab exec gitlab gitlab-psql
```
6 changes: 6 additions & 0 deletions 2023-03-23_heise-Workshop-GitLab-Ops.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@

**Seen my upcoming workshop about CI/CD with GitLab [<i class="fa-solid fa-arrow-up-right-from-square"></i>](https://www.heise-events.de/workshops/cicd-gitlab)?**
</textarea></section>

<section data-markdown="" data-separator="^---$" data-separator-vertical="^--$"><textarea data-template="">
## Links

https://to-be-continuous.gitlab.io/
</textarea></section>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion themes/theme2022.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
--r-heading-font: Source Sans Pro;
--r-code-font: 'Cascadia Mono';

--r-main-font-size: 3em;
--r-main-font-size: 2.5em;
--r-heading1-size: 2em;
--r-heading2-size: 1.8em;
--r-heading3-size: 1.3em;
Expand Down

0 comments on commit 7a3b1af

Please sign in to comment.