Commit 53c1306f authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

docs: fix broken links

parent bfb2bb5a
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -20,3 +20,4 @@ include:
variables:
  GITLAB_CI_FILES: "templates/gitlab-ci-openshift.yml"
  TBC_NAMESPACE: "to-be-continuous"
  LYCHEE_EXTRA_OPTS: "--exclude redhat.com"
+16 −16
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ You're free to enable whichever or both, and you can also choose your deployment

This template supports token authentication only.
Tokens associated with OpenShift user accounts are only valid for 24 hours.
To generate a token that never expires you need to [create and use a service account token](https://docs.openshift.com/container-platform/latest/nodes/pods/nodes-pods-secrets.html#nodes-application-secrets-creating-using-sa_nodes-pods-secrets).
To generate a token that never expires you need to [create and use a service account token](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/authentication_and_authorization/understanding-and-creating-service-accounts).

Follow these steps:

@@ -106,7 +106,7 @@ oc get all --token=<token>
# this token can be used to authenticate ;)
```

:warning: don't forget to replace `<your_project_name>` with your OpenShift project name and `<role_name>` with the appropriate role (ask your OpenShift support). See [default cluster roles](https://docs.openshift.com/container-platform/latest/authentication/using-rbac.html#default-roles_using-rbac).
:warning: don't forget to replace `<your_project_name>` with your OpenShift project name and `<role_name>` with the appropriate role (ask your OpenShift support). See [default cluster roles](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/authentication_and_authorization/using-rbac).

### Deployment context variables

@@ -151,7 +151,7 @@ The OpenShift template supports two ways of deploying your code:

#### 1: script-based deployment

In this mode, you only have to provide a shell script that fully implements the deployment using the [`oc` CLI](https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html).
In this mode, you only have to provide a shell script that fully implements the deployment using the [`oc` CLI](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/cli_tools/openshift-cli-oc).

The deployment script is searched as follows:

@@ -161,19 +161,19 @@ The deployment script is searched as follows:

#### 2: template-based deployment

In this mode, you have to provide a [OpenShift templates](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html)
In this mode, you have to provide a [OpenShift templates](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/building_applications/creating-applications#using-templates)
in your project structure, and let the GitLab CI template `oc apply` it.

The template processes the following steps:

1. _optionally_ executes the `os-pre-apply.sh` script in your project to perform specific environment pre-initialization (for e.g. create required services),
2. looks for your OpenShift [template](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html) file, performs [variables substitution](#using-variabless) and [`oc apply`](https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-apply) it,
2. looks for your OpenShift [template](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/building_applications/creating-applications#using-templates) file, performs [variables substitution](#using-variabless) and [`oc apply`](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/cli_tools/openshift-cli-oc#oc-apply) it,
    1. look for a specific `openshift-$environment_type.yml` in your project (e.g. `openshift-staging.yml` for staging environment),
    2. fallbacks to default `openshift.yml`.
3. _optionally_ executes the `os-post-apply.sh` script in your project to perform specific environment post-initialization stuff,
4. _optionally_ executes the `os-readiness-check` to wait & check for the application to be ready (if not found, the template assumes the application was successfully started).

Deployment jobs process the selected template with the following [labels](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html#templates-writing-labels_using-templates):
Deployment jobs process the selected template with the following [labels](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/building_applications/creating-applications#templates-writing-labels_using-templates):

* `app`: the application target name to use in this environment (i.e. `$environment_name`)<br/>
   _Can be overridden with `$OS_APP_LABEL`._
@@ -189,7 +189,7 @@ The GitLab CI template for OpenShift supports two policies for destroying an env

#### 1: script-based cleanup

In this mode, you only have to provide a shell script that fully implements the environment cleanup using the [`oc` CLI](https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html).
In this mode, you only have to provide a shell script that fully implements the environment cleanup using the [`oc` CLI](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/cli_tools/openshift-cli-oc).

The a deployment script is searched as follows:

@@ -208,7 +208,7 @@ In this mode, you mainly let OpenShift delete all objects from your OpenShift de
The template processes the following steps:

1. _optionally_ executes the `os-pre-cleanup.sh` script in your project to perform specific environment pre-cleanup stuff,
2. [deletes](https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-delete) **all** objects with label `app=${environment_name}`<br/>
2. [deletes](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/cli_tools/openshift-cli-oc#oc-delete) **all** objects with label `app=${environment_name}`<br/>
   _works well with template-based deployment as this label is forced during `oc apply`_
3. _optionally_ executes the `os-post-cleanup.sh` script in your project to perform specific environment post-cleanup (for e.g. delete bound services).

@@ -251,8 +251,8 @@ by using available environment variables:
3. any [custom variable](https://docs.gitlab.com/ci/variables/#for-a-project)
    (ex: `${SECRET_TOKEN}` that you have set in your project CI/CD variables)

While your scripts may simply use any of those variables, your [OpenShift templates](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html)
shall be variabilized using [parameters](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html#templates-writing-parameters_using-templates).
While your scripts may simply use any of those variables, your [OpenShift templates](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/building_applications/creating-applications#using-templates)
shall be variabilized using [parameters](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/building_applications/creating-applications#templates-writing-parameters_using-templates).

Parameters are evaluated in the following order:

@@ -452,8 +452,8 @@ The OpenShift template uses some global configuration used throughout all jobs.
| `environment-namespace` / `OS_ENVIRONMENT_NAMESPACE` | Extra [GitLab environments](https://docs.gitlab.com/ci/environments/) namespace _(only required when deploying [multiple environments](#multiple-environments-support))_<br/>:warning: must start with a slash `/` | _none_ |
| `scripts-dir` / `OS_SCRIPTS_DIR` | directory where OpenShift scripts (templates, hook scripts) are located | `.` _(root project dir)_ |
| `base-template-name` / `OS_BASE_TEMPLATE_NAME`  | Base OpenShift template name           | `openshift` |
| `app-label` / `OS_APP_LABEL` | The OpenShift [label](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html#templates-writing-labels_using-templates) set with the `$environment_name` [dynamic variable](#using-variables) value. _Advanced usage_ | `app` |
| `env-label` / `OS_ENV_LABEL` | The OpenShift [label](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html#templates-writing-labels_using-templates) set with the `$environment_type` [dynamic variable](#using-variables) value (`review`, `integration`, `staging` or `prod`). _Advanced usage_ | `env` |
| `app-label` / `OS_APP_LABEL` | The OpenShift [label](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/building_applications/creating-applications#templates-writing-labels_using-templates) set with the `$environment_name` [dynamic variable](#using-variables) value. _Advanced usage_ | `app` |
| `env-label` / `OS_ENV_LABEL` | The OpenShift [label](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/building_applications/creating-applications#templates-writing-labels_using-templates) set with the `$environment_type` [dynamic variable](#using-variables) value (`review`, `integration`, `staging` or `prod`). _Advanced usage_ | `env` |

### Review environments configuration

@@ -466,7 +466,7 @@ Here are variables supported to configure review environments:

| Input / Variable | Description                            | Default value     |
| ------------------------ | -------------------------------------- | ----------------- |
| `review-project` / `OS_REVIEW_PROJECT` | OpenShift [project](https://docs.openshift.com/container-platform/3.11/architecture/core_concepts/projects_and_users.html#projects) for `review` env | _none_ (disabled) |
| `review-project` / `OS_REVIEW_PROJECT` | OpenShift [project](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/building_applications/projects) for `review` env | _none_ (disabled) |
| `review-url` / `OS_REVIEW_URL` | OpenShift API url for `review` env  _(only define to override default)_    | `$OS_URL` |
| :lock: `OS_REVIEW_TOKEN` | OpenShift API [token](#supported-authentication-methods) for `review` env  _(only define to override default)_    | `$OS_TOKEN` |
| `review-app-name` / `OS_REVIEW_APP_NAME` | Application name for `review` env      | `"${OS_BASE_APP_NAME}-${CI_ENVIRONMENT_SLUG}"` (ex: `myproject-review-fix-bug-12`) |
@@ -483,7 +483,7 @@ Here are variables supported to configure the integration environment:

| Input / Variable | Description                            | Default value     |
| ------------------------ | -------------------------------------- | ----------------- |
| `integ-project` / `OS_INTEG_PROJECT` | OpenShift [project](https://docs.openshift.com/container-platform/3.11/architecture/core_concepts/projects_and_users.html#projects) for `integration` env | _none_ (disabled) |
| `integ-project` / `OS_INTEG_PROJECT` | OpenShift [project](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/building_applications/projects) for `integration` env | _none_ (disabled) |
| `integ-url` / `OS_INTEG_URL` | OpenShift API url for `integration` env  _(only define to override default)_    | `$OS_URL` |
| :lock: `OS_INTEG_TOKEN`  | OpenShift API [token](#supported-authentication-methods) for `integration` env  _(only define to override default)_    | `$OS_TOKEN` |
| `integ-app-name` / `OS_INTEG_APP_NAME` | Application name for `integration` env | `${OS_BASE_APP_NAME}-integration` |
@@ -499,7 +499,7 @@ Here are variables supported to configure the staging environment:

| Input / Variable | Description                            | Default value     |
| ------------------------ | -------------------------------------- | ----------------- |
| `staging-project` / `OS_STAGING_PROJECT` | OpenShift [project](https://docs.openshift.com/container-platform/3.11/architecture/core_concepts/projects_and_users.html#projects) for `staging` env | _none_ (disabled) |
| `staging-project` / `OS_STAGING_PROJECT` | OpenShift [project](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/building_applications/projects) for `staging` env | _none_ (disabled) |
| `staging-url` / `OS_STAGING_URL` | OpenShift API url for `staging` env  _(only define to override default)_   | `$OS_URL` |
| :lock: `OS_STAGING_TOKEN`| OpenShift API [token](#supported-authentication-methods) for `staging` env  _(only define to override default)_    | `$OS_TOKEN` |
| `staging-app-name` / `OS_STAGING_APP_NAME` | Application name for `staging` env     | `${OS_BASE_APP_NAME}-staging` |
@@ -515,7 +515,7 @@ Here are variables supported to configure the production environment:

| Input / Variable | Description                            | Default value     |
| ------------------------ | -------------------------------------- | ----------------- |
| `prod-project` / `OS_PROD_PROJECT` | OpenShift [project](https://docs.openshift.com/container-platform/3.11/architecture/core_concepts/projects_and_users.html#projects) for `production` env | _none_ (disabled) |
| `prod-project` / `OS_PROD_PROJECT` | OpenShift [project](https://docs.redhat.com/documentation/openshift_container_platform/latest/html/building_applications/projects) for `production` env | _none_ (disabled) |
| `prod-url` / `OS_PROD_URL` | OpenShift API url for `production` env  _(only define to override default)_| `$OS_URL` |
| :lock: `OS_PROD_TOKEN`   | OpenShift API [token](#supported-authentication-methods) for `production` env  _(only define to override default)_    | `$OS_TOKEN` |
| `prod-app-name` / `OS_PROD_APP_NAME` | Application name for `production` env  | `$OS_BASE_APP_NAME` |