In this module you'll learn how to migrate a monolithic application to the cloud and how to fearlessly break it up into microservices. Therefore, we want to walk you through the different stages of identifying and extracting a microservice, as well as strangling it around its origin – the monolith. For this purpose, the module provides step-by-step instructions and labs showing the best practices we have identified for migrating a monolith to the cloud. This module goes along with a blog post series, which you can find here. Please take a look at the different blog posts to learn more about certain migration steps.
-
Clone the repository from monolith to microservices
git clone https://github.com/dynatrace-innovationlab/monolith-to-microservice-openshift.git -
Create the project in OpenShift
oc login <OurClusterIP:port>- User:
userXX(XXis your assigned number) - Password: ask instructor
- User:
-
After the successful login, create your own project:
oc new-project <project-XX> -
Set up a management zone for your OpenShift project
- Login to the Dynatrace tenant: tenant-url (Please ask instructor for Dynatrace tenant and login credentials.)
- Go to Settings, Preferences, and click on Management zones.
- Click Create management zone and set name to
project-XX(XXis your assigned number). - Click Add new rule and set rule applies to
Process groups. - As condition define:
Kubernetes namespace>begins with> enableCase sensitive> name of your projectproject-XX - Enable both checkboxes: Apply to underlying hosts of matching process groups and Apply to all services provided by the process groups
- Finally, click Save.
Some useful OpenShift CLI commands:
oc get pods: retrieve all podsoc get services: retrieve all servicesoc get routes: get all exposed routesoc delete all -l app=<yourappname>: delete an app and all assigned resources to this appoc logs <pod-name>: get the logs of a podoc rsh <pod-name>: open a remote shell on this pod
