Skip to content

Commit

Permalink
feat: make labs more clearer (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
CasLubbers authored Nov 12, 2024
1 parent 2d5bc30 commit e005a12
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 38 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

.history
.history

# IntelliJ IDEA
.idea
2 changes: 1 addition & 1 deletion docs/get-started/labs/build-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ When your team is using Harbor for private image registries, you can build image

3. Fill in the name `blue` for your build and a tag (default tag is latest).

4. Choose `Docker` and fill in the repo URL for the `blue` repo created in the previous lab.
4. Choose `Docker` and fill in the repo URL for the `blue` repo created in the previous lab: `https://gitea.<your-domain>/<gitea-username>/blue`.

5. Click `Submit`.

Expand Down
18 changes: 10 additions & 8 deletions docs/get-started/labs/create-projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A Project is a collection of a Build, a Workload and a Service. The benefit of u

## Create a new Git repository

1. Create a new repo called `nodejs-helloworld`.
1. Create a new repo called `nodejs-helloworld` in Gitea.

2. Set the Default Branch to `master`.

Expand Down Expand Up @@ -39,19 +39,21 @@ git push --mirror https://gitea.<your-domain>/<your-user-name>/nodejs-helloworld

6. Enable `Trigger`.

7. Select the `Digest` strategy for the `Auto image updater`.
7. Click `Next`.

8. The `imageRepository` is already filled in. Make sure the `tag` is identical to the tag used for the Build.
8. Select the `Digest` strategy for the `Auto image updater`.

9. Use the default Chart values.
9. The `imageRepository` is already filled in. Make sure the `tag` is identical to the tag used for the Build.

10. Click `Next`.
10. Use the default Chart values.

11. Under `Exposure` select `External`.
11. Click `Next`.

12. Click `Submit`.
12. Under `Exposure` select `External`.

13. Click `Deploy Changes`.
13. Click `Submit`.

14. Click `Deploy Changes`.

## Get the webhook URL

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/labs/create-repos.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Team members first have to sign in to Gitea (using OpenID), after which they are
The `otomi-admin` account is unable to login with OpenID, this account needs to login with the user/password login form.
:::

In the labs we'll be using a Team called `labs` and a user called `labs-user`.
In the labs we'll be using a Team called `labs` and a user called `labs-user@example.com`.

## Using a Git client

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/labs/create-sealed-secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Now go to Gitea and check the otomi/values repository. You will see that under `

## Checking the Kubernetes secret

The only way to see the values of the secret is to decrypt the secret. The secret values are stored as base64 encoded values. Open a Shell and run the following command:
The only way to see the values of the secret is to decrypt the secret. The secret values are stored as base64 encoded values. In the left menu click on Shell and run the following command:

```bash
kubectl get secret secret-credentials -o yaml -n team-labs
Expand Down
4 changes: 2 additions & 2 deletions docs/get-started/labs/expose-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ When you have deployed your application using the Workloads feature, you will pr

![expose services](../../img/create-svc.png)

2. Select the `blue` service of the Workload we created in the previous lab:
2. Select the `blue` service of the workload created in the previous lab. The blue service will become available once the ArgoCD application is ready:

![expose services](../../img/create-svc-2.png)

Expand All @@ -28,4 +28,4 @@ You will see your service in the list of Services:

![expose services](../../img/create-svc-4.png)

Click on the URL and see the blue application publicly exposed.
Click on the URL and see the blue application publicly exposed.
30 changes: 15 additions & 15 deletions docs/get-started/labs/labs-prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@ sidebar_label: Lab Prerequisites

2. Platform Applications that are required for the following labs are enabled:

| Lab | App |
| ---- | ----- |
| Build images | Harbor |
| Trigger builds | Harbor |
| Push images to harbor | Harbor |
| Lab | App |
|---------------------------------------------|-------------------------------------|
| Build images | Harbor |
| Trigger builds | Harbor |
| Push images to harbor | Harbor |
| Scan running containers for vulnerabilities | Prometheus, Grafana, Trivy Operator |
| View container logs | Loki, Grafana |
| View container metrics | Prometheus |
| Using custom metrics | Prometheus |
| Monitoring availability of Workloads | Prometheus |
| Tracing with Open Telemetry | Loki, Otel, Tempo |
| Create a RabbitMQ cluster | RabbitMQ |
| View container logs | Loki, Grafana |
| View container metrics | Prometheus |
| Monitor services | Alertmanager |
| Using custom metrics | Prometheus |
| Tracing with Open Telemetry | Loki, Otel, Tempo |
| Create a RabbitMQ cluster | RabbitMQ |


For the [Tracing with Open Telemetry](use-otel.md) Lab, tracing needs to be configured in the `Istio` and `Nginx Ingress` apps.

3. A team called `labs` is created with `Alertmanager` activated.
3. A team called `labs` is created with `Alertmanager` activated. See how you can create teams on: [Platform - Teams](docs/for-ops/console/teams.md).

4. A user account is created and added to the `labs` Team. In the labs we'll be using the user `labs-user`.
4. A user account is created and added to the `labs` Team. In the labs we'll be using the user `labs-user@example.com`. See how you can create users on: [Platform - User Management](docs/for-ops/console/usermgnt.md).

## Sign in to the Console

- Go to the provided URL. The URL will look like this: https://console.yourdomain.com

- Sign in with the created user account (or when OIDC is configured, use your existing corporate AD account)

After sign in, you will see this page:
After sign in, you will see this page (with grafana enabled):

![Team dashboard](../../img/team-dashboard.png)
![Team dashboard](../../img/team-dashboard.png)
11 changes: 7 additions & 4 deletions docs/get-started/labs/push-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,26 @@ For this lab, Harbor needs to be activated and the cluster needs to be configure
## Login to Harbor

To be able to push images to Harbor, you'll need a robot account with push permissions. Teams are offered the option to download the Docker config for their team's private registry in Harbor. In the left menu you will see the option `Download DOCKERCFG`. Click on it to download the credentials.
:::info
To download the DOCKERCFG, enable this option in the team settings. See team settings for more information: [Platform - Teams](docs/for-ops/console/teams.md).
:::

![harbor-projects](../../img/download-dcfg.png)

When you have downloaded the docker config then run `docker login`:
When you have downloaded the docker config. Get the password from the config and paste it below, then run `docker login`:

```bash
docker login -u 'otomi-team-<team-name>-push' -p <token> harbor.<your-domain>
docker login -u 'otomi-team-<team-name>-push' -p <password> harbor.<your-domain>
```

Build and tag your image:

```bash
docker build -t harbor.<your-domain>/<team-name>/<image-name>:<tag> .
docker build -t harbor.<your-domain>/team-<team-name>/<image-name>:<tag> <path to your Dockerfile>
```

Push the image to Harbor:

```bash
docker push harbor.<your-domain>/<team-name>/<image-name>:<tag>
docker push harbor.<your-domain>/team-<team-name>/<image-name>:<tag>
```
2 changes: 1 addition & 1 deletion docs/get-started/labs/trigger-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In the previous lab we created a Build using the `blue` repo in Gitea. In this l

3. Fill in the name `green` for your build.

4. Choose `./Dockerfile` and fill in the repo URL for the `green` repo created in the previous lab: `https://gitea.<your-domain>/<gitea-username>/green`.
4. Choose `Docker` and fill in the repo URL for the `green` repo created in the previous lab: `https://gitea.<your-domain>/<gitea-username>/green`.

5. Enable `Trigger`.

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/labs/use-otel.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ resources:

2. Select the `petclinic` service.

3. Under `Exposure Ingress`, select `Ingress` and use the default configuration.
3. Under `Exposure Ingress`, select `External` and use the default configuration.

4. Click `Submit`.

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/labs/using-argo-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Let's demonstrate the capabilities of Argo CD by adding some manifests to the re
Once you return to the Argo CD application, click on the `team<name>` application.

The application is configured for automatic syncing, so a manual `SYNC` is not needed.
The application is set to sync automatically, so a manual `SYNC` is not required. Once ArgoCD completes the sync, the nginx deployment will appear as shown below:

![Syncing in ArgoCD](../../img/argo-team-sync.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/labs/view-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ In Grafana, you are directed to the `Explore` section:

![kubecfg](../../img/grafana-loki.png)

Select the label `app` and then select `blue`. You will now see all the `blue` container logs. You can also create your own queries. Learn more about LogQL [here](https://grafana.com/docs/loki/latest/logql/).
Select the `app` label, then choose `blue`, and click `Run Query`. This will display all logs for the `blue` container. You can also create custom queries; learn more about LogQL here: [here](https://grafana.com/docs/loki/latest/logql/).

2 changes: 1 addition & 1 deletion docs/get-started/labs/view-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ The dashboards are dynamically added based on the enabled platform capabilities:

- Click on the `Kubernetes / Pods` dashboard.

- Select the required Pod and Container.
- Select the desired Pod and Container, e.g., `blue-<pod-hash>` and `all`.

0 comments on commit e005a12

Please sign in to comment.