Skip to main content

Configurations

projects

What is a Configuration?

A Configuration is a set of data, settings and any other piece of information your application needs at runtime but cannot be provided as part of your code (at build time) as they:

  • depend on environment specifics, e.g. use test data source on QA, but production data on LIVE
  • contain secrets, like passwords, private keys, credentials
  • vary per region, e.g. APAC, EMEA
  • provide control flags, e.g. verbose logging on DEV, but rather restrained on LIVE

... and for many other reasons.

How to set config-data

You can manage Configurations per Stage on the UI, or via the CLI.

Configuration deployment

Changes on Configurations are persisted in the backend, but do not become active, visible to your application instantly. In order to deploy configuration changes to your application, you need to issue a new Release.

Depending on your application, you might also need to restart its affected Components in order to pick up (reload) configuration changes after a new Release. Pergola does not force a restart if not necessary. This is particularly the case when you deploy a new Release with changed Configuration but keep the same Build and your Components remain unchanged (none of their parameters have been changed).

Example

pergola add config-data my-new-config -p my-new-project -s my-new-stage --env foo=bar --env secret=00111101-00101001 --file /home/silas/example-config.json

When your config-data is set, you can check it with:

pergola list config-data my-new-config -p my-new-project -s my-new-stage

stage created

or

pergola list config-data my-new-config -p my-new-project -s my-new-stage --with-values

stage created