Bragi Docs Help

Environments

The Environments screen lets you manage the environments that make up your deployment chains, for example Develop, Test and Production. Environments are managed from Administration > Environments and require the 'Global Admin' role.

Deployment Chains

Each environment records the environment it deploys from, and those relationships form a chain rooted at a Develop environment. Develop is the only kind whose Configs can be edited; the rest are read-only and receive changes through Deployments.

A system can hold more than one Develop environment, each rooting a chain of its own. This is a licensed feature: see Multiple Develop Environments for why you would want one, how chains relate to each other, and how to set one up.

Environment Fields

  • Name: The display name for the environment, shown throughout Bragi including the environment dropdown in the navigation panel. Names must be unique.

  • Code: A stable identifier generated from the name, fixed once the environment is saved: spaces become underscores and anything that is not a letter, number or underscore is removed (for example UAT (Client A) becomes UAT_Client_A). Codes must be unique. See Environment Codes below for what the code is used for.

  • Definition: Classifies the environment as Develop, Test or Production. The definition controls behaviour: only Develop environments allow Configs to be edited, while the others are read-only and receive changes through Deployments. A system can hold only one Production environment, so Production cannot be picked once another environment has it. Stage is no longer offered; an environment that is already Stage keeps it and can still be edited.

  • Deploys From: The parent environment this one deploys from. A Develop environment roots its own chain, so choosing the Develop definition clears this field and locks it; everything else names the environment above it. These relationships form the deployment chain that the Compare and Deployment screens use to work out where a package can go.

  • Scheduler Paused: Pauses the scheduler for this environment.

  • Base Colour: The theme colour used for the Bragi UI when working in this environment, and for the header row in Excel exports. The Suggest button picks a colour that is visually distinct from the colours already used by your other environments.

The order environments are listed in

Environments are listed in the order of the deployment chains they sit in, here and everywhere else in Bragi, including the environment dropdown in the navigation panel. The primary Develop environment's chain comes first, followed by each other Develop environment's chain. Each chain is listed from its Develop environment down, with every environment directly under the one it deploys from. Where several environments deploy from the same one they are listed Test before Production, and by name within each.

An environment whose Deploys From does not lead back to a Develop environment is listed at the end.

Environment Codes

The code identifies an environment to everything that lives outside the Bragi database:

  • Scheduler configuration: The scheduler runs one worker per environment, configured by listing environment codes in its appsettings (BragiConfig:EnvironmentCodes). Each entry must match the code of an environment.

  • Logs: Scheduler and application log rows are stamped with the environment code, and the Log Viewer uses it to show a tab per environment.

  • Deployment packages: Packages record the source and target environment codes when they are created, which is how the Apply screen knows where a package deploys to without asking.

  • External procedures: bragi.external_set_config_job_next_scheduled identifies the environment by its code.

The code is generated from the name as you type, and you can edit it before the environment is first saved. Once saved, the code cannot be changed, and renaming the environment leaves it as it is. Everything listed above refers to the environment by its code, so a change would quietly break them.

The Primary Develop Environment

Most work in Bragi happens in a known environment: you are editing a Config in one, or deploying into one. A few things arrive with no environment to go on, and those resolve to the primary Develop environment:

  • The external API's Swagger key, when it is granted access to the system's Exports.

  • The code test harness (BootstrapBragiCodeTester), unless it is given an environment code to run against. A project downloaded with Download Project ZIP from another chain is given its chain's Develop environment code, so it runs where it was downloaded from; one from the main chain is not, and runs here.

The primary Develop environment is set when Bragi is upgraded to a version that supports more than one Develop environment, on the Develop environment the system already had. It is not shown or changed on this page. Adding another Develop environment never moves it, so adding a chain never changes where existing Code Configs and API clients resolve to.

The primary Develop environment cannot be deleted, and it has to stay a Develop environment. Its chain is also the one listed first, and the one every system is licensed for.

Adding an Environment

Adding an environment takes effect immediately in the Bragi UI: it appears in the environment dropdown and the scheduler pages without a restart. For its Jobs to actually run, the new environment's code must also be added to the scheduler's BragiConfig:EnvironmentCodes configuration, which requires a restart of the scheduler service.

Adding a Second Develop Environment

A new Develop environment starts a second, empty deployment chain. Set its Definition to Develop and leave Deploys From as -, then add the environments that deploy from it. See Adding a second chain for everything the new chain needs before it can be used.

02 October 2026