Skip to content

Commit

Permalink
docs: add environment cloning and how-to guide (#2249)
Browse files Browse the repository at this point in the history
* docs: add environment cloning and how-to guide

* add next steps in how-to, update reference

* update how-to, add images

* Update website/docs/how-to/how-to-clone-environment.mdx

Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>

* Update website/docs/how-to/how-to-clone-environment.mdx

Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>

* Update website/docs/user_guide/environments.md

Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>

* Update website/docs/how-to/how-to-clone-environment.mdx

Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>

* Update website/docs/user_guide/environments.md

Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>

* Update website/docs/how-to/how-to-clone-environment.mdx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update website/docs/how-to/how-to-clone-environment.mdx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update website/docs/how-to/how-to-clone-environment.mdx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update website/sidebars.js

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update website/docs/how-to/how-to-clone-environment.mdx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update website/docs/how-to/how-to-clone-environment.mdx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update website/docs/how-to/how-to-clone-environment.mdx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update website/docs/user_guide/environments.md

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update website/docs/user_guide/environments.md

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* address PR comments

* Update website/docs/how-to/how-to-clone-environments.mdx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update website/docs/user_guide/environments.md

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update website/docs/user_guide/environments.md

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update website/docs/user_guide/environments.md

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* fix uppercase in guide

Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
  • Loading branch information
3 people committed Nov 3, 2022
1 parent 0de0da8 commit 20310bf
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 1 deletion.
39 changes: 39 additions & 0 deletions website/docs/how-to/how-to-clone-environments.mdx
@@ -0,0 +1,39 @@
---
title: How to clone environments
---

:::info availability

Environment cloning is an upcoming feature, and is scheduled to become available in one of the next few releases.

:::

[Environment cloning](../user_guide/environments.md#cloning-environments) enables Unleash admins to duplicate existing environments, including all feature toggles strategies and their state.

## Step 1: Navigate to the environments page {#step-1}

Navigate to the _Environments_ page in the admin UI (available at the URL `/environments`). Use the navigation menu item "Configure" and select "Environments".

![The admin UI navigation "Configure" submenu with the Environments item highlighted.](/img/clone-environment-1.png)

## Step 2: Select an environment to clone {#step-2}

Select an environment to clone. On the right side, open the actions submenu and select "Clone".

![The "production" environment actions submenu with the Clone option highlighted.](/img/clone-environment-2.png)

## Step 3: Fill in the clone environment form {#step-3}

Give your new environment a name. The name must be unique and cannot be the same as the original environment. The name is pre-filled with a suggestion, but you can change it to whatever you like.

Select an environment type, which projects should have their environment configuration cloned, and whether to keep the existing user permissions for the new environment.

![The clone environment form filled with some example data, and the Clone environment button highlighted at the bottom.](/img/clone-environment-3.png)

You can optionally generate an API token for the new environment right away. Select which projects the token should have access to, and the token will be generated when you submit the form.

![The clone environment form with the API Token section highlighted and the Generate an API token now option selected](/img/clone-environment-4.png)

![The token details with the "Copy Token" element highlighted.](/img/clone-environment-5.png)

You can always create API tokens for the new environment by following the [_Generating an API token_](../user_guide/token.mdx) guide.
23 changes: 22 additions & 1 deletion website/docs/user_guide/environments.md
Expand Up @@ -56,6 +56,27 @@ In order for the SDK to download the feature toggle configuration for the correc

![An API key creation form. The form's fields are "username", "token type", "project", and, crucially, "environment". The development environment is selected.](/img/environments_api_keys.png 'Create Environment specific API Keys')

## Cloning environments

:::note Availability

Environment cloning is an upcoming feature, and is scheduled to become available in one of the next few releases.

:::

Unleash environments can be cloned. Cloning an environment creates a **new** environment based on the selected source environment. When cloning an environment, you select any number of projects whose feature toggle configurations will also be cloned. These projects will have identical configurations for the source and target environments. However, the environments can then be configured independently and will not stay in sync with each other.

When cloning an environment, you must give the new environment
- a name
- an environment type
- a list of projects to clone feature configurations in

You can also clone user permissions into the new environment. When you do that, permissions in the new environment will be the same as in the environment you cloned from. If you don't clone permissions, only admins and project editors can make changes in the new environment. You can change permissions after creation by using [custom project roles](../user_guide/rbac#custom-project-roles).

In order to clone an environment, you can follow the [how to clone environments](../how-to/how-to-clone-environments.mdx) guide.

Once created, the new environment works just as any other environment.

## Migration

To ease migration we have created a special environment called “default”. All existing activation strategies have been added to this environment. All existing Client API keys have also been scoped to work against the default environment to ensure zero disruption as part of the upgrade.
Expand Down Expand Up @@ -110,7 +131,7 @@ In order to support configuration per environment we had to rebuild our feature
- Will get access to two preconfigured environments: “development” and “production”. Existing users of Unleash will also get an additional “default” environment to simplify the adoption of environments.
- Will be possible to turn environments on/off for all projects
- Will be allowed to update and remove environments.
- Will be allowed to create new environments.
- Will be allowed to create new environments and clone existing environments.

## Rollout Plan

Expand Down
11 changes: 11 additions & 0 deletions website/sidebars.js
Expand Up @@ -102,6 +102,17 @@ module.exports = {
slug: '/how-to/misc',
},
},
{
label: 'Environments',
items: ['how-to/how-to-clone-environments'],
type: 'category',
link: {
type: 'generated-index',
title: 'How-to: environments',
description: 'Environments how-to guides.',
slug: '/how-to/env',
},
},
{
label: 'Users and permissions',
items: [
Expand Down
Binary file added website/static/img/clone-environment-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/clone-environment-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/clone-environment-3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/clone-environment-4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/clone-environment-5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 20310bf

Please sign in to comment.