Hitachi

Hitachi Microservices Platform - Paxos Commit Transaction Orchestrator ユーザーズガイド


3.4.10 uCosminexus Application Runtime with Java for Spring Bootスナップショットログの永続ボリュームおよび永続ボリューム要求のKubernetesマニフェストの作成(通常版限定)

以降に示す要件を満たすように、uCosminexus Application Runtime with Java for Spring Bootスナップショットログの永続ボリュームおよび永続ボリューム要求のKubernetesマニフェストを作成してください。この作業は、次のどちらかのKubernetesアプリケーションの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マニフェストの作成要領を次に示します。

<永続ボリュームの作成要領>

<永続ボリューム要求の作成要領>

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