Skip to content

Commit f0a7f69

Browse files
committed
Gitea spec
1 parent 2015363 commit f0a7f69

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

content/2-prepare-cluster/_index.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,46 @@ weight = 5
88
Before you start you have to install a number of components you'll use during the workshop. The first two are `Gitea` for providing Git services in your cluster and `CodeReady Workspaces` as development environment. But fear not, both are managed by Kubernetes [operators](https://cloud.redhat.com/learn/topics/operators) on OpenShift.
99

1010
## Install and Prepare Gitea
11+
1112
We'll need Git repository services to keep our app and infrastructure source code, so let's just install trusted `Gitea` using an operator:
1213

1314
{{% notice tip %}}
14-
[Gitea](https://gitea.io/en-us/) is an OpenSource Git Server similar to GitHub. A team at Red Hat was so nice to create an Operator for it. This is a good example of how you can integrate an operator into your catalog that is not part of the default [OperatorHub](https://operatorhub.io/) already.
15+
[Gitea](https://gitea.io/en-us/) is an OpenSource Git Server similar to GitHub. A team at Red Hat was so nice to create an Operator for it. This is a good example of how you can integrate an operator into your catalog that is not part of the default [OperatorHub](https://operatorhub.io/) already.
1516
{{% /notice %}}
1617

1718
- If you don't already have the oc client installed, you can download the matching version for your operating system [here](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/)
18-
- Log into your OpenShift Webconsole with you cluster admin credentials
19+
- Log into your OpenShift Webconsole with you cluster admin credentials
1920
- On the top right click on your username and then **Copy login command** to copy your login token
2021
- On you local machine open a terminal log in with the `oc` command you copied
2122
- Now using `oc` add the Gitea Operator to your OpenShift OperatorHub catalog
23+
2224
```
2325
oc apply -f https://raw.githubusercontent.com/redhat-gpte-devopsautomation/gitea-operator/master/catalog_source.yaml
2426
```
27+
2528
- In the Web Console, go to **Operators > OperatorHub** and search for `Gitea` (You may need to disable search filters)
2629
- Install the `Gitea Operator` with default settings
2730
- Create a new OpenShift project called `git`
2831
- Go to **Installed Operators > Gitea Operator** and click on the **Create Instance** tile in the `git` project
2932

3033
<!-- ![Gitea](../images/gitea.png) -->
34+
3135
{{< figure src="../images/gitea.png?width=50pc&classes=border,shadow" title="Click image to enlarge" >}}
3236

33-
- On the **Create Gitea** page switch to the YAML view and make sure the following `spec` values are set:
37+
- On the **Create Gitea** page switch to the YAML view and add the following `spec` values :
3438

3539
```
3640
spec:
37-
giteaSsl: true
3841
giteaAdminUser: gitea
3942
giteaAdminPassword: "gitea"
4043
giteaAdminEmail: [email protected]
4144
```
45+
4246
- Click **Create**
4347

4448
After creation has finished:
45-
- Access the route URL (you'll find it e.g. in **Networking > Routes > repository > Location**)
49+
50+
- Access the route URL (you'll find it e.g. in **Networking > Routes > repository > Location**)
4651
- This will take you to the Gitea web UI
4752
- Sign-In to `Gitea` with user `gitea` and password `gitea`
4853
- Clone the example repo:
@@ -54,29 +59,30 @@ After creation has finished:
5459
In the cloned repository you'll find a `devfile.yml`. We will need the URL to the file soon, so keep the tab open.
5560

5661
## Install and Prepare CodeReady Workspaces (CRW)
62+
5763
- Install the **Red Hat CodeReady Workspaces for Devfile v1 and v2** Operator from OperatorHub (not the Tech Preview one!) with default settings
58-
- Go to **Installed Operators -> CodeReady Workspaces** and create a new instance (CodeReady Workspaces instance Specification) using the default settings in the project `openshift-workspaces`
59-
- Wait until deployment has finished. This may take a couple of minutes as several components will be deployed.
60-
- Once the instance status is ready (You can check the YAML of the instance: `status > cheClusterRunning: Available`), look up the `codeready` Route in the `openshift-workspaces` namespace (You may need to toggle the **Show default project** button).
64+
- Go to **Installed Operators -> CodeReady Workspaces** and create a new instance (**CodeReady Workspaces instance Specification**) using the default settings in the project `openshift-workspaces`
65+
- Wait until deployment has finished. This may take a couple of minutes as several components will be deployed.
66+
- Once the instance status is ready (You can check the YAML of the instance: `status > cheClusterRunning: Available`), look up the `codeready` Route in the `openshift-workspaces` namespace (You may need to toggle the **Show default project** button).
6167
- Open the link in a new browser tab, choose `htpasswd_provider` and log in with your OCP credentials
6268
- Allow selected permissions
6369
- Enter an email address, First Name and Last Name to set up your account (you can make these up).
6470

6571
{{% notice tip %}}
66-
We could create a workspace from one of the templates that come with CodeReady Workspaces, but we want to use a customized workspace with some additionally defined plugins in a [v1 devfile](https://redhat-developer.github.io/devfile/) in our git repo. With devfiles you can share a complete workspace setup and with the click of a button you will end up in a fully configured project in your browser.
72+
We could create a workspace from one of the templates that come with CodeReady Workspaces, but we want to use a customized workspace with some additionally defined plugins in a [v1 devfile](https://redhat-developer.github.io/devfile/) in our git repo. With devfiles you can share a complete workspace setup and with the click of a link and you will end up in a fully configured project in your browser.
6773
{{% /notice %}}
6874

6975
- At the top click on **Custom Workspace**
7076
- Copy the **raw**(!) URL of the `devfile.yml` file in your `Gitea` repository by clicking on the file and then on the **Raw** button (or **Originalversion** in German).
7177
- Paste the full URL into the **Enter devfile URL** field and click **Load Devfile**
72-
![Gitea](../images/crw.png)
78+
![Gitea](../images/crw.png)
7379
- Once the content of the devfile is loaded click on **Create & Open** at the button
74-
- You'll get into the **Starting workspace ...** view, give the workspace containers some time to spin up.
80+
- You'll get into the **Starting workspace ...** view, give the workspace containers some time to spin up.
7581

7682
When your workspace has finally started, have a good look around in the UI. It should look familiar if you have ever worked with VSCode or similar IDEs.
7783

7884
{{% notice tip %}}
79-
When working with CRW make sure you have AdBlockers disabled, you are not on a VPN and a have good internet connection to ensure a stable setup. If you are facing any issues try to releod the Browser window. If that doesn't help restart the workspace in the controls on **yellow arrow** at the top left side
85+
When working with CRW make sure you have AdBlockers disabled, you are not on a VPN and a have good internet connection to ensure a stable setup. If you are facing any issues try to releod the Browser window. If that doesn't help restart the workspace in the controls on **yellow arrow** at the top left side
8086
{{% /notice %}}
8187

8288
Your cluster is now prepared for the next step, proceed to the **Inner Loop**.

0 commit comments

Comments
 (0)