I'd like to have the service roles' configuration stored in repository. This way, service configuration can be shared between environments without the need to change the configuration via CM ui or rest API on each environment.
You can use the Cloudera Manager REST API to export and import all of its configuration data. The API exports a JSON document that contains configuration data for the Cloudera Manager instance. You can use this JSON document to back up and restore a Cloudera Manager deployment.