to `timed`, and production deployment will be executed with a 5 minute delay between
to `timed`. Production deployments execute with a 5 minute delay between
each increment in rollout.
each increment in rollout.
-**Automatic deployment to staging, manual deployment to production**: Sets the
-**Automatic deployment to staging, manual deployment to production**: Sets the
[`STAGING_ENABLED`](customize.md#deploy-policy-for-staging-and-production-environments) and
[`STAGING_ENABLED`](customize.md#deploy-policy-for-staging-and-production-environments) and
...
@@ -320,63 +325,60 @@ The available options are:
...
@@ -320,63 +325,60 @@ The available options are:
## Using multiple Kubernetes clusters **(PREMIUM)**
## Using multiple Kubernetes clusters **(PREMIUM)**
When using Auto DevOps, you may want to deploy different environments to
When using Auto DevOps, you can deploy different environments to
different Kubernetes clusters. This is possible due to the 1:1 connection that
different Kubernetes clusters, due to the 1:1 connection
[exists between them](../../user/project/clusters/index.md#multiple-kubernetes-clusters-premium).
[existing between them](../../user/project/clusters/index.md#multiple-kubernetes-clusters-premium).
In the [Auto DevOps template](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml)(used behind the scenes by Auto DevOps), there
The [Auto DevOps template](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml) currently defines 3 environment names:
are currently 3 defined environment names that you need to know:
-`review/` (every environment starting with `review/`)
-`review/` (every environment starting with `review/`)
-`staging`
-`staging`
-`production`
-`production`
Those environments are tied to jobs that use [Auto Deploy](stages.md#auto-deploy), so
Those environments are tied to jobs using [Auto Deploy](stages.md#auto-deploy), so
except for the environment scope, they would also need to have a different
except for the environment scope, they must have a different deployment domain.
domain they would be deployed to. This is why you need to define a separate
You must define a separate `KUBE_INGRESS_BASE_DOMAIN` variable for each of the above
`KUBE_INGRESS_BASE_DOMAIN` variable for all the above
[based on the environment](../../ci/variables/README.md#limiting-environment-scopes-of-environment-variables).
[based on the environment](../../ci/variables/README.md#limiting-environment-scopes-of-environment-variables).
The following table is an example of how the three different clusters would
The following table is an example of how to configure the three different clusters:
be configured.
| Cluster name | Cluster environment scope | `KUBE_INGRESS_BASE_DOMAIN` variable value | Variable environment scope | Notes |
| Cluster name | Cluster environment scope | `KUBE_INGRESS_BASE_DOMAIN` variable value | Variable environment scope | Notes |
| review | `review/*` | `review.example.com` | `review/*` | The review cluster which will run all [Review Apps](../../ci/review_apps/index.md). `*` is a wildcard, which means it will be used by every environment name starting with `review/`. |
| review | `review/*` | `review.example.com` | `review/*` | The review cluster which runs all [Review Apps](../../ci/review_apps/index.md). `*` is a wildcard, used by every environment name starting with `review/`. |
| staging | `staging` | `staging.example.com` | `staging` | (Optional) The staging cluster which will run the deployments of the staging environments. You need to[enable it first](customize.md#deploy-policy-for-staging-and-production-environments). |
| staging | `staging` | `staging.example.com` | `staging` | (Optional) The staging cluster which runs the deployments of the staging environments. You must[enable it first](customize.md#deploy-policy-for-staging-and-production-environments). |
| production | `production` | `example.com` | `production` | The production cluster which will run the deployments of the production environment. You can use [incremental rollouts](customize.md#incremental-rollout-to-production-premium). |
| production | `production` | `example.com` | `production` | The production cluster which runs the production environment deployments. You can use [incremental rollouts](customize.md#incremental-rollout-to-production-premium). |
To add a different cluster for each environment:
To add a different cluster for each environment:
1. Navigate to your project's **Operations > Kubernetes** and create the Kubernetes clusters
1. Navigate to your project's **{cloud-gear}****Operations > Kubernetes**.
with their respective environment scope as described from the table above.
1. Create the Kubernetes clusters with their respective environment scope, as