From 76f240a559a23e835179fb4b67f53c968fe9457d Mon Sep 17 00:00:00 2001 From: Dylan Griffith Date: Thu, 12 Apr 2018 08:18:46 +0000 Subject: [PATCH] Update Auto-Devops docs to mention new REPLICAS env var --- ...pler-env-vars-for-auto-devops-replicas.yml | 5 +++ doc/topics/autodevops/index.md | 37 ++++++++++--------- 2 files changed, 24 insertions(+), 18 deletions(-) create mode 100644 changelogs/unreleased/41436-use-simpler-env-vars-for-auto-devops-replicas.yml diff --git a/changelogs/unreleased/41436-use-simpler-env-vars-for-auto-devops-replicas.yml b/changelogs/unreleased/41436-use-simpler-env-vars-for-auto-devops-replicas.yml new file mode 100644 index 00000000000..ea007670332 --- /dev/null +++ b/changelogs/unreleased/41436-use-simpler-env-vars-for-auto-devops-replicas.yml @@ -0,0 +1,5 @@ +--- +title: 'Introduce simpler env vars for auto devops REPLICAS and CANARY_REPLICAS #41436' +merge_request: 18036 +author: +type: added diff --git a/doc/topics/autodevops/index.md b/doc/topics/autodevops/index.md index e88b787187c..89b8ea209b3 100644 --- a/doc/topics/autodevops/index.md +++ b/doc/topics/autodevops/index.md @@ -455,17 +455,19 @@ The following variables can be used for setting up the Auto DevOps domain, providing a custom Helm chart, or scaling your application. PostgreSQL can be also be customized, and you can easily use a [custom buildpack](#custom-buildpacks). -| **Variable** | **Description** | -| ------------ | --------------- | -| `AUTO_DEVOPS_DOMAIN` | The [Auto DevOps domain](#auto-devops-domain); by default set automatically by the [Auto DevOps setting](#enabling-auto-devops). | -| `AUTO_DEVOPS_CHART` | The Helm Chart used to deploy your apps; defaults to the one [provided by GitLab](https://gitlab.com/charts/charts.gitlab.io/tree/master/charts/auto-deploy-app). | -| `PRODUCTION_REPLICAS` | The number of replicas to deploy in the production environment; defaults to 1. | -| `CANARY_PRODUCTION_REPLICAS`| The number of canary replicas to deploy for [Canary Deployments](https://docs.gitlab.com/ee/user/project/canary_deployments.html) in the production environment. | -| `POSTGRES_ENABLED` | Whether PostgreSQL is enabled; defaults to `"true"`. Set to `false` to disable the automatic deployment of PostgreSQL. | -| `POSTGRES_USER` | The PostgreSQL user; defaults to `user`. Set it to use a custom username. | -| `POSTGRES_PASSWORD` | The PostgreSQL password; defaults to `testing-password`. Set it to use a custom password. | -| `POSTGRES_DB` | The PostgreSQL database name; defaults to the value of [`$CI_ENVIRONMENT_SLUG`](../../ci/variables/README.md#predefined-variables-environment-variables). Set it to use a custom database name. | -| `BUILDPACK_URL` | The buildpack's full URL. It can point to either Git repositories or a tarball URL. For Git repositories, it is possible to point to a specific `ref`, for example `https://github.com/heroku/heroku-buildpack-ruby.git#v142`| +| **Variable** | **Description** | +| ------------ | --------------- | +| `AUTO_DEVOPS_DOMAIN` | The [Auto DevOps domain](#auto-devops-domain); by default set automatically by the [Auto DevOps setting](#enabling-auto-devops). | +| `AUTO_DEVOPS_CHART` | The Helm Chart used to deploy your apps; defaults to the one [provided by GitLab](https://gitlab.com/charts/charts.gitlab.io/tree/master/charts/auto-deploy-app). | +| `REPLICAS` | The number of replicas to deploy; defaults to 1. | +| `PRODUCTION_REPLICAS` | The number of replicas to deploy in the production environment. This takes precedence over `REPLICAS`; defaults to 1. | +| `CANARY_REPLICAS` | The number of canary replicas to deploy for [Canary Deployments](https://docs.gitlab.com/ee/user/project/canary_deployments.html); defaults to 1 | +| `CANARY_PRODUCTION_REPLICAS` | The number of canary replicas to deploy for [Canary Deployments](https://docs.gitlab.com/ee/user/project/canary_deployments.html) in the production environment. This takes precedence over `CANARY_REPLICAS`; defaults to 1 | +| `POSTGRES_ENABLED` | Whether PostgreSQL is enabled; defaults to `"true"`. Set to `false` to disable the automatic deployment of PostgreSQL. | +| `POSTGRES_USER` | The PostgreSQL user; defaults to `user`. Set it to use a custom username. | +| `POSTGRES_PASSWORD` | The PostgreSQL password; defaults to `testing-password`. Set it to use a custom password. | +| `POSTGRES_DB` | The PostgreSQL database name; defaults to the value of [`$CI_ENVIRONMENT_SLUG`](../../ci/variables/README.md#predefined-variables-environment-variables). Set it to use a custom database name. | +| `BUILDPACK_URL` | The buildpack's full URL. It can point to either Git repositories or a tarball URL. For Git repositories, it is possible to point to a specific `ref`, for example `https://github.com/heroku/heroku-buildpack-ruby.git#v142` | TIP: **Tip:** Set up the replica variables using a @@ -496,8 +498,9 @@ The general rule is: `TRACK_ENV_REPLICAS`. Where: That way, you can define your own `TRACK_ENV_REPLICAS` variables with which you will be able to scale the pod's replicas easily. -In the example below, the environment's name is `qa` which would result in -looking for the `QA_REPLICAS` environment variable: +In the example below, the environment's name is `qa` and it deploys the track +`foo` which would result in looking for the `FOO_QA_REPLICAS` environment +variable: ```yaml QA testing: @@ -505,11 +508,11 @@ QA testing: environment: name: qa script: - - deploy qa + - deploy foo ``` -If, in addition, there was also a `track: foo` defined in the application's Helm -chart, like: +The track `foo` being referenced would also need to be defined in the +application's Helm chart, like: ```yaml replicaCount: 1 @@ -531,8 +534,6 @@ service: internalPort: 5000 ``` -then the environment variable would be `FOO_QA_REPLICAS`. - ## Currently supported languages NOTE: **Note:** -- GitLab