Create app configuration

Set up and manage base and environment-specific configuration for your microservice

About this page. Adapted from documentation I wrote for a government platform. Platform and team names, infrastructure details, repository names and internal references have been removed or replaced. The structure, the writing and the approach are as I wrote them.

Before you start

Your service needs configuration in two places: a base configuration that applies everywhere, and an environment configuration for each environment you deploy to. Several files, held in different repositories, control how your service behaves.

You need a repository created from the platform template, and you need to know which environments you will deploy to. Create an environment configuration file for every one of them.

Create the configuration files

  1. In the platform catalogue, select your service.
  2. Under Code, select Commissioning state.
  3. In the table, find the App config base or App config environment row and select Add.
  4. Complete the form and select the environments you will deploy to.
  5. Select Build.

The platform generates your files in the app-config-base and app-config-environments repositories, and raises a pull request for each.

What gets generated

Base configuration holds the settings that are the same everywhere. Environment configuration holds the values that differ, such as connection details and feature switches.

If your service uses a database, the environment files include a connection URI. The base file does not, because the connection differs per environment.

When changes take effect

Changes to base configuration are applied at your next deployment. You do not need to rebuild the artefact.

Check it worked

  1. Open each generated pull request, check the values are what you expect, and merge.
  2. In the platform catalogue, select your service, then under Code select Commissioning state and confirm the configuration shows as present.

If a value looks wrong and you are not sure what it should be, ask in your platform support channel rather than guessing. Once your configuration is in place, you can add your service to the service manager.

Create app configuration

Set up and manage base and environment-specific configuration for your microservice

About this page. Adapted from documentation I wrote for a government platform. Platform and team names, infrastructure details, repository names and internal references have been removed or replaced. The structure, the writing and the approach are as I wrote them.

Before you start

Your service needs configuration in two places: a base configuration that applies everywhere, and an environment configuration for each environment you deploy to. Several files, held in different repositories, control how your service behaves.

You need a repository created from the platform template, and you need to know which environments you will deploy to. Create an environment configuration file for every one of them.

Create the configuration files

  1. In the platform catalogue, select your service.
  2. Under Code, select Commissioning state.
  3. In the table, find the App config base or App config environment row and select Add.
  4. Complete the form and select the environments you will deploy to.
  5. Select Build.

The platform generates your files in the app-config-base and app-config-environments repositories, and raises a pull request for each.

What gets generated

Base configuration holds the settings that are the same everywhere. Environment configuration holds the values that differ, such as connection details and feature switches.

If your service uses a database, the environment files include a connection URI. The base file does not, because the connection differs per environment.

When changes take effect

Changes to base configuration are applied at your next deployment. You do not need to rebuild the artefact.

Check it worked

  1. Open each generated pull request, check the values are what you expect, and merge.
  2. In the platform catalogue, select your service, then under Code select Commissioning state and confirm the configuration shows as present.

If a value looks wrong and you are not sure what it should be, ask in your platform support channel rather than guessing. Once your configuration is in place, you can add your service to the service manager.

Create app configuration

Set up and manage base and environment-specific configuration for your microservice

About this page. Adapted from documentation I wrote for a government platform. Platform and team names, infrastructure details, repository names and internal references have been removed or replaced. The structure, the writing and the approach are as I wrote them.

Before you start

Your service needs configuration in two places: a base configuration that applies everywhere, and an environment configuration for each environment you deploy to. Several files, held in different repositories, control how your service behaves.

You need a repository created from the platform template, and you need to know which environments you will deploy to. Create an environment configuration file for every one of them.

Create the configuration files

  1. In the platform catalogue, select your service.
  2. Under Code, select Commissioning state.
  3. In the table, find the App config base or App config environment row and select Add.
  4. Complete the form and select the environments you will deploy to.
  5. Select Build.

The platform generates your files in the app-config-base and app-config-environments repositories, and raises a pull request for each.

What gets generated

Base configuration holds the settings that are the same everywhere. Environment configuration holds the values that differ, such as connection details and feature switches.

If your service uses a database, the environment files include a connection URI. The base file does not, because the connection differs per environment.

When changes take effect

Changes to base configuration are applied at your next deployment. You do not need to rebuild the artefact.

Check it worked

  1. Open each generated pull request, check the values are what you expect, and merge.
  2. In the platform catalogue, select your service, then under Code select Commissioning state and confirm the configuration shows as present.

If a value looks wrong and you are not sure what it should be, ask in your platform support channel rather than guessing. Once your configuration is in place, you can add your service to the service manager.