diff --git a/website/docs/how-to/how-to-clone-environments.mdx b/website/docs/how-to/how-to-clone-environments.mdx new file mode 100644 index 00000000000..01883e273ca --- /dev/null +++ b/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. diff --git a/website/docs/user_guide/environments.md b/website/docs/user_guide/environments.md index cd5681dab4a..5927a57a6b6 100644 --- a/website/docs/user_guide/environments.md +++ b/website/docs/user_guide/environments.md @@ -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 diff --git a/website/sidebars.js b/website/sidebars.js index 9f22bb96aec..9809cc98630 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -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: [ diff --git a/website/static/img/clone-environment-1.png b/website/static/img/clone-environment-1.png new file mode 100644 index 00000000000..78cc19791a9 Binary files /dev/null and b/website/static/img/clone-environment-1.png differ diff --git a/website/static/img/clone-environment-2.png b/website/static/img/clone-environment-2.png new file mode 100644 index 00000000000..9aff739f3fd Binary files /dev/null and b/website/static/img/clone-environment-2.png differ diff --git a/website/static/img/clone-environment-3.png b/website/static/img/clone-environment-3.png new file mode 100644 index 00000000000..d69534bcbf0 Binary files /dev/null and b/website/static/img/clone-environment-3.png differ diff --git a/website/static/img/clone-environment-4.png b/website/static/img/clone-environment-4.png new file mode 100644 index 00000000000..8ab2d688634 Binary files /dev/null and b/website/static/img/clone-environment-4.png differ diff --git a/website/static/img/clone-environment-5.png b/website/static/img/clone-environment-5.png new file mode 100644 index 00000000000..5798d5ca820 Binary files /dev/null and b/website/static/img/clone-environment-5.png differ