1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-26 01:17:00 +02:00

docs: add environment cloning and how-to guide (#2249)

* 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>
This commit is contained in:
Nuno Góis 2022-11-03 12:14:08 +00:00 committed by GitHub
parent 0de0da8f97
commit 20310bf1a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 72 additions and 1 deletions

View File

@ -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.

View File

@ -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.
@ -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

View File

@ -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: [

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB