Environment Setup
This tutorial was developed and tested with:
|
Workshop Tools
The following tools are required to run the exercises in this tutorial. Please ensure that they are installed and properly configured before proceeding with any of the tutorial chapters.
Tool | Reference |
---|---|
|
|
|
Red Hat Cloud-native Development Workshop Prerequisites
Red Hat OpenShift Dev Spaces
You can use the Red Hat OpenShift Container Platform web console to install Red Hat OpenShift DevSpaces by following these steps:
-
Open a browser window and log in to the Red Hat OpenShift Container Platform web console.
-
From the Administrator perspective, click on
Operators
and then selectOperatorHub
. -
In the
Filter by keyword
field, typedevspaces
.
-
Select the Red Hat OpenShift Dev Spaces tile and click
Install
button.
-
On the Install Operator page, select
stable
from the list of available Update Channel options, and then chooseAll namespaces on the cluster (default)
. Leave the default value of Installed Namespace asopenshift-operators(Operator recommended)
, and set the Update Approval to Automatic.
-
Click
Install
.
Once the operator installation finishes, create a project named demo-devspaces
and deploy a CheCluster
by following these steps:
-
From the Administrator perspective, click on
Installed Operators
. -
Select
Red Hat OpenShift Dev Spaces
.
-
Click on
Red Hat OpenShift Dev Spaces instance Specification
, selectCurrent namespace only
and then click onCreate CheCluster
.
-
Set a desired name for the CheCluster, for example
devspaces
, and click onCreate
. -
Wait for the
CheCluster
deployment to finish. When it’s available, navigate toNetworking
, thenRoutes
, and open the devspaces route.
If the DevSpaces
dashboard loads correctly, it means that the installation process went without any issues.
Red Hat OpenShift Pipelines
You can use the Red Hat OpenShift Container Platform web console to install Red Hat OpenShift Pipelines by following these steps:
-
Open a browser window and log in to the Red Hat OpenShift Container Platform web console.
-
From the Administrator perspective, click on
Operators
and then selectOperatorHub
. -
In the
Filter by keyword
field, typeopenshift pipelines
.
-
Select the Red Hat OpenShift Pipelines tile and click
Install
button.
-
On the Install Operator page, select
pipelines-1.9
from the list of available Update Channel options, and then chooseAll namespaces on the cluster (default)
. Leave the default value of Installed Namespace asopenshift-operators
, and set the Update Approval to Automatic.
-
Click
Install
.
Red Hat OpenShift GitOps
You can use the Red Hat OpenShift Container Platform web console to install Red Hat OpenShift GitOps by following these steps:
-
Open a browser window and log in to the Red Hat OpenShift Container Platform web console.
-
From the Administrator perspective, click on
Operators
and then selectOperatorHub
. -
In the
Filter by keyword
field, typeopenshift gitops
.
-
Select the Red Hat OpenShift GitOps tile and click
Install
button.
-
On the Install Operator page, select
gitops-1.7
from the list of available Update Channel options, and then chooseAll namespaces on the cluster (default)
. Leave the default value of Installed Namespace asopenshift-operators
, and set the Update Approval to Automatic.
-
Click
Install
.
CI/CD Environment
In this section, we will deploy all the components of the CI/CD environment. The environment is composed of a Gitea git server, a Sonatype Nexus and a SonarQube server.
We have an existing Spring application that we want to migrate to Quarkus because we are interested in taking the advantatge of the benefits provided by the supersonic subatomic Java framework!
We will be working with a modififed, prepared, and adapted version of the CI/CD Demo with Tekton and Argo CD on OpenShift
, created by Siamak Sadeghianfar and contributors. The original repository is available here: https://github.com/siamaksade/openshift-cicd-demo.
However, for this workshop, we will be using a version available here: https://github.com/aolle/openshift-cicd-demo/tree/cnd, specifically in the cnd
branch.
To install the CI/CD environment, simply clone that branch and proceed as follows:
git clone -b cnd https://github.com/aolle/openshift-cicd-demo.git
./openshift-cicd-demo/demo.sh install
Make sure that you have already logged in into your OpenShift cluster before executing the commands. Additionally, make a note of the URLs of the services that the installation script provides. |
Verify that the environment has been installed without any issues by opening the different URLs and checking the login and the landing pages. Check that we have two repositories avabilable in Gitea: quarkus-petclinic and quarkus-petclinic-config.
The list of the default credentials (username / password) is as follows: Gitea: gitea / openshift | Sonatype Nexus: admin / admin123 | SonarQube: admin / admin | Argo CD: login with OpenShift credentials |
Gitea git server
Sonatype Nexus
SonarQube
Argo CD