Commit bfddcc12 authored by ngaskill's avatar ngaskill

Removing notes from environments doc

parent 75da09d7
...@@ -118,11 +118,9 @@ With this configuration, we: ...@@ -118,11 +118,9 @@ With this configuration, we:
- Ensure that our app is able to be built successfully. - Ensure that our app is able to be built successfully.
- Lastly we deploy to the staging server. - Lastly we deploy to the staging server.
NOTE: **Note:** Note that the `environment` keyword defines where the app is deployed. The environment `name` and
The `environment` keyword defines where the app is deployed. `url` is exposed in various places within GitLab. Each time a job that has an environment specified
The environment `name` and `url` is exposed in various places succeeds, a deployment is recorded along with the Git SHA and environment name.
within GitLab. Each time a job that has an environment specified
succeeds, a deployment is recorded, along with the Git SHA, and environment name.
CAUTION: **Caution:** CAUTION: **Caution:**
Some characters are not allowed in environment names. Use only letters, Some characters are not allowed in environment names. Use only letters,
...@@ -288,12 +286,11 @@ You can find the "play" button in the pipelines, environments, deployments, and ...@@ -288,12 +286,11 @@ You can find the "play" button in the pipelines, environments, deployments, and
| Deployments | ![Deployments manual action](../img/environments_manual_action_deployments.png) | | Deployments | ![Deployments manual action](../img/environments_manual_action_deployments.png) |
| Jobs | ![Builds manual action](../img/environments_manual_action_jobs.png) | | Jobs | ![Builds manual action](../img/environments_manual_action_jobs.png) |
Clicking on the play button in any view will trigger the `deploy_prod` job, and the Clicking the play button in any view triggers the `deploy_prod` job. The deployment is recorded as a
deployment will be recorded as a new environment named `production`. new environment named `production`.
NOTE: **Note:** If your environment's name is `production` (all lowercase), it's recorded in
If your environment's name is `production` (all lowercase), [Value Stream Analytics](../../user/project/cycle_analytics.md).
it will get recorded in [Value Stream Analytics](../../user/project/cycle_analytics.md).
### Configuring dynamic environments ### Configuring dynamic environments
...@@ -371,9 +368,8 @@ For the value of: ...@@ -371,9 +368,8 @@ For the value of:
the example above: `https://$CI_COMMIT_REF_NAME.example.com`, which would give a URL the example above: `https://$CI_COMMIT_REF_NAME.example.com`, which would give a URL
of `https://100-do-the-thing.example.com`. of `https://100-do-the-thing.example.com`.
NOTE: **Note:** You aren't required to use the same prefix or only slashes (`/`) in the dynamic environments' names.
You are not required to use the same prefix or only slashes (`/`) in the dynamic environments' However, using this format enables the [grouping similar environments](#grouping-similar-environments)
names. However, using this format will enable the [grouping similar environments](#grouping-similar-environments)
feature. feature.
### Configuring Kubernetes deployments ### Configuring Kubernetes deployments
...@@ -384,6 +380,12 @@ If you are deploying to a [Kubernetes cluster](../../user/project/clusters/index ...@@ -384,6 +380,12 @@ If you are deploying to a [Kubernetes cluster](../../user/project/clusters/index
associated with your project, you can configure these deployments from your associated with your project, you can configure these deployments from your
`gitlab-ci.yml` file. `gitlab-ci.yml` file.
NOTE: **Note:**
Kubernetes configuration isn't supported for Kubernetes clusters that are
[managed by GitLab](../../user/project/clusters/index.md#gitlab-managed-clusters).
To follow progress on support for GitLab-managed clusters, see the
[relevant issue](https://gitlab.com/gitlab-org/gitlab/-/issues/38054).
The following configuration options are supported: The following configuration options are supported:
- [`namespace`](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/) - [`namespace`](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/)
...@@ -411,12 +413,6 @@ trace on the deployment job page: ...@@ -411,12 +413,6 @@ trace on the deployment job page:
![Deployment cluster information](../img/environments_deployment_cluster_v12_8.png) ![Deployment cluster information](../img/environments_deployment_cluster_v12_8.png)
NOTE: **Note:**
Kubernetes configuration is not supported for Kubernetes clusters
that are [managed by GitLab](../../user/project/clusters/index.md#gitlab-managed-clusters).
To follow progress on support for GitLab-managed clusters, see the
[relevant issue](https://gitlab.com/gitlab-org/gitlab/-/issues/38054).
#### Configuring incremental rollouts #### Configuring incremental rollouts
Learn how to release production changes to only a portion of your Kubernetes pods with Learn how to release production changes to only a portion of your Kubernetes pods with
...@@ -514,9 +510,8 @@ review_app: ...@@ -514,9 +510,8 @@ review_app:
This example requires that NGINX and GitLab Runner are set up on the server this job will run on. This example requires that NGINX and GitLab Runner are set up on the server this job will run on.
NOTE: **Note:** See the [limitations](#limitations) section for some edge cases regarding the naming of your
See the [limitations](#limitations) section for some edge cases regarding the naming of branches and Review Apps.
your branches and Review Apps.
The complete example provides the following workflow to developers: The complete example provides the following workflow to developers:
...@@ -617,13 +612,12 @@ To retry or rollback a deployment: ...@@ -617,13 +612,12 @@ To retry or rollback a deployment:
#### What to expect with a rollback #### What to expect with a rollback
Pressing the **Rollback** button on a specific commit will trigger a _new_ deployment with its Pressing the **Rollback** button on a specific commit triggers a _new_ deployment with its own
own unique job ID. unique job ID. This means that you will see a new deployment that points to the commit you're
rolling back to.
This means that you will see a new deployment that points to the commit you are rolling back to.
NOTE: **Note:** Note that the defined deployment process in the job's `script` determines whether the rollback
The defined deployment process in the job's `script` determines whether the rollback succeeds or not. succeeds.
### Using the environment URL ### Using the environment URL
...@@ -662,9 +656,8 @@ Stopping an environment: ...@@ -662,9 +656,8 @@ Stopping an environment:
This is often used when multiple developers are working on a project at the same time, This is often used when multiple developers are working on a project at the same time,
each of them pushing to their own branches, causing many dynamic environments to be created. each of them pushing to their own branches, causing many dynamic environments to be created.
NOTE: **Note:** Starting with GitLab 8.14, dynamic environments stop automatically when their associated branch is
Starting with GitLab 8.14, dynamic environments are stopped automatically deleted.
when their associated branch is deleted.
#### Automatically stopping an environment #### Automatically stopping an environment
...@@ -721,29 +714,25 @@ You can read more in the [`.gitlab-ci.yml` reference](../yaml/README.md#environm ...@@ -721,29 +714,25 @@ You can read more in the [`.gitlab-ci.yml` reference](../yaml/README.md#environm
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/20956) in GitLab 12.8. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/20956) in GitLab 12.8.
You can set a expiry time to environments and stop them automatically after a certain period. You can set an expiry time for environments and stop them automatically after a certain period.
For example, consider the use of this feature with Review Apps environments. For example, consider the use of this feature with Review App environments. When you set up Review
When you set up Review Apps, sometimes they keep running for a long time Apps, sometimes they keep running for a long time because some merge requests are left open and
because some merge requests are left as open. An example for this situation is when the author of the merge forgotten. Such idle environments waste resources and should be terminated as soon as possible.
request is not actively working on it, due to priority changes or a different approach was decided on, and the merge requests was simply forgotten.
Idle environments waste resources, therefore they
should be terminated as soon as possible.
To address this problem, you can specify an optional expiration date for To address this problem, you can specify an optional expiration date for Review App environments.
Review Apps environments. When the expiry time is reached, GitLab will automatically trigger a job When the expiry time is reached, GitLab automatically triggers a job to stop the environment,
to stop the environment, eliminating the need of manually doing so. In case an environment is updated, the expiration is renewed eliminating the need of manually doing so. In case an environment is updated, the expiration is
ensuring that only active merge requests keep running Review Apps. renewed ensuring that only active merge requests keep running Review Apps.
To enable this feature, you need to specify the [`environment:auto_stop_in`](../yaml/README.md#environmentauto_stop_in) keyword in `.gitlab-ci.yml`. To enable this feature, you must specify the [`environment:auto_stop_in`](../yaml/README.md#environmentauto_stop_in)
You can specify a human-friendly date as the value, such as `1 hour and 30 minutes` or `1 day`. keyword in `.gitlab-ci.yml`. You can specify a human-friendly date as the value, such as
`auto_stop_in` uses the same format of [`artifacts:expire_in` docs](../yaml/README.md#artifactsexpire_in). `1 hour and 30 minutes` or `1 day`. `auto_stop_in` uses the same format of
[`artifacts:expire_in` docs](../yaml/README.md#artifactsexpire_in).
NOTE: **Note:** Note that due to resource limitation, a background worker for stopping environments only runs once
Due to the resource limitation, a background worker for stopping environments only every hour. This means that environments aren't stopped at the exact timestamp specified, but are
runs once every hour. This means environments will not be stopped at the exact instead stopped when the hourly cron worker detects expired environments.
timestamp as the specified period, but will be stopped when the hourly cron worker
detects expired environments.
##### Auto-stop example ##### Auto-stop example
...@@ -903,7 +892,6 @@ you can monitor the behavior of your app running in each environment. For the mo ...@@ -903,7 +892,6 @@ you can monitor the behavior of your app running in each environment. For the mo
dashboard to appear, you need to Configure Prometheus to collect at least one dashboard to appear, you need to Configure Prometheus to collect at least one
[supported metric](../../user/project/integrations/prometheus_library/index.md). [supported metric](../../user/project/integrations/prometheus_library/index.md).
NOTE: **Note:**
Since GitLab 9.2, all deployments to an environment are shown directly on the monitoring dashboard. Since GitLab 9.2, all deployments to an environment are shown directly on the monitoring dashboard.
Once configured, GitLab will attempt to retrieve [supported performance metrics](../../user/project/integrations/prometheus_library/index.md) Once configured, GitLab will attempt to retrieve [supported performance metrics](../../user/project/integrations/prometheus_library/index.md)
...@@ -938,6 +926,11 @@ This is a powerful feature that allows you to debug issues without leaving the c ...@@ -938,6 +926,11 @@ This is a powerful feature that allows you to debug issues without leaving the c
of your web browser. To enable it, just follow the instructions given in the service integration of your web browser. To enable it, just follow the instructions given in the service integration
documentation. documentation.
NOTE: **Note:**
Container-based deployments often lack basic tools (like an editor), and may
be stopped or restarted at any time. If this happens, you will lose all your
changes. Treat this as a debugging tool, not a comprehensive online IDE.
Once enabled, your environments will gain a "terminal" button: Once enabled, your environments will gain a "terminal" button:
![Terminal button on environment index](../img/environments_terminal_button_on_index.png) ![Terminal button on environment index](../img/environments_terminal_button_on_index.png)
...@@ -961,11 +954,6 @@ by your deployment so you can: ...@@ -961,11 +954,6 @@ by your deployment so you can:
You can open multiple terminals to the same environment, they each get their own shell You can open multiple terminals to the same environment, they each get their own shell
session and even a multiplexer like `screen` or `tmux`. session and even a multiplexer like `screen` or `tmux`.
NOTE: **Note:**
Container-based deployments often lack basic tools (like an editor), and may
be stopped or restarted at any time. If this happens, you will lose all your
changes. Treat this as a debugging tool, not a comprehensive online IDE.
### Check out deployments locally ### Check out deployments locally
Since GitLab 8.13, a reference in the Git repository is saved for each deployment, so Since GitLab 8.13, a reference in the Git repository is saved for each deployment, so
...@@ -1024,9 +1012,8 @@ As you can see, you can use specific matching for selecting a particular environ ...@@ -1024,9 +1012,8 @@ As you can see, you can use specific matching for selecting a particular environ
and also use wildcard matching (`*`) for selecting a particular environment group, and also use wildcard matching (`*`) for selecting a particular environment group,
such as [Review Apps](../review_apps/index.md) (`review/*`). such as [Review Apps](../review_apps/index.md) (`review/*`).
NOTE: **Note:** Note that the most _specific_ spec takes precedence over the other wildcard matching. In this case,
The most _specific_ spec takes precedence over the other wildcard matching. the `review/feature-1` spec takes precedence over `review/*` and `*` specs.
In this case, `review/feature-1` spec takes precedence over `review/*` and `*` specs.
### Environments Dashboard **(PREMIUM)** ### Environments Dashboard **(PREMIUM)**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment