Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

procedures: Add readiness init container docs #2139

Merged
merged 37 commits into from
Nov 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1a6bd0b
Add readiness init container docs
mmorhun Oct 18, 2021
efa9117
Merge branch 'master' into che-20337
tolusha Oct 19, 2021
ef99587
Merge branch 'master' into che-20337
MichalMaler Oct 21, 2021
acf5c3b
Merge branch 'master' into che-20337
MichalMaler Oct 26, 2021
357fec3
MMaler edits
MichalMaler Nov 1, 2021
7ba3111
edits
MichalMaler Nov 1, 2021
f41feee
Merge pull request #1 from MichalMaler/pr/mmorhun/2139-mmaler-review
mmorhun Nov 1, 2021
2b130a3
Small corrections
mmorhun Nov 1, 2021
500ba72
Merge branch 'master' into che-20337
mmorhun Nov 1, 2021
2282137
Merge branch 'master' into che-20337
mmorhun Nov 1, 2021
2611999
Add a note about operator upgrade
mmorhun Nov 1, 2021
03c39b9
Apply suggestions from code review by max-cx
mmorhun Nov 3, 2021
7beed5f
Corrections
mmorhun Nov 3, 2021
024907a
Apply suggestions from code review by max-cx
mmorhun Nov 5, 2021
2a9e7df
draft
max-cx Nov 11, 2021
93d1eb3
draft
max-cx Nov 11, 2021
636ac73
draft
max-cx Nov 12, 2021
1ff5501
update antora.yml to pass checks before updating PR-destination branch
max-cx Nov 15, 2021
613a4d8
Update modules/administration-guide/partials/proc_disabling-readiness…
max-cx Nov 18, 2021
f5e9c74
fix: Fix outdated links (#2154)
tstastna Nov 4, 2021
409b948
Fix xref. (#2158)
themr0c Nov 8, 2021
17fb18c
fix: Mounting secrets defined in a devfile (#2144)
tstastna Nov 9, 2021
aa7d75f
fix: vale errors and warnings (#2151)
themr0c Nov 9, 2021
4035f97
fix: abort previous build on Jenkins (#2162)
themr0c Nov 10, 2021
44cf4b5
release: Bump version to 7.39.0 (#2164)
che-bot Nov 16, 2021
61329ba
draft
max-cx Nov 18, 2021
d0484e2
Merge pull request #2 from max-cx/PR2139
mmorhun Nov 18, 2021
f643c8c
Merge branch 'master' into che-20337
mmorhun Nov 18, 2021
5acb202
Fixes
mmorhun Nov 19, 2021
56f1388
Merge branch 'master' into che-20337
mmorhun Nov 19, 2021
0f496be
Merge branch 'master' into che-20337
mmorhun Nov 22, 2021
f94f272
Fix message
mmorhun Nov 25, 2021
1cf617b
Merge branch 'master' into che-20337
mmorhun Nov 25, 2021
15977a1
Update modules/administration-guide/partials/assembly_enabling-and-di…
mmorhun Nov 25, 2021
561930e
Apply suggestions from code review
mmorhun Nov 25, 2021
9cc3571
Apply suggestions from code review
mmorhun Nov 25, 2021
ebd3be3
Merge branch 'master' into che-20337
themr0c Nov 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions modules/administration-guide/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@

* xref:migration-from-postgresql-9-to-postgresql-13.adoc[]

* xref:readiness-init-containers.adoc[]
** xref:enabling-and-disabling-readiness-init-containers-for-the-operator-installer.adoc[]
*** xref:enabling-readiness-init-containers-for-the-operator-installer.adoc[]
*** xref:disabling-readiness-init-containers-for-the-operator-installer.adoc[]
** xref:enabling-and-disabling-readiness-init-containers-for-the-olm-installer.adoc[]
*** xref:enabling-readiness-init-containers-for-the-olm-installer.adoc[]
*** xref:disabling-readiness-init-containers-for-the-olm-installer.adoc[]

* xref:caching-images-for-faster-workspace-start.adoc[]
** xref:defining-the-list-of-images-to-pull.adoc[]
** xref:defining-the-memory-parameters-for-the-image-puller.adoc[]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="disabling-readiness-init-containers-for-the-olm-installer"]
:navtitle: Disabling the readiness init containers for the OLM installer
:keywords: disable-readiness-init-containers, disabling-readiness-init-containers, init-container, readiness-init-container, startup, olm
:page-aliases: .:disabling-readiness-init-containers-for-the-olm-installer

include::partial$proc_disabling-readiness-init-containers-for-the-olm-installer.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="disabling-readiness-init-containers-for-the-operator-installer"]
:navtitle: Disabling the readiness init containers for the Operator installer
:keywords: disable-readiness-init-containers, disabling-readiness-init-containers, init-container, readiness-init-container, startup, operator
:page-aliases: .:disabling-readiness-init-containers-for-the-operator-installer

include::partial$proc_disabling-readiness-init-containers-for-the-operator-installer.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="enabling-and-disabling-readiness-init-containers-for-the-olm-installer"]
:navtitle: Enabling and disabling the readiness init containers for the OLM installer
:keywords: enable-readiness-init-containers, disable-readiness-init-containers, enabling-readiness-init-containers, disabling-readiness-init-containers, init-container, readiness-init-container, startup, olm
:page-aliases: .:enabling-and-disabling-readiness-init-containers-for-the-olm-installer

include::partial$assembly_enabling-and-disabling-readiness-init-containers-for-the-olm-installer.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="enabling-and-disabling-readiness-init-containers-for-the-operator-installer"]
:navtitle: Enabling and disabling the readiness init containers for the Operator installer
:keywords: enable-readiness-init-containers, disable-readiness-init-containers, enabling-readiness-init-containers, disabling-readiness-init-containers, init-container, readiness-init-container, startup, operator
:page-aliases: .:enabling-and-disabling-readiness-init-containers-for-the-operator-installer

include::partial$assembly_enabling-and-disabling-readiness-init-containers-for-the-operator-installer.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="enabling-readiness-init-containers-for-the-olm-installer"]
:navtitle: Enabling the readiness init containers for the OLM installer
:keywords: enable-readiness-init-containers, enabling-readiness-init-containers, init-container, readiness-init-container, startup, olm
:page-aliases: .:enabling-readiness-init-containers-for-the-olm-installer

include::partial$proc_enabling-readiness-init-containers-for-the-olm-installer.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="enabling-readiness-init-containers-for-the-operator-installer"]
:navtitle: Enabling the readiness init containers for the Operator installer
:keywords: enable-readiness-init-containers, enabling-readiness-init-containers, init-container, readiness-init-container, startup, operator
:page-aliases: .:enabling-readiness-init-containers-for-the-operator-installer

include::partial$proc_enabling-readiness-init-containers-for-the-operator-installer.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="readiness-init-containers"]
:navtitle: Readiness init containers
:keywords: init-container, readiness-init-container, startup
:page-aliases: .:readiness-init-containers

include::partial$assembly_readiness-init-containers.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:parent-context-of-enabling-and-disabling-readiness-init-containers-for-the-olm-installer: {context}

[id="enabling-and-disabling-readiness-init-containers-for-the-olm-installer_{context}"]
= Enabling and disabling the readiness init containers for the OLM installer

:context: enabling-and-disabling-readiness-init-containers-for-the-olm-installer

You can enable and disable the readiness init containers for the {prod-short} installed by the OLM installer. (Available through `{prod-cli}`, the OLM installer uses the Operator Lifecycle Manager to install {prod-short}.)

* xref:enabling-readiness-init-containers-for-the-olm-installer.adoc[Enabling the readiness init containers for the OLM installer]
* xref:disabling-readiness-init-containers-for-the-olm-installer.adoc[Disabling the readiness init containers for the OLM installer]

:context: {parent-context-of-enabling-and-disabling-readiness-init-containers-for-the-olm-installer}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:parent-context-of-enabling-and-disabling-readiness-init-containers-for-the-operator-installer: {context}

[id="enabling-and-disabling-readiness-init-containers-for-the-operator-installer_{context}"]
= Enabling and disabling the readiness init containers for the Operator installer

:context: enabling-and-disabling-readiness-init-containers-for-the-operator-installer

You can enable and disable the readiness init containers for the {prod-short} installed by the Operator installer:

* xref:enabling-readiness-init-containers-for-the-operator-installer.adoc[Enabling the readiness init containers for the Operator installer]
* xref:disabling-readiness-init-containers-for-the-operator-installer.adoc[Disabling the readiness init containers for the Operator installer]

:context: {parent-context-of-enabling-and-disabling-readiness-init-containers-for-the-operator-installer}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
:parent-context-of-readiness-init-containers: {context}

[id="readiness-init-containers_{context}"]
= Readiness init containers

:context: readiness-init-containers

{prod-short} Operator installs {prod-short} and starts its containers in the correct order. If a node with {prod-short} is restarted and all {prod-short} containers start simultaneously, some containers may fail because some other component they depend on is not ready. To avoid such failures, the readiness init containers queue the containers for {prod-short} components to start in the correct order.

The readiness init containers are disabled by default. If you choose to enable them, proceed according to the installation method used to install {prod-short}:

* xref:enabling-and-disabling-readiness-init-containers-for-the-operator-installer.adoc[]

* xref:enabling-and-disabling-readiness-init-containers-for-the-olm-installer.adoc[]

:context: {parent-context-of-readiness-init-containers}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
:_module-type: PROCEDURE

[id="disabling-readiness-init-containers-for-the-olm-installer_{context}"]
= Disabling the readiness init containers for the OLM installer

To disable the previously enabled readiness init containers for the {prod-short} installed by the OLM installer:

.Prerequisites

* {prod-short} is installed by the OLM installer.

.Procedure

. Find the {prod-short} Operator subscription name:
mmorhun marked this conversation as resolved.
Show resolved Hide resolved
+
[source,shell,subs="+quotes,+attributes"]
----
$ {orch-cli} get subscriptions -n {prod-namespace}
----

. Get the CSV (Cluster Service Version) name from the {prod-short} Operator subscription:
mmorhun marked this conversation as resolved.
Show resolved Hide resolved
+
[source,shell,subs="+quotes,+attributes"]
----
$ {orch-cli} get subscription <subscription-name> -n {prod-namespace} -o yaml | grep installedCSV
----

. Edit the `ClusterServiceVersion` YAML manifest:
+
[source,shell,subs="+quotes,+attributes"]
----
$ {orch-cli} edit csv _<csv-name>_ -n {prod-namespace}
----
. Remove the following environment variable from the Operator Deployment spec:
+
[source,yaml,subs="+quotes,+attributes"]
----
- name: ADD_COMPONENT_READINESS_INIT_CONTAINERS
value: "true"
----

. Wait for the {prod-short} Operator restart to finish. The restarted Operator will then continue with restarting some of its components.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[id="disabling-readiness-init-containers-for-the-operator-installer_{context}"]
= Disabling the readiness init containers for the Operator installer

To disable the previously enabled readiness init containers for the {prod-short} installed by the Operator installer:

.Prerequisites

* {prod} installed by the Operator installer.

.Procedure

. Find the name of the {prod-short} Operator Deployment. Usually it is `{prod-id-short}-operator`:
+
[source,yaml,subs="+quotes,+attributes"]
----
$ {orch-cli} get deployments -n {prod-namespace}
----

. Edit the Deployment as follows: Under `spec.template.spec.containers[0].env` of the Operator Deployment, remove the following lines:
+
[source,yaml,subs="+quotes,+attributes"]
----
- name: ADD_COMPONENT_READINESS_INIT_CONTAINERS <1>
value: "true"
----
<1> `ADD_COMPONENT_READINESS_INIT_CONTAINERS` is an environment variable.

. Wait while {prod-short} Operator restarts some components.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
:_module-type: PROCEDURE

[id="enabling-readiness-init-containers-for-the-olm-installer_{context}"]
= Enabling the readiness init containers for the OLM installer

The readiness init containers are not enabled by default, so to use them you first have to enable them. To enable the readiness init containers for the {prod-short} installed by the OLM installer:

.Prerequisites

* {prod-short} is installed by the OLM installer.

.Procedure

. Find the {prod-short} Operator subscription name:
mmorhun marked this conversation as resolved.
Show resolved Hide resolved
+
[source,shell,subs="+quotes,+attributes"]
----
$ {orch-cli} get subscriptions -n {prod-namespace}
----

. Get the CSV (Cluster Service Version) name from the {prod-short} Operator subscription:
mmorhun marked this conversation as resolved.
Show resolved Hide resolved
+
[source,shell,subs="+quotes,+attributes"]
----
$ {orch-cli} get subscription <subscription-name> -n {prod-namespace} -o yaml | grep installedCSV
----

. Edit the `ClusterServiceVersion` YAML manifest:
+
[source,shell,subs="+quotes,+attributes"]
----
$ {orch-cli} edit csv _<csv-name>_ -n {prod-namespace}
----
. Add the following environment variable to the Operator Deployment spec:
+
[source,yaml,subs="+quotes,+attributes"]
----
- name: ADD_COMPONENT_READINESS_INIT_CONTAINERS
value: "true"
----

. Wait for the {prod-short} Operator restart to finish. The restarted Operator will then continue with restarting some of its components.

NOTE: Repeat these steps after each {prod-short} upgrade when a new CSV is created by OLM.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[id="enabling-readiness-init-containers-for-the-operator-installer_{context}"]
= Enabling the readiness init containers for the Operator installer

The readiness init containers are not enabled by default, so to use them you first have to enable them. To enable the readiness init containers for the {prod-short} installed by the Operator installer:

.Prerequisites

* {prod} installed by the Operator installer.

.Procedure

. Find the name of the {prod-short} Operator Deployment. Usually it is `{prod-id-short}-operator`:
+
[source,yaml,subs="+quotes,+attributes"]
----
$ {orch-cli} get deployments -n {prod-namespace}
----

. Edit the Deployment as follows: Under `spec.template.spec.containers[0].env` of the Operator Deployment, insert the following lines:
+
[source,yaml,subs="+quotes,+attributes"]
----
- name: ADD_COMPONENT_READINESS_INIT_CONTAINERS <1>
value: "true"
----
<1> `ADD_COMPONENT_READINESS_INIT_CONTAINERS` is an environment variable.

. Wait while {prod-short} Operator restarts some components.

NOTE: Repeat these steps after each {prod-short} upgrade when a new Operator Deployment is created.