Deployment and management of an application

Context

Our application airports-frontend is a frontend written in quarkus and displaying airports as well as planes moving between airports. However, on this workshop, we will only deal with the frontend and we will not see the planes moving.

Our application being more and more critical, it was decided to deploy it on 2 different clusters.

Objective of the exercise

The objective of this exercise is to deploy our airports-frontend application in multi-cluster mode using the OpenShit Advanced Cluster Managment mechanisms.

Exercise steps

From the OpenShift Hub cluster, access the ACM interface. To do this, at the top of the screen, click on local-cluster then All Clusters:

ACM Console

Then go to the Applications section

ACM Applications

Up to you

1 - Deployment on the development cluster

  • Create a Subscription type application (Application Set type would need the installation of argoCD which is not what we want here)
  • Its name will be <YOUR_CITY>-airports-frontend
  • Its namespace will be <YOUR_CITY>-ns
  • Repository Git based on airports-frontend
  • Branch: main
  • Path: k8s
  • Deploy the application on the Cluster sets global and choose 1 label identifying ONLY our development cluster

Tip: you can find all the labels for each cluster in the Infrastructure menu

  • Check in the Topology tab that the application has been deployed on the right cluster (you can also connect to the OpenShift console of the Dev cluster and check that the new namespace contains your application)

Solution

Guided solution

2 - Deployment on the Dev and Prod cluster simultaneously

  • Return to your application <YOUR_CITY>-airports-frontend
  • Edit there
  • Create a new placement rule using a label common to the 2 clusters
  • Observe and verify that your application is deployed on the 2 clusters

Solution

Guided solution

3 - BONUS exercise: GitOps with ACM

We will observe the GitOps mechanisms offered by ACM: to do this, you will REQUIRED have a GitHub account.

  • Connect with your personal login to GitHub
  • Fork the repository https://github.com/workshop-opp/airports-frontend
  • Modify the <YOUR_USER>-airports-frontend application to use the repository you just forked (https://github.com/<YOUR_USER_GITHUB/airports-frontend)
  • Change the number of replicas in the k8s/deployment.yaml file in YOUR account’s repository
  • Observe the change in the number of PODs deployed