2.3. ワークスペースの例
本セクションでは、CodeReady Workspaces ワークスペースの例を説明します。
以下の devfile は、CodeReady Workspaces ワークスペースを定義します。
apiVersion: 1.0.0 metadata: generateName: nodejs-configmap- projects: - name: nodejs-configmap source: location: "https://github.com/crw-samples/nodejs-configmap.git" branch: 12.x type: git components: - id: vscode/typescript-language-features/latest type: chePlugin - mountSources: true type: kubernetes entrypoints: - command: - sleep args: - infinity reference: 'https://raw.githubusercontent.com/crw-samples/nodejs-mongodb-sample/master/kubernetes-manifests/guestbook-app.deployment.yaml' alias: guestbook-frontend
この表は、各ワークスペースコンポーネントのメモリー要件を示しています。
表2.3 ワークスペースメモリー要件および制限の合計
Pod | コンテナー名 | デフォルトのメモリー制限 | デフォルトのメモリー要求 |
---|---|---|---|
ワークスペース |
| 512 MiB | 512 MiB |
ワークスペース |
| 128 MiB | 32 MiB |
ワークスペース |
| 512 MiB | 512 MiB |
ワークスペース |
| 1 GiB | 512 MiB |
JWT プロキシー | verifier | 128 MiB | 128 MiB |
合計 | 2.25 GiB | 1.38 GiB |
-
devfile に含まれていない場合でも、
theia-ide
およびmachine-exec
コンポーネントは暗黙的にワークスペースに追加されます。 -
machine-exec
で必要なリソースは、chePlugin
のデフォルトです。 -
theia-ide
のリソースは、cheEditor
meta.yaml
でmemoryLimit
が 512 MiB に設定されます。 -
Typescript VS Code 拡張は、デフォルトのメモリー制限もオーバーライドします。
meta.yaml
ファイルでは、制限は明示的に 512 MiB に指定されます。 -
CodeReady Workspaces は、
dockerimage
コンポーネントタイプのデフォルト(メモリー制限 1 GiB とメモリー要求の 512 MiB) を適用します。 - JWT コンテナーには 128 MiB のメモリーが必要です。
すべての内容を追加すると、制限が 2.25 GiB の 1.38 GiB のメモリー要求が設定されます。
関連情報
- 1章アーキテクチャーの概要
- https://access.redhat.com/documentation/ja-jp/red_hat_codeready_workspaces/2.13/html-single/installation_guide/index#configuring-the-che-installation.adoc
- https://access.redhat.com/documentation/ja-jp/red_hat_codeready_workspaces/2.13/html-single/installation_guide/index#advanced-configuration-options-for-the-che-server-component.adoc
- https://access.redhat.com/documentation/ja-jp/red_hat_codeready_workspaces/2.13/html-single/end-user_guide/index#authoring-devfiles-version-2.adoc
- 「ユーザーの認証」
- CodeReady Workspaces プラグインレジストリーリポジトリー