Skip to content

Commit

Permalink
minor fixes from performing labs (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeho authored Nov 23, 2023
1 parent 3cd6541 commit 4a1634e
Show file tree
Hide file tree
Showing 12 changed files with 88 additions and 103 deletions.
6 changes: 3 additions & 3 deletions docs/for-devs/console/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ A Project in Otomi is a collection of a Build, a Workload and a Service in ONE f

## Create a Project

1. In the right menu click on `Projects` and then on `Create project`.
1. In the left menu click on `Projects` and then on `Create project`.
2. Provide a name for the project.

Note: The name of the project will be used for all created otomi resources (build, workload and service).
Note: The name of the project will be used for all created otomi resources (build, workload and service).

1. Select `Create build form source` or `Use an existing image`
2. If `Create build from source` is selected: follow the [instruction](builds.md) for creating a Build
3. If `Use an existing image` is selected: follow the [instruction](workloads.md) for creating a Workload
4. Follow the [instruction](services.md) for creating a Service to expose the workload

5. Click `Submit` and then `Deploy changes`
5. Click `Submit` and then `Deploy changes`
11 changes: 5 additions & 6 deletions docs/for-devs/console/workloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@ Ask your platform administrator to activate Argo CD to be able to use this featu

All known Workloads of the team are listed here.

| Property | Description |
| ------------- | ------------------------------------------------------ |
| Name | The name of the workload |
| Argocd | Link to the Argo CD application in the Argo CD UI |

| Property | Description |
| -------- | ------------------------------------------------- |
| Name | The name of the workload |
| Argocd | Link to the Argo CD application in the Argo CD UI |

## Create a Workload

Before creating a workload from the developer catalog, we'll need the `repository` and `tag` of the image you would like to use.

1. Go to the list of Builds and add the `repository` of the build to use to your clipboard. Remember the tag.

2. Go to `Workloads` in the right menu and click on `New Workload`
2. Go to `Workloads` in the left menu and click on `New Workload`

3. Add a `Name` for the workload

Expand Down
62 changes: 31 additions & 31 deletions docs/for-devs/get-started/lab-11.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Before creating a workload from the developer catalog, we'll need the `repositor

You can now create a workload from the developer catalog:

1. Go to `Workloads` in the right menu and click on `New Workload`
1. Go to `Workloads` in the left menu and click on `New Workload`

2. Add the Name `green` for the workload

Expand Down Expand Up @@ -53,40 +53,40 @@ Now go to the `green` repo in Gitea and change the color in the `green.html` to
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sample Deployment</title>
<style>
body {
color: #ffffff;
background-color: orange
font-family: Arial, sans-serif;
font-size: 14px;
}
h1 {
font-size: 500%;
font-weight: normal;
margin-bottom: 0;
}
h2 {
font-size: 200%;
font-weight: normal;
margin-bottom: 0;
}
</style>
</head>
<body>
<div align="center">
<h1>Welcome to Orange</h1>
</div>
</body>
<head>
<meta charset="utf-8" />
<title>Sample Deployment</title>
<style>
body {
color: #ffffff;
background-color: orange
font-family: Arial, sans-serif;
font-size: 14px;
}
h1 {
font-size: 500%;
font-weight: normal;
margin-bottom: 0;
}
h2 {
font-size: 200%;
font-weight: normal;
margin-bottom: 0;
}
</style>
</head>
<body>
<div align="center">
<h1>Welcome to Orange</h1>
</div>
</body>
</html>
```

And commit changes.

After the change has been committed, go to `Services` in the left menu and click on the Url of the `green` service. After a couple of minutes (note that the auto image update checks for changes every 2 minutes) you should see an `orange` page saying `Welcome to Orange`

Now go to `Services` in the left menu and click on the Url of the `green` service. What do you see?
Now go to `Services` in the left menu and click on the Url of the `green` service. What do you see?
6 changes: 3 additions & 3 deletions docs/for-devs/get-started/lab-13.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ As a developer, you'll have the following options to deploy serverless workloads

## About the Developer Catalog

The Developer Catalog in Otomi is a curated list of Helm charts that can be used in workloads to create Kubernetes resources. The catalog by default only contains a set of Otomi quick start Helm charts.
The Developer Catalog in Otomi is a curated list of Helm charts that can be used in workloads to create Kubernetes resources. The catalog by default only contains a set of Otomi quick start Helm charts.

## Create a Workload from the Developer Catalog

Before creating a workload from the developer catalog, we'll need the `repository` and `tag` of the image to use. Go to the list of Builds and add the `repository` of the `blue` build to your clipboard. Remember that the tag is `latest`.

You can create a workload from the developer catalog:

1. Go to `Workloads` in the right menu and click on `New Workload`
1. Go to `Workloads` in the left menu and click on `New Workload`

2. Add the Name `blue` for the workload

Expand All @@ -45,4 +45,4 @@ Now click on `Deploy Changes`

After a few minutes, Otomi will have created all the needed Argo CD resources to deploy your workload. In the workloads list, click on the `Application` link of your workload to see the status of your workload in Argo CD.

The values of a workload can be changed at any time. Changes will be deployed automatically.
The values of a workload can be changed at any time. Changes will be deployed automatically.
9 changes: 2 additions & 7 deletions docs/for-devs/get-started/lab-14.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Otomi uses Knative serving for serverless (or Function as a Service) support.
As a developer, you'll have the following options to deploy serverless workloads:

- BYO Knative service manifest and deploy it using kubectl or ArgoCD
- Create workloads with the deployment Helm chart in `otomi-charts`
- Create workloads with the deployment Helm chart in `otomi-charts`
- Create workloads with the Knative Helm chart in `otomi-charts`

In this lab we're going to create a workload in Otomi to create a Knative service using the knative chart in `otomi-charts`.
Expand All @@ -22,7 +22,7 @@ In this lab we're going to create a workload in Otomi to create a Knative servic

You can create a workload to deploy your own Helm chart, or you can use one of the `otomi-charts` Helm charts. In this case we'll use the deployment chart in the `otomi-charts` repository.

1. Go to `Workloads` in the right menu and click on `New Workload`
1. Go to `Workloads` in the left menu and click on `New Workload`

2. Choose `Function as a Service`

Expand Down Expand Up @@ -75,9 +75,4 @@ The values of a workload can be changed at any time. Changes will automatically
- Under `Exposure Ingress`, select `Ingress` and use the default configuration

- Click on `Submit`

- Click on `Deploy Changes` (the Deploy Changes button in the left panel will light-up after you click on submit).




5 changes: 1 addition & 4 deletions docs/for-devs/get-started/lab-17.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ So now you know how to scan container images when pushed to Harbor. But what if

When Trivy is enabled by the platform admin and Otomi runs in multi-tenant mode, then each team will see the Trivy scan results for all containers deployed within the Team, in a Trivy dashboard in Grafana.

- In the right menu, click on `apps`
- In the left menu, click on `apps`
- Click on `Grafana`
- Open the Trivy scan results dashboard

In the dashboard you can see all identified vulnerabilities per container:

![kubecfg](../../img/trivy-dashboard.png)



5 changes: 1 addition & 4 deletions docs/for-devs/get-started/lab-26.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In the previous lab we created a build in Otomi using the `blue` repo in Gitea.

## Create a build in Otomi with Trigger enabled

1. In the right menu, click on `Build`
1. In the left menu, click on `Builds`
2. Click on `Create Build`
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.
Expand Down Expand Up @@ -45,6 +45,3 @@ The build should now have started. Based on the webhook, Tekton has now created
3. Tekton Dashboard will open and show a list of all the PipelineRuns
4. Click on the PipelineRun with the name `docker-trigger-build-green-*`
5. You can now see the status of the build



4 changes: 2 additions & 2 deletions docs/for-devs/get-started/lab-27.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ git push --mirror https://gitea.<your-domain>/<your-user-name>/petclinic.git

Go to the list of Builds and add the repository of the `petclinc` build to your clipboard. Remember that the tag is latest.

1. Go to `Workloads` in the right menu and click on `New Workload`
1. Go to `Workloads` in the left menu and click on `New Workload`

2. Add the Name `petclinic` for the workload

Expand Down Expand Up @@ -102,4 +102,4 @@ Click on a log entry of a request. Note that the requests are logged by the Isti

And when you click on the Node graph, you’ll see the complete flow:

![Team apps](../../img/traces-loki-nodes.png)
![Team apps](../../img/traces-loki-nodes.png)
8 changes: 2 additions & 6 deletions docs/for-devs/get-started/lab-28.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ For this lab we need the 2 images (`blue` and `green`) we already created in the

Go to the list of Builds and add the repository of the `green` build to your clipboard.

1. Go to `Workloads` in the right menu and click on `New Workload`
1. Go to `Workloads` in the left menu and click on `New Workload`

2. Add the Name `canary` for the workload

Expand Down Expand Up @@ -58,7 +58,7 @@ We now created 2 deployments. One for `blue` and one for `green`. The `green` im

- In the left menu panel under click `Services` then click on `Create Service`

- Select the `canary` service
- Select the `canary` service

- Under `Traffic Control` click `enabled` (and use the default weights for v1 and v2)

Expand All @@ -78,14 +78,10 @@ After a refresh of the page you should see:

![Team apps](../../img/canary-v2.png)


## Update the canary image

Go to the `green` repo and change the `background-color` in the `green.html` file from `green` to `MediumSeaGreen` and commit the change. After a couple of minutes you should now see the background color of version 1 (our canary) changed:

![Team apps](../../img/canary-v2-mediumgreen.png)

Do you see the difference?



62 changes: 32 additions & 30 deletions docs/for-devs/get-started/lab-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ Add `Dockerfile`:

```Dockerfile
FROM nginxinc/nginx-unprivileged:stable
COPY blue.html /usr/share/nginx/html/index.html # change to green.html in the green repo!
# change to green.html in the green repo!
COPY blue.html /usr/share/nginx/html/index.html
EXPOSE 8080
```

Expand All @@ -63,34 +64,35 @@ Add `blue.html`:
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sample Deployment</title>
<style>
body {
color: #ffffff;
background-color: blue; # change to green in the green repo!
font-family: Arial, sans-serif;
font-size: 14px;
}
h1 {
font-size: 500%;
font-weight: normal;
margin-bottom: 0;
}
h2 {
font-size: 200%;
font-weight: normal;
margin-bottom: 0;
}
</style>
</head>
<body>
<div align="center">
<h1>Welcome to Blue</h1> # change to green in the green repo!
</div>
</body>
<head>
<meta charset="utf-8" />
<title>Sample Deployment</title>
<style>
body {
color: #ffffff;
background-color: blue; # change to green in the green repo!
font-family: Arial, sans-serif;
font-size: 14px;
}
h1 {
font-size: 500%;
font-weight: normal;
margin-bottom: 0;
}
h2 {
font-size: 200%;
font-weight: normal;
margin-bottom: 0;
}
</style>
</head>
<body>
<div align="center">
<h1>Welcome to Blue</h1>
# change to green in the green repo!
</div>
</body>
</html>
```
11 changes: 5 additions & 6 deletions docs/for-devs/get-started/lab-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@ sidebar_label: Build images
Harbor needs to be activated for this lab.
:::

When your team is using Harbor for private image registries and Tekton is enabled, you can build images from source using pre-configured Tekton pipelines using the [paketo](https://buildpacks.io/docs/buildpack-author-guide/package-a-buildpack/) task or the [Kaniko](https://github.com/GoogleContainerTools/kaniko) task to build images from application source.
When your team is using Harbor for private image registries, you can build images from source using pre-configured Tekton pipelines using the [paketo](https://buildpacks.io/docs/buildpack-author-guide/package-a-buildpack/) task or the [Kaniko](https://github.com/GoogleContainerTools/kaniko) task to build images from application source.

## Build the blue image

1. In the right menu, click on `Build`
1. In the left menu, click on `Builds`
2. Click on `Create Build`
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.
6. Click `Submit`

Otomi will now create all the Tekton resources to build the image. To see the status of the build, click on `PipelineRun` of your build in the list of Builds. This will open the Tekton Dashboard and show the status of the PipelineRun of the build.
4. Choose `Docker` and fill in the repo URL for the `blue` repo created in the previous lab.
5. Click `Submit`

Otomi will now leverage Tekton Pipeline to build the image. To see the status of the build, go to Tekton App and click on `PipelineRun` of your build in the list of Builds. This will open the Tekton Dashboard and show the status of the PipelineRun of the build.

When the build is ready you can see the image in Harbor:

Expand Down
2 changes: 1 addition & 1 deletion product/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ We are dedicated to maintain support for three different Kubernetes versions wit
| v2.0.0 | 1.25, 1.26, 1.27 | 2023-11-28 |
| v3.0.0 | 1.26, 1.27, 1.28 | 2024-03-28 |

# Milestons
# Milestones

## 2023 Q4

Expand Down

0 comments on commit 4a1634e

Please sign in to comment.