Configure Environments

Environments can be configured at the daemon level and managed using the Tideways UI.

Configuration in the Daemon

By default each daemon assumes it is running for the production environment of the project. You can pass the --env flag to start the daemon for a different environment, by creating or modifying the configuration file /etc/default/tideways-daemon to contain:

Configure the Tideways daemon environment using a configuration file
# File: /etc/default/tideways-daemon
# Change "staging1" below as desired. The default is "production"
TIDEWAYS_DAEMON_EXTRA="--env=staging1"

Alternatively the TIDEWAYS_ENVIRONMENT environment variable can be passed to the daemon, for example when running the daemon inside a docker container.

Make sure to restart the daemon, if you make this change.

After updating the daemon configuration and restarting the daemon, the daemon’s log file (/var/log/tideways/daemon.log) should show that the environment is in use. The new environment will be created as soon as a daemon collects data for it.

In the following example, on line three, you can see that the environment in use is staging1.

2017/09/14 13:48:05 Starting up daemon (version 1.5.9)
2017/09/14 13:48:05 Sending to https://app.tideways.io
2017/09/14 13:48:05 Sending for Environment 'staging1'

See the Daemon Reference Documentation for more information.

Managing Environments in the UI

You can see a list of all environments, create new ones, and toggle which environments are active, from Settings  Servers & Environments  Environments.

Create an Environment

Create an environment in the Tideways UI

To create a new environment, click Create Environment in the top right-hand corner of the Environments section, which takes you to the "Create Environment" form.

Enter a name for the environment and press the Save button, you will be redirected back to the Environments list, where you will see the new environment in the list of available environments, already active.

Change the Default Environment

In the Settings  Servers & Environments dialog, the default environment can be changed from "production" to another environment.

Changing the default environment has an impact on the traces/minute calculation, history collection and the weekly report. These are explained in the change default environment dialog.

Deactivate an Environment

Deactivate an environment in the Tideways UI

To deactivate an active environment, click Deactivate on the far right-hand side of its row in the environment’s list. After doing so, you’ll see its status change to Inactive.

Edit an Environment

To edit an existing environment, click (Edit) in the Production column for that environment.

Pick an environment to edit in the Tideways UI

After doing so, you will be on the "Promote Environment development" form. From there, you can promote the environment to production, and assign 0, 5, 10, 25, and 50 extra traces per/minute to the environment.

Edit an application environment using the Tideways UI

After setting the respective values in the form, click Change Environment Settings to apply the changes, and you will be back at the Environments list.

Multiple Production Environments

 This feature is only available for projects with a Pro license.

Projects with the Pro licence are allowed to promote the other environments to production with increased data retention and more than one trace per minute. These extra traces are subtracted from the traces limit of the default "production" environment.

After creating a new environment for example "dev", navigate to Settings  Servers & Environments for the selected project.

image


For example promote the "dev" environment to production and assign more traces per minute click on 'Edit'-Link.

image

The following settings can be modified for each environment:

Setting

Behaviour

Promote to production flag

Increases the data retention and monitoring details

Assign extra traces/minute

Tideways distributes the total number of traces according to your project license. Increasing this value will subtract from the current traces limit of the default "production" environment.

image

If more than one 'production' environment exists, it looks like this.

image

Further Reading

Still need help? Email [email protected]