Start and shutdown
MDM (Equipment, Process, Material) services are computed to the docker images: equipment-management-service, process-service, material-service, gateway-service.
For both Azure anb OnPremise environments, the docker images are handled by Kubernetes. Each service uses a DB migration job that is configured as a k8s dependency: the service will wait for the job to complete before it is allowed to start. Kubernetes will handle all this synchronization between the job and all instances of the service:
-
Each job runs only once. If it fails, it will be restarted by kubernetes. If it completes it will never be run again.
-
This scenario optimizes the DB migration when using horizontal scaling: All the instances of the same service will wait for one single DB migration job
-
The job can run the DB migration scripts without multiple overlapping instances
-
The job will not be affected by the k8s liveness / readiness probes.
To certify that MDM application is started or not you should use the health check endpoint response: if the response status code is 200 and health_response.health == 'healthy' then services are started and healthy.