第11章 ワークスペースの起動を迅速化するイメージのキャッシュ
CodeReady Workspaces ワークスペースの起動時間のパフォーマンスを改善するには、Image Puller を使用して OpenShift クラスターのイメージの事前プルに使用できる CodeReady Workspaces に依存しないコンポーネントを使用します。Image Puller は、関連する CodeReady Workspaces ワークスペースイメージを各ノードで事前にプルするように設定できる DaemonSet を作成する追加の OpenShift デプロイメントです。これらのイメージは、CodeReady Workspaces ワークスペースの起動時にすでに利用可能なため、ワークスペースの開始時間が改善されています。
Image Puller は、設定用に以下のパラメーターを提供します。
| パラメーター | 使用法 | デフォルト |
|---|---|---|
|
| デーモンセットのヘルスチェック間隔(時間単位) |
|
|
| Puller の実行時にキャッシュされる各イメージのメモリー要求。「Image Puller のメモリーパラメーターの定義」 を参照してください。 |
|
|
| Puller の実行時にキャッシュされる各イメージのメモリー制限。「Image Puller のメモリーパラメーターの定義」 を参照してください。 |
|
|
| Puller の実行時にキャッシュされる各イメージのプロセッサー要求 |
|
|
| Puller の実行時にキャッシュされる各イメージのプロセッサー制限 |
|
|
| 作成するデーモンセットの名前 |
|
|
| 作成するデプロイメントの名前 |
|
|
| 作成するデーモンセットが含まれる OpenShift プロジェクト |
|
|
|
プルするイメージのセミコロンで区切られた一覧 ( | |
|
| デーモンセットによって作成される Pod に適用するノードセレクター |
|
|
| DaemonSet によって作成される Pod に適用されるアフィニティー |
|
|
|
イメージプルシークレットの一覧。形式は |
|
関連情報
11.1. プルするイメージの一覧の定義 リンクのコピーリンクがクリップボードにコピーされました!
Image Puller は、che-machine-exec などの scratch イメージを含むほとんどのイメージを事前プルできます。ただし、traefik などの Dockerfile にボリュームをマウントするイメージは、OpenShift 3.11 における事前プルではサポートされません。
ワークスペースの起動に関連するイメージの事前プルが行われると、ワークスペースの起動時間が短縮されます。以下は例になります。
- Che-Theia
- ブローカーイメージ
- プラグインサイドカーイメージ
前提条件
-
curlツールが利用できる。curl ホームページを参照してください。 -
jqツールが利用できる。jq ホームページを参照してください。 -
yqツールが利用できる。yq ホームページを参照してください。
手順
OpenShift プラットフォームの関連するコンテナーイメージの一覧を収集します。
例11.1 CodeReady Workspaces 2.14 のすべてのイメージの一覧の取得
$ curl -sSLo- https://raw.githubusercontent.com/redhat-developer/codeready-workspaces-images/crw-2.14-rhel-8/codeready-workspaces-operator-metadata-generated/manifests/codeready-workspaces.csv.yaml \ | yq -r '.spec.relatedImages[]'ワークスペースの起動フェーズに関連するイメージを保持します。
-
eap -
machineexec -
mongodb -
pluginbroker -
plugin- -
stacks -
theia -
ubi-minimal
-
ターゲットプラットフォームで対応していないコンテナーイメージの一覧から除外します。
AMD64 および Intel 64 (x86_64)の場合は、
openj9イメージを除外します。例11.2
openj9イメージを除く AMD64 および Intel 64 (x86_64)のイメージ一覧che_workspace_plugin_broker_artifacts=registry.redhat.io/codeready-workspaces/pluginbroker-artifacts-rhel8@sha256:bde2f4c7c21d7cd7d826d4f4bbd2ee9f31b2119e2d2aa10253592099598cf5ba; che_workspace_plugin_broker_metadata=registry.redhat.io/codeready-workspaces/pluginbroker-metadata-rhel8@sha256:457dd2db3d72cc1d823e1219d657ae32e3a9da26f7dd420e0185d1cbe872a792; codeready_workspaces_machineexec_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/machineexec-rhel8@sha256:1e25377fe0538ef380030a898fcfcff9493ff0bdbaa4db77d648cdcb0036816b; codeready_workspaces_plugin_java11_devfile_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/plugin-java11-rhel8@sha256:2036cbb70aae5f5d507657bd4b820e340ee0bacf3d4b520d80dbd21aad85e13a; codeready_workspaces_plugin_java11_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/plugin-java11-rhel8@sha256:2036cbb70aae5f5d507657bd4b820e340ee0bacf3d4b520d80dbd21aad85e13a; codeready_workspaces_plugin_java8_devfile_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/plugin-java8-rhel8@sha256:f0ecc1812888611407c23ede1d3952dfb7b9bd597c336f22995cc4d8d9c23edd; codeready_workspaces_plugin_java8_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/plugin-java8-rhel8@sha256:f0ecc1812888611407c23ede1d3952dfb7b9bd597c336f22995cc4d8d9c23edd; codeready_workspaces_plugin_kubernetes_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/plugin-kubernetes-rhel8@sha256:5f40400fb032b419e90bb334c8748470eb50e9dc4662b487364e494ccf8a3f05; codeready_workspaces_plugin_openshift_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/plugin-openshift-rhel8@sha256:c4be840840349bb647e6ace19b519b8b3e9676da42bb094512be1fafd411ae37; codeready_workspaces_stacks_cpp_devfile_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-cpp-rhel8@sha256:fc621b59be72465ab82cfa293b5b190521eecfed9c353051a7e72592837891c1; codeready_workspaces_stacks_cpp_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-cpp-rhel8@sha256:fc621b59be72465ab82cfa293b5b190521eecfed9c353051a7e72592837891c1; codeready_workspaces_stacks_dotnet_devfile_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-dotnet-rhel8@sha256:88134d9fd6b7c81e237e6295183d59cfe3e546762315e93f4d6fb547ecdfaeba; codeready_workspaces_stacks_dotnet_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-dotnet-rhel8@sha256:88134d9fd6b7c81e237e6295183d59cfe3e546762315e93f4d6fb547ecdfaeba; codeready_workspaces_stacks_golang_devfile_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-golang-rhel8@sha256:ef135a05399a4d5f58bcb059b6634498bee5adbbcf8ddb2956abf25819e82462; codeready_workspaces_stacks_golang_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-golang-rhel8@sha256:ef135a05399a4d5f58bcb059b6634498bee5adbbcf8ddb2956abf25819e82462; codeready_workspaces_stacks_php_devfile_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-php-rhel8@sha256:f2ee2cf24f649092568f932977193f585caac19ef23892968d0fe4dbc90f4a35; codeready_workspaces_stacks_php_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-php-rhel8@sha256:f2ee2cf24f649092568f932977193f585caac19ef23892968d0fe4dbc90f4a35; codeready_workspaces_theia_endpoint_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/theia-endpoint-rhel8@sha256:128e281bceaccfcb3f9c3aebdd218b6bb6381f9c41cff2259eba47dd49d95c4d; codeready_workspaces_theia_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/theia-rhel8@sha256:928f5792cc39e6b7785f4f92ec0d6a5b9cd36fb285c1f72d12239beb05d8696e; jboss_eap_7_eap74_openjdk8_openshift_rhel7_devfile_registry_image_g4xdilrqbi______=registry.redhat.io/jboss-eap-7/eap74-openjdk8-openshift-rhel7@sha256:b4a113c4d4972d142a3c350e2006a2b297dc883f8ddb29a88db19c892358632d; jboss_eap_7_eap_xp3_openjdk11_openshift_devfile_registry_image_gmxdaljzbi______=registry.redhat.io/jboss-eap-7/eap-xp3-openjdk11-openshift-rhel8@sha256:3875b2ee2826a6d8134aa3b80ac0c8b5ebc4a7f718335d76dfc3461b79f93d19; pvc_jobs=registry.redhat.io/ubi8/ubi-minimal@sha256:c536d4c63253318fdfc1db499f8f4bb0881db7fbd6f3d1554b4d54c812f85cc7; rhscl_mongodb_36_rhel7_devfile_registry_image_gewtkmak=registry.redhat.io/rhscl/mongodb-36-rhel7@sha256:9f799d356d7d2e442bde9d401b720600fd9059a3d8eefea6f3b2ffa721c0dc73;IBM Z および IBM Power Systems の場合は、
java8およびjava11のopenj9バージョンを使用しdotnetを除外します。例11.3 IBM Z および IBM Power Systems のイメージ一覧:
java8およびjava11のopenj9バージョンを使用し、dotnetを除くche_workspace_plugin_broker_artifacts=registry.redhat.io/codeready-workspaces/pluginbroker-artifacts-rhel8@sha256:bde2f4c7c21d7cd7d826d4f4bbd2ee9f31b2119e2d2aa10253592099598cf5ba; che_workspace_plugin_broker_metadata=registry.redhat.io/codeready-workspaces/pluginbroker-metadata-rhel8@sha256:457dd2db3d72cc1d823e1219d657ae32e3a9da26f7dd420e0185d1cbe872a792; codeready_workspaces_machineexec_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/machineexec-rhel8@sha256:1e25377fe0538ef380030a898fcfcff9493ff0bdbaa4db77d648cdcb0036816b; codeready_workspaces_plugin_java11_openj9_devfile_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/plugin-java11-openj9-rhel8@sha256:fc5e110243a8e30d23705897a1766de20ec637db4442d419ba05ace3b874c27f; codeready_workspaces_plugin_java11_openj9_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/plugin-java11-openj9-rhel8@sha256:fc5e110243a8e30d23705897a1766de20ec637db4442d419ba05ace3b874c27f; codeready_workspaces_plugin_java8_openj9_devfile_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/plugin-java8-openj9-rhel8@sha256:27fe438df6cfccdfb5d1e927cfa2f360b3bed3fbc409e923e68714a1ef586461; codeready_workspaces_plugin_java8_openj9_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/plugin-java8-openj9-rhel8@sha256:27fe438df6cfccdfb5d1e927cfa2f360b3bed3fbc409e923e68714a1ef586461; codeready_workspaces_plugin_kubernetes_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/plugin-kubernetes-rhel8@sha256:5f40400fb032b419e90bb334c8748470eb50e9dc4662b487364e494ccf8a3f05; codeready_workspaces_plugin_openshift_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/plugin-openshift-rhel8@sha256:c4be840840349bb647e6ace19b519b8b3e9676da42bb094512be1fafd411ae37; codeready_workspaces_stacks_cpp_devfile_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-cpp-rhel8@sha256:fc621b59be72465ab82cfa293b5b190521eecfed9c353051a7e72592837891c1; codeready_workspaces_stacks_cpp_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-cpp-rhel8@sha256:fc621b59be72465ab82cfa293b5b190521eecfed9c353051a7e72592837891c1; codeready_workspaces_stacks_golang_devfile_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-golang-rhel8@sha256:ef135a05399a4d5f58bcb059b6634498bee5adbbcf8ddb2956abf25819e82462; codeready_workspaces_stacks_golang_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-golang-rhel8@sha256:ef135a05399a4d5f58bcb059b6634498bee5adbbcf8ddb2956abf25819e82462; codeready_workspaces_stacks_php_devfile_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-php-rhel8@sha256:f2ee2cf24f649092568f932977193f585caac19ef23892968d0fe4dbc90f4a35; codeready_workspaces_stacks_php_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/stacks-php-rhel8@sha256:f2ee2cf24f649092568f932977193f585caac19ef23892968d0fe4dbc90f4a35; codeready_workspaces_theia_endpoint_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/theia-endpoint-rhel8@sha256:128e281bceaccfcb3f9c3aebdd218b6bb6381f9c41cff2259eba47dd49d95c4d; codeready_workspaces_theia_plugin_registry_image_gixdcnak=registry.redhat.io/codeready-workspaces/theia-rhel8@sha256:928f5792cc39e6b7785f4f92ec0d6a5b9cd36fb285c1f72d12239beb05d8696e; jboss_eap_7_eap74_openjdk8_openshift_rhel7_devfile_registry_image_g4xdilrqbi______=registry.redhat.io/jboss-eap-7/eap74-openjdk8-openshift-rhel7@sha256:b4a113c4d4972d142a3c350e2006a2b297dc883f8ddb29a88db19c892358632d; jboss_eap_7_eap_xp3_openj9_11_openshift_devfile_registry_image_gmxdacq_=registry.redhat.io/jboss-eap-7/eap-xp3-openj9-11-openshift-rhel8@sha256:44f82c43a730acbfb4ce2be81ca32197099c370eeb85cedbee3d1e89e9ac7684; jboss_eap_7_eap_xp3_openjdk11_openshift_devfile_registry_image_gmxdaljzbi______=registry.redhat.io/jboss-eap-7/eap-xp3-openjdk11-openshift-rhel8@sha256:3875b2ee2826a6d8134aa3b80ac0c8b5ebc4a7f718335d76dfc3461b79f93d19; pvc_jobs=registry.redhat.io/ubi8/ubi-minimal@sha256:c536d4c63253318fdfc1db499f8f4bb0881db7fbd6f3d1554b4d54c812f85cc7; rhscl_mongodb_36_rhel7_devfile_registry_image_gewtkmak=registry.redhat.io/rhscl/mongodb-36-rhel7@sha256:9f799d356d7d2e442bde9d401b720600fd9059a3d8eefea6f3b2ffa721c0dc73;
プル前の一覧からイメージを判別します。
ワークスペースの起動時間を短縮するには、ワークスペース関連のイメージを事前にプルすることを検討してください。
-
theia-rhel8 -
theia-endpoint-rhel8 -
pluginbroker-artifacts-rhel8 -
pluginbroker-metadata-rhel8 -
stacks-*-rhel8 plugin-*-rhel8- スタックイメージの一覧:コンテナーイメージ: スタック
- プラグインイメージの一覧:コンテナーイメージ: プラグイン
-
関連情報