2.3. ワークスペースの例
本セクションでは、CodeReady Workspaces ワークスペースの例を説明します。
以下の devfile は、CodeReady Workspaces ワークスペースを定義します。
apiVersion: 1.0.0 metadata: generateName: guestbook-nodejs-sample- projects: - name: guestbook-nodejs-sample source: type: git location: "https://github.com/l0rd/nodejs-sample" components: - type: chePlugin id: che-incubator/typescript/latest - type: kubernetes alias: guestbook-frontend reference: https://raw.githubusercontent.com/l0rd/nodejs-sample/master/kubernetes-manifests/guestbook-frontend.deployment.yaml mountSources: true entrypoints: - command: ['sleep'] args: ['infinity']
この表は、各ワークスペースコンポーネントのメモリー要件を示しています。
表2.3 ワークスペースメモリー要件および制限の合計
Pod | コンテナー名 | デフォルトのメモリー制限 | デフォルトのメモリー要求 |
---|---|---|---|
ワークスペース |
theia-ide(デフォルトの | 512 MiB | 512 MiB |
ワークスペース |
machine-exec (デフォルトの | 128 MiB | 128 MiB |
ワークスペース |
vscode-typescript ( | 512 MiB | 512 MiB |
ワークスペース |
frontend ( | 1 GiB | 512 MiB |
JWT プロキシー | verifier | 128 MiB | 128 MiB |
合計 | 2.25 GiB | 1.75 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 は、
kubernetes
コンポーネントタイプのデフォルト(メモリー制限 1 GiB とメモリー要求の 512 MiB) を適用します。これは、kubernetes
コンポーネントが、リソースの制限や要求のないコンテナー仕様を持つDeployment
マニフェストを参照するためです。 - JWT コンテナーには 128 MiB のメモリーが必要です。
すべての内容を追加すると、制限が 2.25 GiB の 1.75 GiB のメモリー要求が設定されます。
関連資料
- 1章CodeReady Workspaces アーキテクチャーの概要
- Kubernetes コンピュートリソース管理に関するドキュメント
- https://access.redhat.com/documentation/en-us/red_hat_codeready_workspaces/2.5/html-single/installation_guide/index#configuring-the-codeready-workspaces-installation_crw
- https://access.redhat.com/documentation/en-us/red_hat_codeready_workspaces/2.5/html-single/installation_guide/index#advanced-configuration-options-for-the-codeready-workspaces-server-component_crw
- https://access.redhat.com/documentation/en-us/red_hat_codeready_workspaces/2.5/html-single/end-user_guide/index#making-a-workspace-portable-using-a-devfile_crw
- https://access.redhat.com/documentation/en-us/red_hat_codeready_workspaces/2.5/html-single/end-user_guide/index#a-minimal-devfile_crw
- 「ユーザーの認証」
- che-plugin-registry GitHub リポジトリー