-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Restore installing image puller on openshift using cli (#2722)
* chore: Restore installing image puller on openshift using cli Signed-off-by: Anatolii Bazko <[email protected]> * Update modules/administration-guide/pages/installing-image-puller-on-openshift-using-cli.adoc Co-authored-by: Jana Vrbkova <[email protected]> * Update modules/administration-guide/pages/installing-image-puller-on-openshift-using-cli.adoc Co-authored-by: Jana Vrbkova <[email protected]> * Update modules/administration-guide/pages/installing-image-puller-on-openshift-using-cli.adoc Co-authored-by: Jana Vrbkova <[email protected]> * Adress remarks Signed-off-by: Anatolii Bazko <[email protected]> * Update modules/administration-guide/pages/installing-image-puller-on-openshift-using-cli.adoc * Update nav.adoc Signed-off-by: Anatolii Bazko <[email protected]> --------- Signed-off-by: Anatolii Bazko <[email protected]> Co-authored-by: Jana Vrbkova <[email protected]>
- Loading branch information
1 parent
23a1783
commit 495fe5c
Showing
3 changed files
with
162 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
159 changes: 159 additions & 0 deletions
159
.../administration-guide/pages/installing-image-puller-on-openshift-using-cli.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
:_content-type: PROCEDURE | ||
:description: Installing {image-puller-name-short} on OpenShift using CLI | ||
:keywords: administration-guide, image-puller, openshift, openshift-templates, CLI | ||
:navtitle: Installing {image-puller-name-short} on OpenShift using CLI | ||
// :page-aliases: .:installing-image-puller-on-openshift-using-openshift-templates.adoc,installing-image-puller-on-openshift-using-openshift-templates.adoc | ||
|
||
[id="installing-image-puller-on-openshift-using-the-cli"] | ||
= Installing {image-puller-name-short} on OpenShift by using the CLI | ||
|
||
You can install the {image-puller-name} on OpenShift by using OpenShift `oc` management tool. | ||
|
||
.Prerequisites | ||
|
||
* An active `oc` session with administrative permissions to the OpenShift cluster. See link:https://docs.openshift.com/container-platform/{ocp4-ver}/cli_reference/openshift_cli/getting-started-cli.html[Getting started with the OpenShift CLI]. | ||
|
||
.Procedure | ||
|
||
. Gather a list of relevant container images to pull by navigating to the links: | ||
* `pass:c,a,q[{prod-url}]/plugin-registry/v3/external_images.txt` | ||
* `pass:c,a,q[{prod-url}]/devfile-registry/devfiles/external_images.txt` | ||
|
||
. Define the memory requests and limits parameters to ensure pulled containers and the platform have enough memory to run. | ||
+ | ||
When defining the minimal value for `CACHING_MEMORY_REQUEST` or `CACHING_MEMORY_LIMIT`, consider the necessary amount of memory required to run each of the container images to pull. | ||
+ | ||
When defining the maximal value for `CACHING_MEMORY_REQUEST` or `CACHING_MEMORY_LIMIT`, consider the total memory allocated to the DaemonSet Pods in the cluster: | ||
+ | ||
---- | ||
(memory limit) * (number of images) * (number of nodes in the cluster) | ||
---- | ||
+ | ||
==== | ||
Pulling 5 images on 20 nodes, with a container memory limit of `20Mi` requires `2000Mi` of memory. | ||
==== | ||
|
||
. Clone the {image-puller-name-short} repository and get in the directory containing the OpenShift templates: | ||
+ | ||
[subs="+attributes,+quotes"] | ||
---- | ||
$ git clone https://github.com/che-incubator/{image-puller-repository-name} | ||
$ cd {image-puller-repository-name}/deploy/openshift | ||
---- | ||
|
||
. Configure the `app.yaml`, `configmap.yaml` and `serviceaccount.yaml` OpenShift templates using following parameters: | ||
+ | ||
.{image-puller-name-short} OpenShift templates parameters in `app.yaml` | ||
[options="header"] | ||
|=== | ||
|Value |Usage |Default | ||
|
||
|`DEPLOYMENT_NAME` | ||
|The value of `DEPLOYMENT_NAME` in the ConfigMap | ||
|`{image-puller-deployment-name}` | ||
|
||
|`IMAGE` | ||
|Image used for the `{image-puller-deployment-name}` deployment | ||
|`{image-puller-image-name}` | ||
|
||
|`IMAGE_TAG` | ||
|The image tag to pull | ||
|`latest` | ||
|
||
|`SERVICEACCOUNT_NAME` | ||
|The name of the ServiceAccount created and used by the deployment | ||
|`kubernetes-image-puller` | ||
|
||
|=== | ||
+ | ||
.{image-puller-name-short} OpenShift templates parameters in `configmap.yaml` | ||
[options="header"] | ||
|=== | ||
|Value |Usage |Default | ||
|
||
|`CACHING_CPU_LIMIT` | ||
|The value of `CACHING_CPU_LIMIT` in the ConfigMap | ||
|`.2` | ||
|
||
|`CACHING_CPU_REQUEST` | ||
|The value of `CACHING_CPU_REQUEST` in the ConfigMap | ||
|`.05` | ||
|
||
|`CACHING_INTERVAL_HOURS` | ||
|The value of `CACHING_INTERVAL_HOURS` in the ConfigMap | ||
|``"1"`` | ||
|
||
|`CACHING_MEMORY_LIMIT` | ||
|The value of `CACHING_MEMORY_LIMIT` in the ConfigMap | ||
|`"20Mi"` | ||
|
||
|`CACHING_MEMORY_REQUEST` | ||
|The value of `CACHING_MEMORY_REQUEST` in the ConfigMap | ||
|`"10Mi"` | ||
|
||
|`DAEMONSET_NAME` | ||
|The value of `DAEMONSET_NAME` in the ConfigMap | ||
|`{image-puller-deployment-name}` | ||
|
||
|`DEPLOYMENT_NAME` | ||
|The value of `DEPLOYMENT_NAME` in the ConfigMap | ||
|`{image-puller-deployment-name}` | ||
|
||
|`IMAGES` | ||
|The value of `IMAGES` in the ConfigMap | ||
|`{}` | ||
|
||
|`NAMESPACE` | ||
|The value of `NAMESPACE` in the ConfigMap | ||
|`{image-puller-namespace}` | ||
|
||
|`NODE_SELECTOR` | ||
|The value of `NODE_SELECTOR` in the ConfigMap | ||
|`"{}"` | ||
|=== | ||
+ | ||
.{image-puller-name-short} OpenShift templates parameters in `serviceaccount.yaml` | ||
[options="header"] | ||
|=== | ||
|Value |Usage |Default | ||
|
||
|`SERVICEACCOUNT_NAME` | ||
|The name of the ServiceAccount created and used by the deployment | ||
|`kubernetes-image-puller` | ||
|
||
|=== | ||
|
||
|
||
|
||
. Create an OpenShift project to host the {image-puller-name-short}: | ||
+ | ||
[subs="+attributes,+quotes"] | ||
---- | ||
$ oc new-project __<{image-puller-namespace}>__ | ||
---- | ||
|
||
. Process and apply the templates to install the puller: | ||
+ | ||
[subs="+attributes,+quotes"] | ||
---- | ||
$ oc process -f serviceaccount.yaml | oc apply -f - | ||
$ oc process -f configmap.yaml | oc apply -f - | ||
$ oc process -f app.yaml | oc apply -f - | ||
---- | ||
|
||
|
||
.Verification steps | ||
|
||
. Verify the existence of a __<{image-puller-deployment-name}>__ deployment and a __<{image-puller-deployment-name}>__ DaemonSet. The DaemonSet needs to have a Pod for each node in the cluster: | ||
+ | ||
[source%nowrap,dummy,subs="+quotes,+attributes"] | ||
---- | ||
$ oc get deployment,daemonset,pod --namespace __<{image-puller-namespace}>__ | ||
---- | ||
|
||
. Verify the values of the __<{image-puller-deployment-name}>__ `ConfigMap`. | ||
+ | ||
[source%nowrap,dummy,subs="+quotes,+attributes"] | ||
---- | ||
$ oc get configmap __<{image-puller-deployment-name}>__ --output yaml | ||
---- |