第8章 ワークスペースの起動を迅速化するイメージのキャッシュ

CodeReady Workspaces ワークスペースの起動時間のパフォーマンスを改善するには、Image Puller を使用します。Image Puller は追加の OpenShift デプロイメントです。これは、各ノードで関連するコンテナーイメージをダウンロードし、実行する DaemonSet を作成します。これらのイメージは、CodeReady Workspaces ワークスペースの起動時にすでに利用可能な状態です。

Image Puller は、設定の以下のパラメーターを提供します。

表8.1 Image Puller パラメーター

パラメーター使用法デフォルト

CACHING_INTERVAL_HOURS

デーモンセットのヘルスチェック間隔(時間単位)

"1"

CACHING_MEMORY_REQUEST

Puller の実行時にキャッシュされる各イメージのメモリー要求。「Image Puller のメモリーパラメーターの定義」 を参照してください。

10Mi

CACHING_MEMORY_LIMIT

Puller の実行時にキャッシュされる各イメージのメモリー制限。「Image Puller のメモリーパラメーターの定義」 を参照してください。

20Mi

CACHING_CPU_REQUEST

Puller の実行時にキャッシュされる各イメージのプロセッサー要求

.05 または 50 ミリコア

CACHING_CPU_LIMIT

Puller の実行時にキャッシュされる各イメージのプロセッサー制限

.2 または 200 ミリコア

DAEMONSET_NAME

作成するデーモンセットの名前

kubernetes-image-puller

DEPLOYMENT_NAME

作成するデプロイメントの名前

kubernetes-image-puller

NAMESPACE

作成するデーモンセットが含まれる OpenShift プロジェクト

k8s-image-puller

イメージ

プルするイメージのセミコロンで区切られた一覧<name1> =<image1&gt;;<name2>=<image2> を参照してください。「プルするイメージの一覧の定義」

 

NODE_SELECTOR

デーモンセットによって作成される Pod に適用するノードセレクター

'{}'

アフィニティー

DaemonSet によって作成される Pod に適用されるアフィニティー

'{}'

IMAGE_PULL_SECRETS

DeamonSet によって作成される Pod に追加するには pullsecret1;…​ 形式で、イメージプルシークレットの一覧。これらのシークレットはイメージ puller の namespace にある必要があり、クラスター管理者はそれらを作成する必要があります。

""

8.1. プルするイメージの一覧の定義

前提条件

手順

  1. 関連するコンテナーイメージの一覧を取得します。

    例8.1 CodeReady Workspaces 2.9 のすべてのイメージ一覧の取得

  2. ワークスペースの起動フェーズに関連するイメージを保持します。

    • eap
    • machineexec
    • mongodb
    • pluginbroker
    • plugin-
    • stacks
    • theia
    • ubi-minimal
  3. ターゲットプラットフォームでサポートされていないコンテナーイメージの一覧から除外します。

    • AMD64 および Intel 64(x86_64) の場合は、openj9 イメージを除外します。

      例8.2 AMD64 および Intel 64(x86_64)のイメージ一覧 (openj9 イメージを除く)

      che_workspace_plugin_broker_artifacts=registry.redhat.io/codeready-workspaces/pluginbroker-artifacts-rhel8@sha256:c0a096ed1829b21b0641d98c591139324affc0c866a5e011ae6627dd22d316c6;
      che_workspace_plugin_broker_metadata=registry.redhat.io/codeready-workspaces/pluginbroker-metadata-rhel8@sha256:cd977a7e55dff0d478be81762db17dad3e9daf2cc8f80d168f6e3adcccca3986;
      codeready_workspaces_machineexec=registry.redhat.io/codeready-workspaces/machineexec-rhel8@sha256:7bc2f046c1fcb00ab7656de7a7c31da73e71af3164314f77960061102f44c9da;
      codeready_workspaces_plugin_java11=registry.redhat.io/codeready-workspaces/plugin-java11-rhel8@sha256:e86be19ea5c4868f68188a46cec3f4131c1a18400f6800b27d5da92c95c2418b;
      codeready_workspaces_plugin_java8=registry.redhat.io/codeready-workspaces/plugin-java8-rhel8@sha256:bb8ec9c4964e39b335be589f027c4b5ec866fe5f742c7181473e70fff717655d;
      codeready_workspaces_plugin_kubernetes=registry.redhat.io/codeready-workspaces/plugin-kubernetes-rhel8@sha256:f40c6cf67df5294f5d767312633a5ce5cf8b542f660f52f3252c61d6c5342f9e;
      codeready_workspaces_plugin_openshift=registry.redhat.io/codeready-workspaces/plugin-openshift-rhel8@sha256:a8f9e97a6946bbd5e0ac515621408cb361531bc33c99983f17aaf547a44776a2;
      codeready_workspaces_stacks_cpp=registry.redhat.io/codeready-workspaces/stacks-cpp-rhel8@sha256:8855029f8658060e79513bd51bad33e38134adf0586286ef2a02bdf27e9dd526;
      codeready_workspaces_stacks_dotnet=registry.redhat.io/codeready-workspaces/stacks-dotnet-rhel8@sha256:0422cfa23c5eefdda978bbec4f1fc2c24fccfa5a9568d5bda69e3232efefec54;
      codeready_workspaces_stacks_golang=registry.redhat.io/codeready-workspaces/stacks-golang-rhel8@sha256:de9daf2d87903ebabf03f64e4c15d6f4f7106525396f31bad555ce858864219c;
      codeready_workspaces_stacks_php=registry.redhat.io/codeready-workspaces/stacks-php-rhel8@sha256:59c41da505474c48617cec3759064db55bab69bf8cd6f9752bfa95b8756dc710;
      codeready_workspaces_theia=registry.redhat.io/codeready-workspaces/theia-rhel8@sha256:925be51cad7d93eae735039cd76569ef14bdf546876584479a5b037758defc7b;
      codeready_workspaces_theia_endpoint=registry.redhat.io/codeready-workspaces/theia-endpoint-rhel8@sha256:42cd00002085280c39534ad856df6adac925218be07ee652b78d92c24cf71573;
      jboss_eap_7_eap73_openjdk8_openshift_rhel7=registry.redhat.io/jboss-eap-7/eap73-openjdk8-openshift-rhel7@sha256:d16cfe30eaf20a157cd5d5980a6c34f3fcbcfd2fd225e670a0138d81007dd919;
      jboss_eap_7_eap_xp2_openjdk11_openshift=registry.redhat.io/jboss-eap-7/eap-xp2-openjdk11-openshift-rhel8@sha256:647d092383a760edc083eafb2d7bc3208d6409097281bedbd5eaccde360e7e39;
      pvc_jobs=registry.redhat.io/ubi8/ubi-minimal@sha256:2f6b88c037c0503da7704bccd3fc73cb76324101af39ad28f16460e7bce98324;
      rhscl_mongodb_36_rhel7=registry.redhat.io/rhscl/mongodb-36-rhel7@sha256:9f799d356d7d2e442bde9d401b720600fd9059a3d8eefea6f3b2ffa721c0dc73;
    • IBM Z および IBM Power Systems の場合は、java8 および java 11 に openj9 バージョンを使用し、dotnet を除外します。

      例8.3 IBM Z および IBM Power Systems のイメージ一覧: java8 および java 11openj9 バージョンを使用し、dotnet を除く

      che_workspace_plugin_broker_artifacts=registry.redhat.io/codeready-workspaces/pluginbroker-artifacts-rhel8@sha256:c0a096ed1829b21b0641d98c591139324affc0c866a5e011ae6627dd22d316c6;
      che_workspace_plugin_broker_metadata=registry.redhat.io/codeready-workspaces/pluginbroker-metadata-rhel8@sha256:cd977a7e55dff0d478be81762db17dad3e9daf2cc8f80d168f6e3adcccca3986;
      codeready_workspaces_machineexec=registry.redhat.io/codeready-workspaces/machineexec-rhel8@sha256:7bc2f046c1fcb00ab7656de7a7c31da73e71af3164314f77960061102f44c9da;
      codeready_workspaces_plugin_java11_openj9=registry.redhat.io/codeready-workspaces/plugin-java11-openj9-rhel8@sha256:3fa85acf846cf774276bd243e58eaaf3ff26cc53e2fbaf69ad336ef8a054e741;
      codeready_workspaces_plugin_java8_openj9=registry.redhat.io/codeready-workspaces/plugin-java8-openj9-rhel8@sha256:2593b8602800de8e0713cf31708fec8c68dcb0d92f8da770ebe89d9310c04e6a;
      codeready_workspaces_plugin_kubernetes=registry.redhat.io/codeready-workspaces/plugin-kubernetes-rhel8@sha256:f40c6cf67df5294f5d767312633a5ce5cf8b542f660f52f3252c61d6c5342f9e;
      codeready_workspaces_plugin_openshift=registry.redhat.io/codeready-workspaces/plugin-openshift-rhel8@sha256:a8f9e97a6946bbd5e0ac515621408cb361531bc33c99983f17aaf547a44776a2;
      codeready_workspaces_stacks_cpp=registry.redhat.io/codeready-workspaces/stacks-cpp-rhel8@sha256:8855029f8658060e79513bd51bad33e38134adf0586286ef2a02bdf27e9dd526;
      codeready_workspaces_stacks_golang=registry.redhat.io/codeready-workspaces/stacks-golang-rhel8@sha256:de9daf2d87903ebabf03f64e4c15d6f4f7106525396f31bad555ce858864219c;
      codeready_workspaces_stacks_php=registry.redhat.io/codeready-workspaces/stacks-php-rhel8@sha256:59c41da505474c48617cec3759064db55bab69bf8cd6f9752bfa95b8756dc710;
      codeready_workspaces_theia=registry.redhat.io/codeready-workspaces/theia-rhel8@sha256:925be51cad7d93eae735039cd76569ef14bdf546876584479a5b037758defc7b;
      codeready_workspaces_theia_endpoint=registry.redhat.io/codeready-workspaces/theia-endpoint-rhel8@sha256:42cd00002085280c39534ad856df6adac925218be07ee652b78d92c24cf71573;
      jboss_eap_7_eap73_openjdk8_openshift_rhel7=registry.redhat.io/jboss-eap-7/eap73-openjdk8-openshift-rhel7@sha256:d16cfe30eaf20a157cd5d5980a6c34f3fcbcfd2fd225e670a0138d81007dd919;
      jboss_eap_7_eap_xp2_openj9_11_openshift=registry.redhat.io/jboss-eap-7/eap-xp2-openj9-11-openshift-rhel8@sha256:7cdfbf16587dd8688f26595df43c8c30e069625997581e898368203cb059c88b;
      jboss_eap_7_eap_xp2_openjdk11_openshift=registry.redhat.io/jboss-eap-7/eap-xp2-openjdk11-openshift-rhel8@sha256:647d092383a760edc083eafb2d7bc3208d6409097281bedbd5eaccde360e7e39;
      pvc_jobs=registry.redhat.io/ubi8/ubi-minimal@sha256:2f6b88c037c0503da7704bccd3fc73cb76324101af39ad28f16460e7bce98324;
      rhscl_mongodb_36_rhel7=registry.redhat.io/rhscl/mongodb-36-rhel7@sha256:9f799d356d7d2e442bde9d401b720600fd9059a3d8eefea6f3b2ffa721c0dc73;
  4. Dockerfile でボリュームをマウントするコンテナーイメージの一覧から除外します。

関連情報