Enabling and Disabling Services
The Environment Details station in the Environment Administration portal provides a list of the Managed Services available to be used for the environment. This article gives an in depth explanation of how these services can be enabled and disabled for an environment, and the internal workings of what happens when an enable or a disable action is triggered.
There are three services which are core to any Mosaic environment.
Micro Frontend Service
Management System Service
These services are enabled by default when an environment is created, and are essential for the environment’s operation. Once these services are enabled, the toggle button which gives a user the ability to disable a service becomes inactive. This is because by design, these core services are not allowed to be disabled once they are enabled.
Other Managed Services
All other Managed Services in Mosaic, such as AxAuth, Encoding or Image can be enabled and disabled at environment administrator’s discretion.
Enabling a Service
A service can be enabled by clicking on the respective toggle button for the service which is in the OFF state, and then by either navigating away from the Environment Details station (this can be done by navigating to the same station by clicking on the environment breadcrumb as well) to confirm the state change.
When the service state change is confirmed, the Admin Service fires a command via the message broker to the respective service that it should now make itself enabled for the environment. The service will then execute the initialization of the service for that specific environment. This includes publishing the workflows, if there are any available for the service. If workflows are available for the service, the service fires another command to the Micro Frontend Service asking the workflows to be published to the environment.
After publishing the required workflows for the environment, the Micro Frontend Service will fire a message letting know that the publication of workflows is finished. Subsequently, the service will fire a message stating that the service has finished enabling.
Until the final message is fired by the service, the state toggle button will be inactive. Once the service enable finished message is received by the Admin Service, the service state toggle button will be active again.
Disabling a Service
All services except for the core services can be disabled once they are enabled. But what must be taken to account is that when a service is disabled, all data related to that service is purged. Once purged, this data will not be recoverable. The user will be asked to confirm the action of disabling the service for this reason. It is advisable to take these effects into account before disabling a service.
The service disabling can be done by clicking on an enabled service state toggle button and then by navigating away from the station to confirm the state change. Similar to service enabling, the Admin Service will send a message to the respective service that it needs to disable itself for the environment. Any workflows will be unpublished as well during the process through the Micro Frontend Service. Finally the service will fire a message to the Admin Service stating that the service disabling is completed. At this point, the service state toggle button will become active again, allowing the administrator to enable it again.
When Service Enabling or Disabling Fails
There can be instances where the service enabling fails. Even though this is a rare occurrence, it is a possibility. (One reason can be due to a validation failure from a service.) If this happens, the user will see that the service state toggle button does not get active.
Messaging in mosaic is designed with resilience in mind so that if it fails the first time, it will re-attempt multiple times to send the messages and complete the action.
Service Log Messages
The action button Service Log Messages in the Environment Details Station will navigate the user to the Service Log Messages station which logs all commands and messages shared through the message broker related to the environment/service enabling and disabling.
Service Configuration Hub
From the Environment Details station, a user can navigate to the Service Configuration Hub, through the Service Configuration action.
This station acts as a hub to to configure all configurable managed services. The user can navigate to various configuration options for each service by clicking on the relevant tile.
In case a certain service is not enabled for the environment and the user navigates to a configuration station, a message will be displayed on the top of the station indicating that the service must be enabled to make the configurations.