Skip to main content
Version: Deploy 22.3

Central Configuration as a Standalone Service

This section describes how to install Central Configuration service as a separate service when you install or upgrade the Digital.ai Deploy solution.

  • When you install Digital.ai Deploy, the Central Configuration feature is implemented by default on the application server (Master) as an embedded service.
  • If you have multi-master set up with external workers configured, the Central Configuration as an embedded service is sufficient. However, in a multi-master setup, the central configuration has to be manually copied to each Master, as the Central Configuration server resides on the Deploy Master instance. The Central Configuration as a standalone microservice solves this problem.

Note: The following procedures are applicable to both fresh installation and upgrade of Digital.ai Deploy.

Install Central Configuration as a Separate Microservice

After installing the Digital.ai Deploy solution, you can run the Central Configuration as a standalone service using one of the following methods:

  • Central configuration on a Docker container
  • Central Configuration on a Docker container with persistent Docker volumes

Important: We recommend the persistent Docker volumes method, as it allows you to persist data in the Docker containers when copying the container data across different servers. For more information about data persistence, see Persistent Configuration Setup.

Run Central Configuration Service on a Docker Container

Note: Ensure the Deploy server and the Central Configuration server (where you want to copy the centralConfiguration directory) are up and running.

  1. Run the Central Configuration server on the Docker container:

    docker run -d -p 8888:8888 --name central-configuration xebialabs/central-configuration:10.3
  2. Copy the centralConfiguration directory from Deploy server to the Docker container by running the command:

    docker cp centralConfiguration "container id":/opt/xebialabs/central-configuration-server/

  3. On the Central Configuration server, open the deployit.conf file, and add the following properties:

    xl.spring.cloud.uri=http\://<host name of the Central Configuration server>\:8888/centralConfiguration/
    xl.spring.cloud.external-config=true
  4. Copy xl.spring.cloud.encrypted.key from Deploy server to the deployit.conf file in the /opt/xebialabs/central-configuration-server/conf path of the Docker container.

  5. Restart the Docker container and the Deploy server.

  6. Repeat step 3 on all the Deploy masters and workers. This disables the embedded Central Configuration feature in the masters, and enables all the masters and workers to communicate with the Central Configuration standalone service.

Run Central Configuration Service on a Docker Container with Persistent Docker Volumes

Note: This method is recommended for installation on production environments.

  1. The file permissions of the Docker volume in the host and the container are identical. You must update the file permissions to work with docker volumes using host directory. To configure host directory as a volume:

    1. Create a user:

      sudo useradd -r -M -u 10001 -g 0 xebialabs
    2. The group ID (GID) of the root user is 0. Run the following commands to modify the group ownership of the folders that are used as volumes:

      sudo chown :0 /home/docker/volumes/conf/
      sudo chown :0 /home/docker/volumes/centralConfiguration/
    3. Run the following commands to modify the directory permissions and files ownership:

      sudo chmod 775 /home/docker/volumes/conf/
      sudo chmod 775 /home/docker/volumes/centralConfiguration/
      sudo chmod g+s /home/docker/volumes/conf/
      sudo chmod g+s /home/docker/volumes/centralConfiguration/
      sudo chown xebialabs:root -R /home/docker/volumes/centralConfiguration/
      sudo chown xebialabs:root -R /home/docker/volumes/conf/
  2. Copy xl.spring.cloud.encrypted.key from Deploy server to the deployit.conf file in the volume mapped to /opt/xebialabs/central-configuration-server/conf of the Docker container.

  3. Run the Central Configuration server on the Docker volume:

    docker run -p 8888:8888 -v /home/docker/volumes/conf:/opt/xebialabs/central-configuration-server/conf -v 
    /home/docker/volumes/centralConfiguration:/opt/xebialabs/central-configuration-server/centralConfiguration xebialabs/central-configuration
  4. Open the deployit.conf file on the Deploy master, and add the following properties: Note: Ensure the Deploy server is set up.

    xl.spring.cloud.uri=http\://<host name of the Central Configuration server>\:8888/centralConfiguration/
    xl.spring.cloud.external-config=true
  5. Start the Deploy server.

Running Central Configuration Service as a Standalone or Embedded Service

If you are running Central Configuration as a separate service and for some reason choose not to use it in the Deploy masters and workers any longer, you can switch back to Central Configuration as embedded service.

To run Deploy with an embedded Central Configuration service or use a standalone Central Configuration :

  1. In Deploy Master, open the deployit.conf file, and set the xl.spring.cloud.external-config as follows:
    • true—If you want to disable the embedded Central Configuration and use the Central Configuration standalone service
    • false—If you want to enable the embedded Central Configuration
  2. Restart the Deploy server.

Note: You can stop the Docker containers for Central Configuration if they are still running and not used by any of the Deploy masters and workers

Central Configuration for Deploy workers

You can configure the Deploy workers to use the Central Configuration service with the following properties in the deployit.conf file:

xl.spring.cloud.uri=http\://<host name of the Central Configuration server>\:PORT/centralConfiguration/
xl.spring.cloud.external-config=true
  • If you are using the Central Configuration embedded service in the Deploy masters, point the xl.spring.cloud.uri to the IP/PORT of the Deploy master or the load balancer if one of these is used.
  • If you are using the Central Configuration standalone service, point the xl.spring.cloud.uri to the IP/PORT of the Central Configuration standalone service.