Environment presets

Create custom, unique resource pools for your environments.

Environment presets are preconfigured templates that encapsulate the necessary configurations required for a specific development setup. These presets streamline the process of setting up a development environment by eliminating the need for manual configuration, thus saving time and ensuring consistency across applications. For example, you can use an environment preset to create deterministic URLs for your environments for different applications.

In Release, Professional account-holders can create a preset and specify the number of resource URLs to use it with. One of these resource handles can be "checked out" by an environment, which will then display the handle in its domain name.

For example, the end result of your environment handle being inserted into an environment's domain URL would look something like this:

https://service-${env_id}-appname.releaseapp.io

This is no different to a regular ephemeral environment space, except that your environment handle ${env_id} is allocated from the handle pool.

Create an environment handle

Select the Environment Presets tab in Configuration. On the Environment Presets page, click the Create Environment Preset button.

Enter a name for your handle and how many handles you need as well as the item checkout strategy. Click Create Environment Preset.

Unique Presets

You can also create up to 50 unique resource URLs for a given preset. Release will automatically increment the number at the end of the handle name to ensure that each environment has a unique URL.

Alternatively, you can choose a theme for your environment handle, such as "Cats" or "Dogs". Release will then automatically assign a unique number to the end of the handle name, such as "persian" or "labrador".

View Unique Present Handles

In the Environment Preset Details page, you can see the name of each resource handle and which environment currently has it checked out. Notice how each resource handle name is assigned a unique name that relates to the chosen theme. This is what will appear in the environment's URL.

Add the environment handle to your Application Template

In order for an environment to check out a unique handle, add the following to your Application Template:

environment_templates:
- name: ephemeral
  datasets:
  - name: handle_name

URL handle pools are only applied during environment creation and cannot be changed or applied retroactively to an existing environment.

Environment-specific environment variables

Environment presets allow you to set specific environment variables for each unique environment. For example, you may have a set of third-party service tokens that require a unique ID for each environment for testing purposes. This is a common pattern for services like Firebase or Twilio. You can provide each environment with a specific set of environment variables to be applied to that environment.

To add an environment variable to a unique preset, click the Edit button.

In the Environment Preset Details page, click the Add Environment Variable button. Insert the key and value in the relevant fields and click the check mark to save your changes.

Last updated