13.5. バッチ操作の例
これらのバッチ操作の例を、Batch
CR で Data Grid リソースを作成および変更する際の開始点として使用します。
注記
設定ファイルは、ConfigMap
を介してのみ、Data Grid Operator に渡すことができます。
ConfigMap
は、/etc/batch
の Data Grid Pod にマウントされるため、すべての --file=
ディレクティブの前にそのパスを追加する必要があります。
13.5.1. キャッシュ
- 設定ファイルから複数のキャッシュを作成します。
echo "creating caches..." create cache sessions --file=/etc/batch/infinispan-prod-sessions.xml create cache tokens --file=/etc/batch/infinispan-prod-tokens.xml create cache people --file=/etc/batch/infinispan-prod-people.xml create cache books --file=/etc/batch/infinispan-prod-books.xml create cache authors --file=/etc/batch/infinispan-prod-authors.xml echo "list caches in the cluster" ls caches
- ファイルからテンプレートを作成してから、テンプレートからキャッシュを作成します。
echo "creating caches..." create cache mytemplate --file=/etc/batch/mycache.xml create cache sessions --template=mytemplate create cache tokens --template=mytemplate echo "list caches in the cluster" ls caches