menuCohesive docs

Setting up automations

Cohesive supports multiple automations to help your organization save time and effort.

Setup ephemeral instances

You can setup this automation for individual projects to automatically create instances on PR open on a specified branch. The preview URL of the newly launched environment is commented on your PR. This allows you to test every PR before it gets merged to the branch. The instances created will get automatically terminated once the PR is closed.

To setup this automation:

  1. Click on the Projects project icon icon in the left navigation panel.
  2. Click on the project for which you want to enable the automation.
  3. Under the Automations panel, click on New automation button.
  4. Select Setup ephemeral instance radio button.
  5. Enter a Name for your automation, select the branch and type of instance that should be created (public/ private)
  6. Click on Create button.

Environment/ Instance termination schedule

terminate-environment-img

This automation allows you to automatically terminate environments and instances when they are no longer needed. This is available under Settings -> Usage policy tab.

Terminate ephemeral instances

Ephemeral instances are the ones which are created as a result of some automation. For example: the instances which get automatically created on opening PRs. Enabling this automation will terminate all ephemeral instances after the specified period from their creation.

To enable this automation, simply click on the Ephemeral instances checkbox, specify the duration and Save the changes.

Terminate unused environments and instances

Enabling this automation will terminate all non-permanent, non-ephemeral environments and instances after specified period of inactivity. We determine inactivity based on deployments.

To enable this automation, simply click on the Unused environments & instances checkbox, specify the duration and Save the changes.

Scheduling Environment Hibernation

You can setup this automation for your organization to automatically hibernate environments and instances when they are not in use. We recommend scheduling environments to hibernate on nights and weekends, when environments are most likely to remain unused. This helps saving time and effort while preserving any data that environments hold.

To setup this automation:

  1. Click on the Settings settings icon icon in the left navigation panel.
  2. Under the Usage policy panel, scroll to the Environment/ Instance Hibernate schedule section.
  3. Add the Hibernate and Start up timings as per your needs. Eg: If you add 10pm as hibernate time and 10am as start up time, the environments will get paused between 10pm - 10am everyday.
  4. You can also choose to Hibernate all-day on weekends.
  5. Click on Save button.

Note: This will hibernate all environments and instances in your organization.