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

docs: Polish text on environments.

There's a number of small text adjustments and typo fixes in here with
the goal of clarifying how environments and the migration process work.
This commit is contained in:
Thomas Heartman 2021-11-11 15:36:41 +01:00
parent f2b3325d42
commit 8a41799731

View File

@ -4,7 +4,7 @@ title: Environments
--- ---
<div class="alert alert--info" role="alert"> <div class="alert alert--info" role="alert">
Environment is a new feature currently under beta. It can be enabled from <i>Unleash v4.2.x</i> with a feature toggle. We plan to make the environment feature general available from <i>Unleash v4.3.x</i>. <em>Environments</em> is a new feature currently in beta. It can be enabled from <i>Unleash v4.2.x</i> with a feature toggle. We plan to make the environment feature general available from <i>Unleash v4.3.x</i>.
</div> </div>
<br /> <br />
@ -13,13 +13,13 @@ title: Environments
<iframe src="https://www.loom.com/embed/95239e875bbc4e09a5c5833e1942e4b0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style={{position: 'absolute', top: '0', left: '0', width: '100%', height: '100%'}}></iframe> <iframe src="https://www.loom.com/embed/95239e875bbc4e09a5c5833e1942e4b0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style={{position: 'absolute', top: '0', left: '0', width: '100%', height: '100%'}}></iframe>
</div> </div>
Environments is a new way to organize activation strategy configurations for feature toggles into separate environments. In Unleash a feature lives across all your environments, after all, the goal is to get the new feature released as soon as possible. But it makes sense to configure the activation differently per environment. You might want the feature enabled for everyone in development, while only enable it for yourself in production. Environments is a new way to organize activation strategy configurations for feature toggles into separate environments. In Unleash, a feature lives across all your environments — after all, the goal is to get the new feature released as soon as possible — but it makes sense to configure the activation differently per environment. You might want the feature enabled for everyone in development, but only for yourself in production, for instance.
Unleash Enterprise users have been able to leverage strategy constraints to control the roll-out per environment. This will not be needed after the release as a "full group" of activation strategy will belong to an environment. Previously, Unleash Enterprise users have been able to leverage [strategy constraints](../advanced/strategy-constraints) to control the rollout across environments. With the new environments feature, this is no longer necessary. Now all activation strategies belong to an explicit environment instead.
Connected applications will also use environment scoped API keys, to make sure they only download feature toggle configurations for the environment they are running in. Further, connected applications will use environment-scoped API keys to make sure they only download feature toggle configurations for the environment they are running in.
Metrics has also been upgraded to record the environment, so that Unleash now can display the usage metrics per environment. Finally, metrics have also been upgraded to record the environment. This, in turn, means that Unleash can display usage metrics per environment.
@ -61,9 +61,10 @@ In order for the SDK to download the feature toggle configuration for the correc
## Migration ## 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 has also been scoped to work against the default environment, to ensure zero disruption as part of the upgrade. 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.
If you're currently using strategy constraints together with the “environment” field on the Unleash Context, you should be aware that the new environment support works slightly differently. With environments, the SDK API will use the client's API key to determine which environment the client is configured for. The API then sends _only_ strategies belonging to the client's environment. This means that you might not need the "environment" property of the Unleash Context anymore.
If you today are using strategy constraints together with the “environment” field on the Unleash Context you should be aware that the new environment support works slightly differently. Now the SDK will only download the activation strategies configured for a configured environment. The Unleash SDK API will know which environment to deliver to the SDK because the API token used by the SDK is scoped to a single environment. Because of this you will probably stop using “environment” on the Unleash Context.
@ -73,7 +74,9 @@ If you today are using strategy constraints together with the “environment”
### Addons ### Addons
We have slightly changed the events related to working with feature toggles. This means that you would need to change your addon configuration to also subscribe for the new events to not miss updates: We have made some slight changes to events related to feature toggles: there's one deprecation and several new event types. Most of the new events contain _project_ and _environment_ data.
To avoid missing important updates, you will also need to update your addon configuration to subscribe to the new events.
**Deprecated events:** **Deprecated events:**
* **FEATURE_UPDATE** - _not used after switching to environments_ * **FEATURE_UPDATE** - _not used after switching to environments_
@ -87,12 +90,12 @@ We have slightly changed the events related to working with feature toggles. Thi
* **FEATURE-ENVIRONMENT-DISABLED**¹ - Signals that a feature toggle has been _disabled_ in a defined environment. * **FEATURE-ENVIRONMENT-DISABLED**¹ - Signals that a feature toggle has been _disabled_ in a defined environment.
* **FEATURE-PROJECT-CHANGE**¹ - The feature toggle was moved to a new project. * **FEATURE-PROJECT-CHANGE**¹ - The feature toggle was moved to a new project.
> 1) These feature events will contain _project_ and _environment_ as part of the even metadata. > 1) These feature events will contain _project_ and _environment_ as part of the event metadata.
### API ### API
In order to support configuration per environment we had to rebuild our feature toggle admin API to account for environments as well. This means In order to support configuration per environment we had to rebuild our feature toggle admin API to account for environments as well. This means that we're making the following changes to the API: