3.4.10 uCosminexus Application Runtime with Java for Spring Bootスナップショットログの永続ボリュームおよび永続ボリューム要求のKubernetesマニフェストの作成(通常版限定)
以降に示す要件を満たすように、uCosminexus Application Runtime with Java for Spring Bootスナップショットログの永続ボリュームおよび永続ボリューム要求のKubernetesマニフェストを作成してください。この作業は、次のどちらかのKubernetesアプリケーションのKubernetesマニフェスト作成時に実施します。
-
ユーザ責務のKubernetesアプリケーション
-
HMP-PCTOのコントロールプレーンおよびRASのKubernetesアプリケーション
uCosminexus Application Runtime with Java for Spring Bootスナップショットログの永続ボリュームの種類を「NFS」とし、アクセスモード(accessModes)を「ReadWriteMany」とすることで、Cosminexus Application Runtime with Java for Spring Bootをインストールした各Podがどのノードからでも永続ボリュームにスナップショットログを出力できるようにします。
uCosminexus Application Runtime with Java for Spring Bootスナップショットログの永続ボリュームおよび永続ボリューム要求のKubernetesマニフェストの作成要領を次に示します。
<永続ボリュームの作成要領>
-
uCosminexus Application Runtime with Java for Spring BootをインストールしたPodで使用しているNamespace名の数と同じ数だけ、永続ボリュームのKubernetesマニフェストを作成してください。
- 例1)
-
Mediator/Orchestrator/Entity-Service/ParticipantのNamespace名が「my-namespace」の場合、Namespace名の数は1つであるため、Kubernetesマニフェストを1つ作成します。
- 例2)
-
MediatorのNamespace名が「my-namespace-0」、Orchestrator/Entity-Service/ParticipantのNamespace名が「my-namespace-1」の場合、Namespace名の数は2つであるため、Kubernetesマニフェストを2つ作成します。
-
各永続ボリュームの名称(.metadata.nameフィールド)に、ユーザ任意の名称を指定してください。なお、名称はKubernetesマニフェストごとに一意にする必要があります。ここで指定した名称は、後述の各永続ボリューム要求の.spec.volumeNameフィールドの値に指定します。
-
各永続ボリュームの.spec.capacity.storageフィールドに、スナップショットログの出力先となる永続ボリュームのサイズを指定してください。
-
各永続ボリュームの.spec.accessModesフィールドに、「ReadWriteMany」を指定してください。
-
各永続ボリュームの.persistentVolumeReclaimPolicyフィールドに、「Retain」を指定してください。
-
各永続ボリュームは、ボリュームの種類を「NFS」とし、「(15) uCosminexus Application Runtime with Java for Spring Bootスナップショットログの永続ボリュームマウント用ディレクトリ作成(通常版限定)」で作成するNFS上のボリュームマウント用ディレクトリパスを指定してください。
<永続ボリューム要求の作成要領>
-
<永続ボリュームの作成要領>と同様に、永続ボリューム要求についても、uCosminexus Application Runtime with Java for Spring BootをインストールしたPodで使用しているNamespace名の数と同じ数だけ、永続ボリューム要求のKubernetesマニフェストを作成してください。
-
各永続ボリューム要求の名称(.metadata.nameフィールド)に、ユーザ任意の名称を指定してください。なお、名称はKubernetesマニフェストごとに一意にする必要はありません(KubernetesマニフェストごとにNamespaceが異なり同一Namespace内で名称が重複しないため)。ここで指定した名称は、uCosminexus Application Runtime with Java for Spring Bootをインストールしたユーザ責務のKubernetesアプリケーションのKubernetesマニフェストの.spec.template.spec.volumes[].persistentVolumeClaim.claimNameフィールド、および、MediatorのHelmチャートの.ucars.snapshots.claimNameパラメタの値に指定します。
-
各永続ボリューム要求のNamespace(.metadata.namespaceフィールド)に、uCosminexus Application Runtime with Java for Spring BootをインストールしたPodで使用しているNamespace名を指定します。
-
各永続ボリューム要求の.spec.accessModesフィールドに、「ReadWriteMany」を指定してください。
-
各永続ボリューム要求の.spec.volumeNameフィールドに、前述の永続ボリュームで指定した名称を指定してください。
-
各永続ボリューム要求の.spec.resources.requests.storageフィールドに、スナップショットログの出力に必要なサイズを指定してください。
MediatorのConsensusLogの永続ボリュームおよびストレージクラスのKubernetesマニフェストの記述例を次に示します。
■uCosminexus Application Runtime with Java for Spring BootをインストールしたPodで使用しているNamespace名の数が1つである場合
apiVersion: v1
kind: PersistentVolume
metadata:
name: snapshot-volume
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
nfs:
server: nfs-server.example.com
path: /ucars-snapshots
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: snapshot-volume
namespace: my-namespace
spec:
accessModes:
- ReadWriteMany
volumeName: snapshot-volume
resources:
requests:
storage: 500Mi■uCosminexus Application Runtime with Java for Spring BootをインストールしたPodで使用しているNamespace名の数が2つである場合
apiVersion: v1
kind: PersistentVolume
metadata:
name: snapshot-volume-0
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
nfs:
server: nfs-server.example.com
path: /ucars-snapshots
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: snapshot-volume
namespace: my-namespace-0
spec:
accessModes:
- ReadWriteMany
volumeName: snapshot-volume-0
resources:
requests:
storage: 500Mi
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: snapshot-volume-1
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
nfs:
server: nfs-server.example.com
path: /ucars-snapshots
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: snapshot-volume
namespace: my-namespace-1
spec:
accessModes:
- ReadWriteMany
volumeName: snapshot-volume-1
resources:
requests:
storage: 500Mi