2. Helm chart (Kubernetes)

2.1. 目的

本書では、Exastro IT Automation を利用する際に必要となる、Exastro Platform および Exastro IT Automation を Kubernetes 上に導入する手順について説明します。

2.2. 特徴

高い可用性やサービスレベルを必要とされる際の、Exastro IT Automation の導入方法となります。
評価や一時的な利用など、簡単に利用を開始したい場合には、Docker Compose 版 の利用を推奨します。

2.3. 前提条件

  • クライアント要件

    動作確認が取れているクライアントアプリケーションのバージョンは下記のとおりです。
    表 2.9 クライアント要件

    アプリケーション

    バージョン

    Helm

    v3.9.x

    kubectl

    1.23

  • デプロイ環境

    動作確認が取れているコンテナ環境の最小要求リソースとバージョンは下記のとおりです。
    表 2.10 ハードウェア要件(最小構成)

    リソース種別

    要求リソース

    CPU

    2 Cores (3.0 GHz, x86_64)

    Memory

    4GB

    Storage (Container image size)

    10GB

    Kubernetes (Container image size)

    1.23 以上

    表 2.11 ハードウェア要件(推奨構成)

    リソース種別

    要求リソース

    CPU

    4 Cores (3.0 GHz, x86_64)

    Memory

    16GB

    Storage (Container image size)

    120GB

    Kubernetes (Container image size)

    1.23 以上

    警告

    要求リソースは Exastro IT Automation のコア機能に対する値です。同一クラスタ上に Keycloak や MariaDB などの外部ツールをデプロイする場合は、その分のリソースが別途必要となります。
    データベースおよびファイルの永続化のために、別途ストレージ領域を用意する必要があります。
    Storage サイズには、Exastro IT Automation が使用する入出力データのファイルは含まれていないため、利用状況に応じて容量を見積もる必要があります。
  • 通信要件

    • クライアントからデプロイ先のコンテナ環境にアクセスできる必要があります。

    • Platform 管理者用と一般ユーザー用の2つ通信ポートが使用となります。

    • コンテナ環境からコンテナイメージの取得のために、Docker Hub に接続できる必要があります。

  • 外部コンポーネント

    • MariaDB、もしくは、MySQL サーバ

    • GitLab リポジトリ、および、アカウントの払い出しが可能なこと

    警告

    GitLab 環境を同一クラスタに構築する場合は、GitLab のシステム要件に対応する最小要件を追加で容易する必要があります。
    Database 環境を同一クラスタに構築する場合は、使用する Database のシステム要件に対応する最小要件を定義する必要があります

2.4. インストールの準備

2.4.1. Helm リポジトリの登録

Exastro システムは、以下の2つのアプリケーションから構成されています。
Exastro の全ツールは同一の Helm リポジトリ上に存在しています。
  • 共通基盤 (Exastro Platform)

  • Exastro IT Automation

リポジトリ

https://exastro-suite.github.io/exastro-helm/

リスト 2.1 コマンド
1# Exastro システムの Helm リポジトリを登録
2helm repo add exastro https://exastro-suite.github.io/exastro-helm/ -n exastro
3# リポジトリ情報の更新
4helm repo update

2.4.2. デフォルト設定値の取得

投入するパラメータを管理しやすくするために、下記のコマンドから共通基盤 values.yaml のデフォルト値を出力します。
リスト 2.2 コマンド
helm show values exastro/exastro > exastro.yaml
exastro.yaml
  1# Default values for Exastro.
  2# This is a YAML-formatted file.
  3# Declare variables to be passed into your templates.
  4global:
  5  itaGlobalDefinition:
  6    config:
  7      DEFAULT_LANGUAGE: "ja"
  8      LANGUAGE: "en"
  9      TZ: "Asia/Tokyo"
 10    secret:
 11      ENCRYPT_KEY: ""
 12    persistence:
 13      enabled: true
 14      accessMode: ReadWriteMany
 15      size: 10Gi
 16      volumeType: hostPath # e.g.) hostPath or AKS
 17      storageClass: "-" # e.g.) azurefile or - (None)
 18      # matchLabels:
 19      #   release: "stable"
 20      # matchExpressions:
 21      #   - {key: environment, operator: In, values: [dev]}
 22  itaDatabaseDefinition:
 23    config:
 24      DB_VENDOR: "mariadb"
 25      DB_HOST: "mariadb"
 26      DB_PORT: "3306"
 27      DB_DATABASE: "ITA_DB"
 28    secret:
 29      DB_ADMIN_USER: "root"
 30      DB_ADMIN_PASSWORD: "Ch@ngeMeDBAdm"
 31      DB_USER: "ITA_USER"
 32      DB_PASSWORD: "Ch@ngeMeITADB"
 33  pfGlobalDefinition:
 34    config:
 35      DEFAULT_LANGUAGE: "ja"
 36      LANGUAGE: "en"
 37      TZ: "Asia/Tokyo"
 38    secret:
 39      ENCRYPT_KEY: ""
 40  pfDatabaseDefinition:
 41    config:
 42      DB_VENDOR: "mariadb"
 43      DB_HOST: "mariadb"
 44      DB_PORT: "3306"
 45      DB_DATABASE: "platform"
 46    secret:
 47      DB_ADMIN_USER: "root"
 48      DB_ADMIN_PASSWORD: "Ch@ngeMeDBAdm"
 49      DB_USER: "pf-user"
 50      DB_PASSWORD: "Ch@ngeMePFDB"
 51  keycloakDefinition:
 52    secret:
 53      SYSTEM_ADMIN: "admin"
 54      SYSTEM_ADMIN_PASSWORD: "Ch@ngeMeKCAdm"
 55      KEYCLOAK_DB_USER: "keycloak"
 56      KEYCLOAK_DB_PASSWORD: "Ch@ngeMeKCADB"
 57  gitlabDefinition:
 58    config:
 59      GITLAB_PROTOCOL: "http"
 60      GITLAB_HOST: "" # "gitlab" if use container.
 61      GITLAB_PORT: "8080"
 62    secret:
 63      GITLAB_ROOT_PASSWORD: "Ch@ngeMeGL"
 64      GITLAB_ROOT_TOKEN: "change-this-token"
 65  mongoDefinition:
 66    config:
 67      MONGO_PROTOCOL: "http"
 68      MONGO_HOST: "mongo" # "mongo" if use container.
 69      MONGO_PORT: "27017"
 70    secret:
 71      MONGO_ADMIN_USER: "admin"
 72      MONGO_ADMIN_PASSWORD: "Ch@ngeMeMGAdm"
 73
 74exastro-it-automation:
 75  ita-api-admin:
 76    replicaCount: 1
 77    image:
 78      repository: "docker.io/exastro/exastro-it-automation-api-admin"
 79      tag: ""
 80      pullPolicy: IfNotPresent
 81    extraEnv:
 82      PLATFORM_API_HOST: "platform-api"
 83      PLATFORM_API_PORT: "8000"
 84
 85  ita-api-organization:
 86    replicaCount: 1
 87    image:
 88      repository: "docker.io/exastro/exastro-it-automation-api-organization"
 89      tag: ""
 90      pullPolicy: IfNotPresent
 91    extraEnv:
 92      PLATFORM_API_HOST: "platform-api"
 93      PLATFORM_API_PORT: "8000"
 94
 95  ita-api-oase-receiver:
 96    replicaCount: 1
 97    image:
 98      repository: "docker.io/exastro/exastro-it-automation-api-oase-receiver"
 99      tag: ""
100      pullPolicy: IfNotPresent
101    extraEnv:
102      LISTEN_PORT: "8000"
103      PLATFORM_API_HOST: "platform-api"
104      PLATFORM_API_PORT: "8000"
105
106  ita-by-ansible-execute:
107    replicaCount: 1
108    image:
109      repository: "docker.io/exastro/exastro-it-automation-by-ansible-execute"
110      tag: ""
111      pullPolicy: IfNotPresent
112    extraEnv:
113      EXECUTE_INTERVAL: "10"
114      ANSIBLE_AGENT_IMAGE: "docker.io/exastro/exastro-it-automation-by-ansible-agent"
115      ANSIBLE_AGENT_IMAGE_TAG: ""
116      PLATFORM_API_HOST: "platform-api"
117      PLATFORM_API_PORT: "8000"
118    serviceAccount:
119      create: false
120      name: "ita-by-ansible-execute-sa"
121
122  ita-by-ansible-legacy-role-vars-listup:
123    replicaCount: 1
124    extraEnv:
125      EXECUTE_INTERVAL: "10"
126      PLATFORM_API_HOST: "platform-api"
127      PLATFORM_API_PORT: "8000"
128    image:
129      repository: "docker.io/exastro/exastro-it-automation-by-ansible-legacy-role-vars-listup"
130      tag: ""
131      pullPolicy: IfNotPresent
132
133  ita-by-ansible-legacy-vars-listup:
134    replicaCount: 1
135    extraEnv:
136      EXECUTE_INTERVAL: "10"
137      PLATFORM_API_HOST: "platform-api"
138      PLATFORM_API_PORT: "8000"
139    image:
140      repository: "docker.io/exastro/exastro-it-automation-by-ansible-legacy-vars-listup"
141      tag: ""
142      pullPolicy: IfNotPresent
143
144  ita-by-ansible-pioneer-vars-listup:
145    replicaCount: 1
146    extraEnv:
147      EXECUTE_INTERVAL: "10"
148      PLATFORM_API_HOST: "platform-api"
149      PLATFORM_API_PORT: "8000"
150    image:
151      repository: "docker.io/exastro/exastro-it-automation-by-ansible-pioneer-vars-listup"
152      tag: ""
153      pullPolicy: IfNotPresent
154
155  ita-by-ansible-towermaster-sync:
156    replicaCount: 1
157    extraEnv:
158      EXECUTE_INTERVAL: "10"
159      PLATFORM_API_HOST: "platform-api"
160      PLATFORM_API_PORT: "8000"
161    image:
162      repository: "docker.io/exastro/exastro-it-automation-by-ansible-towermaster-sync"
163      tag: ""
164      pullPolicy: IfNotPresent
165
166  ita-by-cicd-for-iac:
167    replicaCount: 1
168    extraEnv:
169      EXECUTE_INTERVAL: "10"
170      PLATFORM_API_HOST: "platform-api"
171      PLATFORM_API_PORT: "8000"
172    image:
173      repository: "docker.io/exastro/exastro-it-automation-by-cicd-for-iac"
174      tag: ""
175      pullPolicy: IfNotPresent
176
177  ita-by-collector:
178    replicaCount: 1
179    extraEnv:
180      EXECUTE_INTERVAL: "10"
181      PLATFORM_API_HOST: "platform-api"
182      PLATFORM_API_PORT: "8000"
183    image:
184      repository: "docker.io/exastro/exastro-it-automation-by-collector"
185      tag: ""
186      pullPolicy: IfNotPresent
187
188  ita-by-conductor-regularly:
189    replicaCount: 1
190    extraEnv:
191      EXECUTE_INTERVAL: "10"
192      PLATFORM_API_HOST: "platform-api"
193      PLATFORM_API_PORT: "8000"
194    image:
195      repository: "docker.io/exastro/exastro-it-automation-by-conductor-regularly"
196      tag: ""
197      pullPolicy: IfNotPresent
198
199  ita-by-conductor-synchronize:
200    replicaCount: 1
201    extraEnv:
202      EXECUTE_INTERVAL: "10"
203      PLATFORM_API_HOST: "platform-api"
204      PLATFORM_API_PORT: "8000"
205    image:
206      repository: "docker.io/exastro/exastro-it-automation-by-conductor-synchronize"
207      tag: ""
208      pullPolicy: IfNotPresent
209
210  ita-by-excel-export-import:
211    replicaCount: 1
212    extraEnv:
213      EXECUTE_INTERVAL: "10"
214      PLATFORM_API_HOST: "platform-api"
215      PLATFORM_API_PORT: "8000"
216    image:
217      repository: "docker.io/exastro/exastro-it-automation-by-excel-export-import"
218      tag: ""
219      pullPolicy: IfNotPresent
220
221  ita-by-execinstance-dataautoclean:
222    replicaCount: 1
223    extraEnv:
224      EXECUTE_INTERVAL: "10"
225      PLATFORM_API_HOST: "platform-api"
226      PLATFORM_API_PORT: "8000"
227    image:
228      repository: "docker.io/exastro/exastro-it-automation-by-execinstance-dataautoclean"
229      tag: ""
230      pullPolicy: IfNotPresent
231
232  ita-by-file-autoclean:
233    replicaCount: 1
234    extraEnv:
235      EXECUTE_INTERVAL: "10"
236      PLATFORM_API_HOST: "platform-api"
237      PLATFORM_API_PORT: "8000"
238    image:
239      repository: "docker.io/exastro/exastro-it-automation-by-file-autoclean"
240      tag: ""
241      pullPolicy: IfNotPresent
242
243  ita-by-hostgroup-split:
244    replicaCount: 1
245    extraEnv:
246      EXECUTE_INTERVAL: "10"
247      PLATFORM_API_HOST: "platform-api"
248      PLATFORM_API_PORT: "8000"
249    image:
250      repository: "docker.io/exastro/exastro-it-automation-by-hostgroup-split"
251      tag: ""
252      pullPolicy: IfNotPresent
253
254  ita-by-menu-create:
255    replicaCount: 1
256    extraEnv:
257      EXECUTE_INTERVAL: "10"
258      PLATFORM_API_HOST: "platform-api"
259      PLATFORM_API_PORT: "8000"
260    image:
261      repository: "docker.io/exastro/exastro-it-automation-by-menu-create"
262      tag: ""
263      pullPolicy: IfNotPresent
264
265  ita-by-menu-export-import:
266    replicaCount: 1
267    extraEnv:
268      EXECUTE_INTERVAL: "10"
269      PLATFORM_API_HOST: "platform-api"
270      PLATFORM_API_PORT: "8000"
271    image:
272      repository: "docker.io/exastro/exastro-it-automation-by-menu-export-import"
273      tag: ""
274      pullPolicy: IfNotPresent
275
276  ita-by-oase-conclusion:
277    replicaCount: 1
278    extraEnv:
279      EXECUTE_INTERVAL: "10"
280      PLATFORM_API_HOST: "platform-api"
281      PLATFORM_API_PORT: "8000"
282    image:
283      repository: "docker.io/exastro/exastro-it-automation-by-oase-conclusion"
284      tag: ""
285      pullPolicy: IfNotPresent
286
287  ita-by-terraform-cli-execute:
288    replicaCount: 1
289    extraEnv:
290      EXECUTE_INTERVAL: "10"
291      PLATFORM_API_HOST: "platform-api"
292      PLATFORM_API_PORT: "8000"
293    image:
294      repository: "docker.io/exastro/exastro-it-automation-by-terraform-cli-execute"
295      tag: ""
296      pullPolicy: IfNotPresent
297
298  ita-by-terraform-cli-vars-listup:
299    replicaCount: 1
300    extraEnv:
301      EXECUTE_INTERVAL: "10"
302      PLATFORM_API_HOST: "platform-api"
303      PLATFORM_API_PORT: "8000"
304    image:
305      repository: "docker.io/exastro/exastro-it-automation-by-terraform-cli-vars-listup"
306      tag: ""
307      pullPolicy: IfNotPresent
308
309  ita-by-terraform-cloud-ep-execute:
310    replicaCount: 1
311    extraEnv:
312      EXECUTE_INTERVAL: "10"
313      PLATFORM_API_HOST: "platform-api"
314      PLATFORM_API_PORT: "8000"
315    image:
316      repository: "docker.io/exastro/exastro-it-automation-by-terraform-cloud-ep-execute"
317      tag: ""
318      pullPolicy: IfNotPresent
319
320  ita-by-terraform-cloud-ep-vars-listup:
321    replicaCount: 1
322    extraEnv:
323      EXECUTE_INTERVAL: "10"
324      PLATFORM_API_HOST: "platform-api"
325      PLATFORM_API_PORT: "8000"
326    image:
327      repository: "docker.io/exastro/exastro-it-automation-by-terraform-cloud-ep-vars-listup"
328      tag: ""
329      pullPolicy: IfNotPresent
330
331  ita-web-server:
332    replicaCount: 1
333    image:
334      repository: "docker.io/exastro/exastro-it-automation-web-server"
335      tag: ""
336      pullPolicy: IfNotPresent
337
338  ita-migration:
339    extraEnv:
340      PLATFORM_API_HOST: "platform-api"
341      PLATFORM_API_PORT: "8000"
342    image:
343      repository: "docker.io/exastro/exastro-it-automation-migration"
344      tag: ""
345      pullPolicy: IfNotPresent
346
347exastro-platform:
348  platform-api:
349    image:
350      repository: "docker.io/exastro/exastro-platform-api"
351      tag: ""
352
353  platform-auth:
354    extraEnv:
355      # Please set the URL to access
356      EXTERNAL_URL: ""
357      EXTERNAL_URL_MNG: ""
358    ingress:
359      enabled: true
360      hosts:
361        - host: exastro-suite.example.local
362          paths:
363            - path: /
364              pathType: Prefix
365              backend: "http"
366        - host: exastro-suite-mng.example.local
367          paths:
368            - path: /
369              pathType: Prefix
370              backend: "httpMng"
371    service:
372      type: ClusterIP
373      # http:
374      #   nodePort: 30080
375      # httpMng:
376      #   nodePort: 30081
377    image:
378      repository: "docker.io/exastro/exastro-platform-auth"
379      tag: ""
380
381  platform-job:
382    extraEnv:
383      # LOG_LEVEL: "INFO"
384      # SUB_PROCESS_TERMINATE_REQUEST_SECONDS: "1800"
385      # SUB_PROCESS_ACCEPTABLE: "2"
386      # SUB_PROCESS_MAX_JOBS: "10"
387      # SUB_PROCESS_WATCH_INTERVAL_SECONDS: "1.0"
388      # SUB_PROCESS_DB_RECONNECT_INTERVAL_SECONDS: "60"
389      # SUB_PROCESS_DB_HEALTH_CHECK_INTERVAL_SECONDS: "5"
390      # SUB_PROCESS_MAX_CANCEL_TIMEOUT: "10"
391      # JOB_STATUS_WATCH_INTERVAL_SECONDS: "1.0"
392      # JOB_CANCEL_TIMEOUT_SECONDS: "5.0"
393      # JOB_NOTIFICATION_TIMEOUT_SECONDS: "20"
394      # JOB_NOTIFICATION_TEAMS_CONNECTION_TIMEOUT: "3.0"
395      # JOB_NOTIFICATION_TEAMS_READ_TIMEOUT: "10.0"
396      # JOB_NOTIFICATION_SMTP_TIMEOUT: "10.0"
397      # JOB_NOTIFICATION_SMTPS_SSL_VERIFY_ENABLED: "TRUE"
398      # JOB_FORCE_UPDATE_STATUS_TIMEOUT_SECONDS: "60"
399      # JOB_FORCE_UPDATE_STATUS_INTERVAL_SECONDS: "180"
400      # JOB_FORCE_UPDATE_STATUS_PROGRASS_SECONDS: "600"
401    image:
402      repository: "docker.io/exastro/exastro-platform-job"
403      tag: ""
404
405  platform-migration:
406    image:
407      repository: "docker.io/exastro/exastro-platform-migration"
408      tag: ""
409
410  platform-web:
411    image:
412      repository: "docker.io/exastro/exastro-platform-web"
413      tag: ""
414
415  mariadb:
416    enabled: true
417    image:
418      repository: "docker.io/mariadb"
419      tag: "10.11"
420      pullPolicy: IfNotPresent
421    imagePullSecrets: []
422    persistence:
423      enabled: true
424      accessMode: ReadWriteOnce
425      size: 20Gi
426      storageClass: "-" # e.g.) azurefile or - (None)
427      matchLabels:
428        name: pv-database
429      matchExpressions:
430        # - {key: name, operator: In, values: [pv-database]}
431    dbSetup:
432      dbConfInfo:
433        name: mysql-server-conf-config
434        customCnf: |-
435          [mysqld]
436          character-set-server=utf8mb4
437          collation-server=utf8mb4_bin
438          secure_file_priv=/tmp
439          lower_case_table_names=1
440          [client]
441          default-character-set=utf8mb4
442    resources:
443      requests:
444        memory: "256Mi"
445        cpu: "1m"
446      limits:
447        memory: "2Gi"
448        cpu: "4"
449
450  keycloak:
451    enabled: true
452    image:
453      repository: "docker.io/exastro/keycloak"
454      tag: ""
455      pullPolicy: IfNotPresent
456    resources: {}
457      # requests:
458      #   memory: "256Mi"
459      #   cpu: "1m"
460      # limits:
461      #   memory: "2Gi"
462      #   cpu: "4"
463
464  gitlab:
465    enabled: false
466    extraEnv:
467      GITLAB_OMNIBUS_CONFIG: |
468        postgresql['shared_buffers'] = "2048MB"
469        postgresql['work_mem'] = "128MB"
470        postgresql['maintenance_work_mem'] = "128MB"
471        postgresql['effective_cache_size'] = "128MB"
472        postgresql['checkpoint_segments'] = 16
473        postgresql['checkpoint_timeout'] = "10min"
474        external_url 'http://gitlab:40080'
475        nginx['listen_port'] = 40080
476        gitlab_rails['initial_root_password'] = "${GITLAB_ROOT_PASSWORD:-}"
477        gitlab_rails['registry_enabled'] = false;
478        gitlab_rails['db_prepared_statements'] = false;
479        gitlab_rails['monitoring_whitelist'] = ['0.0.0.0/0']
480        # gitlab_rails['env'] = {'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000'}
481        # puma['worker_processes'] = 0
482        prometheus_monitoring['enable'] = false
483        # sidekiq['max_concurrency'] = 10
484        # gitaly['env'] = {'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000', 'GITALY_COMMAND_SPAWN_MAX_PARALLEL' => '2'}
485      GITLAB_POST_RECONFIGURE_SCRIPT: |
486        while ! curl -sfI -o /dev/null http://localhost:40080/-/readiness;
487        do
488        echo "GitLab service is not ready."
489        sleep 1
490        done
491        echo "GitLab service started normally"
492        curl -Ssf -H "PRIVATE-TOKEN: ${GITLAB_ROOT_TOKEN:-}" "http://localhost:40080/api/v4/version" || (
493          gitlab-rails runner "token = User.find_by_username('root').personal_access_tokens.create(scopes: [:api, :write_repository, :sudo], name: 'exastro system token'); token.set_token('${GITLAB_ROOT_TOKEN:-}'); token.save!"
494        )
495        echo "GitLab post reconfigure script ended."
496    image:
497      repository: "docker.io/gitlab/gitlab-ce"
498      tag: "15.11.13-ce.0"
499      pullPolicy: IfNotPresent
500      # Overrides the image tag whose default is the chart appVersion.
501    persistence:
502      enabled: true
503      volumeName: pv-gitlab
504      accessMode: ReadWriteMany
505      size: 20Gi
506      storageClass: "-" # e.g.) azurefile or - (None)
507      matchLabels:
508        name: pv-gitlab
509      matchExpressions:
510        # - {key: name, operator: In, values: [pv-gitlab]}
511    resources: {}
512      # requests:
513      #   memory: "4Gi"
514      #   cpu: "4"
515      # limits:
516      #   memory: "8Gi"
517      #   cpu: "8"
518    service:
519      type: ClusterIP
520      name: gitlab
521      port: 40080
522      # nodePort: 30082
523
524  mongo:
525    enabled: true
526    image:
527      repository: "docker.io/mongo"
528      pullPolicy: IfNotPresent
529      # Overrides the image tag whose default is the chart appVersion.
530      tag: "6.0"
531    persistence:
532      enabled: true
533      accessMode: ReadWriteOnce
534      size: 20Gi
535      storageClass: "-" # e.g.) azurefile, local-path or - (None)
536      matchLabels:
537        # release: "pv-mongo"
538      matchExpressions:
539        # - {key: name, operator: In, values: [pv-mongo]}
540    dbSetup:
541      dbConfInfo:
542        name: mongo-server-conf-config
543        customCnf: |
544          systemLog:
545            verbosity: 0
546            # destination: file
547            # path: /root/logs/mongod.log
548            timeStampFormat: iso8601-utc
549          # storage:
550          #   directoryPerDB: true
551          #   dbPath: /root/data
552          #   engine: wiredTiger
553          #   wiredTiger:
554          #     engineConfig:
555          #       cacheSizeGB: 1
556          #   journal:
557          #     enabled: true
558          # processManagement:
559          #   fork: true
560          # net:
561          #   port: 27017
562          #   bindIp: 0.0.0.0
563          # security:
564          #   authorization: enabled
565    resources: {}
566      # requests:
567      #   memory: "4Gi"
568      #   cpu: "4"
569      # limits:
570      #   memory: "8Gi"
571      #   cpu: "4"
572    affinity:
573      podAntiAffinity:
574        requiredDuringSchedulingIgnoredDuringExecution:
575        - labelSelector:
576            matchExpressions:
577            - key: name
578              operator: In
579              values:
580              - mongo
581          topologyKey: kubernetes.io/hostname
以降の手順では、この exastro.yaml に対してインストールに必要なパラメータを設定してきいます。

2.4.3. サービス公開の設定

Exastro サービスを公開するための代表的な3つの設定方法について紹介します。
  • Ingress

  • LoadBalancer

  • NodePort

注釈

ここで紹介する方法以外にもサービス公開方法はあります。ユーザの環境ごとに適切な構成・設定を選択してください。

2.4.3.1. パラメータ

利用可能なパラメータについては下記を参照してください。
表 2.12 Exastro Platform 認証機能のオプションパラメータ

パラメータ

説明

変更

デフォルト値・選択可能な設定値

exastro-platform.platform-auth.extraEnv.EXTERNAL_URL

Exastro Platform エンドポイントの公開URL。
リバースプロキシや PAT(Port Address Transport) などにより、Exastro のエンドポイントと公開時の URL に齟齬が発生することで、サービス接続に失敗する場合に設定をする必要があります。

公開用エンドポイントのURL
(http[s]://your-exastro.domain:port)

exastro-platform.platform-auth.extraEnv.EXTERNAL_URL_MNG

Exastro Platform 管理コンソールのエンドポイントの公開URL。
リバースプロキシや PAT(Port Address Transport) などにより、Exastro のエンドポイントと公開時の URL に齟齬が発生することで、サービス接続に失敗する場合に設定をする必要があります。

公開用エンドポイントのURL
(http[s]://your-exastro.domain:port)

exastro-platform.platform-auth.ingress.enabled

Exastro Platform における Ingress 利用の要否

true (デフォルト): Exastro Platform にアクセスするための Ingress Controller をデプロイします。
false : Ingress Controller をデプロイしません。

exastro-platform.platform-auth.ingress.hosts[0].host

Exastro Platform 管理コンソールエンドポイントのホスト名、もしくは、FQDN
別途、DNSへのレコード登録が必要です。

可 (Ingress利用時)

"exastro-suite.example.local"

exastro-platform.platform-auth.ingress.hosts[0].paths[0].path

Exastro Platform 管理コンソールエンドポイントのパスのルール

不可

"/"

exastro-platform.platform-auth.ingress.hosts[0].paths[0].pathType

Exastro Platform 管理コンソールエンドポイントのパスの一致条件

不可

"Prefix"

exastro-platform.platform-auth.ingress.hosts[0].paths[0].backend

Exastro Platform 管理コンソールのサービス名

不可

"http"

exastro-platform.platform-auth.ingress.hosts[1].host

Exastro Platform エンドポイントのホスト名、もしくは、FQDN
別途、DNSへのレコード登録が必要です。

可 (Ingress利用時)

"exastro-suite-mng.example.local"

exastro-platform.platform-auth.ingress.hosts[1].paths[0].path

Exastro Platform エンドポイントのパスのルール

不可

"/"

exastro-platform.platform-auth.ingress.hosts[1].paths[0].pathType

Exastro Platform エンドポイントのパスの一致条件

不可

"Prefix"

exastro-platform.platform-auth.ingress.hosts[1].paths[0].backend

Exastro Platform エンドポイントのエンドポイントのサービス名

不可

"httpMng"

exastro-platform.platform-auth.service.type

Exastro Platform のサービスタイプ

ClusterIP (デフォルト): Ingress Controller を利用する場合などに選択
LoadBalancer : LoadBalancer を利用する場合に選択
NodePort : NodePort を利用する場合に選択

exastro-platform.platform-auth.service.http.nodePort

Exastro Platform のサービス用公開ポート番号

可 (NodePort利用時)

"30080"

exastro-platform.platform-auth.service.httpMng.nodePort

Exastro Platform のシステム管理用公開ポート番号

可 (NodePort利用時)

"30081"

exastro-platform.platform-auth.image.repository

コンテナイメージのリポジトリ名

不可

"docker.io/exastro/exastro-platform-auth"

exastro-platform.platform-auth.image.tag

コンテナイメージのタグ

不可

""

2.4.3.2. 設定例

各サービス公開方法の設定例を下記に記載します。
  • 特徴

パブリッククラウドなどで Ingress Controller が利用可能な場合、Ingress を使ったサービス公開ができます。
クラスタ内にロードバランサーを構築して、ユーザ自身が運用したい場合などにメリットがあります。
  • 設定例

サービス公開用のドメイン情報を Ingress に登録することでDNSを使ったサービス公開を行います。
Azure におけるドメイン名の確認方法については ドメイン名の確認 を確認してください。
クラウドプロバイダ毎に必要な annotations を指定してください。
下記は、AKS の Ingress Controller を使用する際の例を記載しています。
リスト 2.3 exastro.yaml
353 platform-auth:
354   extraEnv:
355     # Please set the URL to access
356-    EXTERNAL_URL: ""
357-    EXTERNAL_URL_MNG: ""
358+    EXTERNAL_URL: "http://exastro-suite.xxxxxxxxxxxxxxxxxx.japaneast.aksapp.io"
359+    EXTERNAL_URL_MNG: "http://exastro-suite-mng.xxxxxxxxxxxxxxxxxx.japaneast.aksapp.io"
360   ingress:
361     enabled: true
362+    annotations:
363+      kubernetes.io/ingress.class: addon-http-application-routing
364+      nginx.ingress.kubernetes.io/proxy-body-size: 100m
365+      nginx.ingress.kubernetes.io/proxy-buffer-size: 256k
366+      nginx.ingress.kubernetes.io/server-snippet: |
367+        client_header_buffer_size 100k;
368+        large_client_header_buffers 4 100k;
369     hosts:
370-      - host: exastro-suite.example.local
371+      - host: exastro-suite.xxxxxxxxxxxxxxxxxx.japaneast.aksapp.io
372         paths:
373           - path: /
374             pathType: Prefix
375             backend: "http"
376-      - host: exastro-suite-mng.example.local
377+      - host: exastro-suite-mng.xxxxxxxxxxxxxxxxxx.japaneast.aksapp.io
378         paths:
379           - path: /
380             pathType: Prefix
381             backend: "httpMng"

2.4.4. データベース連携

Exastro サービスを利用するためには、CMDB やオーガナイゼーションの管理のためのデータベースが必要となります。
データベース利用時の3つの設定方法について説明します。
  • 外部データベース

  • データベースコンテナ

  • 特徴

マネージドデータベースや別途用意した Kubernetes クラスタ外のデータベースを利用します。
Kubernetes クラスタ外にあるため、環境を分離して管理することが可能です。

警告

複数のITAを構築する場合はlower_case_table_namesの設定を統一してください。
※統一しないと環境間でのメニューエクスポート・インポートが正常に動作しなくなる可能性があります。
  • 設定例

外部データベースを操作するために必要な接続情報を設定します。

警告

DB_ADMIN_USERMONGO_ADMIN_USER で指定するDBの管理ユーザには、データベースとユーザを作成する権限が必要です。

警告

認証情報などはすべて平文で問題ありません。(Base64エンコードは不要)
  1. Exastro IT Automation 用データベースの設定

    データベースの接続情報を設定します。
    表 2.13 共通設定 (Exastro IT Automation 用データベース) のオプションパラメータ

    パラメータ

    説明

    変更

    デフォルト値・選択可能な設定値

    global.itaDatabaseDefinition.name

    Exastro IT Automation 用データベースの定義名

    不可

    "ita-database"

    global.itaDatabaseDefinition.enabled

    Exastro IT Automation 用データベースの定義の利用有無

    不可

    true

    global.itaDatabaseDefinition.config.DB_VENDOR

    Exastro IT Automation 用データベースで使用するデータベース

    可 (外部データベース利用時)

    "mariadb" (デフォルト): MariaDB を利用
    "mysql": MySQL を利用

    global.itaDatabaseDefinition.config.DB_HOST

    Exastro IT Automation 用データベース利用するDB
    デフォルト状態では、同一の Kubernetes クラスタ内にデプロイされるコンテナを指定しています。
    クラスタ外部の DB を利用する場合には設定が必要となります。

    可 (外部データベース利用時)

    "mariadb"

    global.itaDatabaseDefinition.config.DB_PORT

    Exastro IT Automation 用データベースで利用するポート番号(TCP)

    可 (外部データベース利用時)

    "3306"

    global.itaDatabaseDefinition.config.DB_DATABASE

    Exastro IT Automation 用データベースで利用するデータベース名

    可 (外部データベース利用時)

    "platform"

    global.itaDatabaseDefinition.secret.DB_ADMIN_USER

    Exastro IT Automation 用データベースで利用する管理権限を持つDBユーザ名

    必須

    管理権限を持つDBユーザ名

    global.itaDatabaseDefinition.secret.DB_ADMIN_PASSWORD

    Exastro IT Automation 用データベースで利用する管理権限を持つDBユーザのパスワード(エンコードなし)

    必須

    管理権限を持つDBユーザ名のパスワード

    global.itaDatabaseDefinition.secret.DB_USER

    Exastro IT Automation 用データベースに作成するDBユーザ名。
    指定した DB ユーザが作成される。

    必須

    任意の文字列

    global.itaDatabaseDefinition.secret.DB_PASSWORD

    Exastro IT Automation 用データベースに作成するDBユーザのパスワード(エンコードなし)

    必須

    任意の文字列

    リスト 2.6 exastro.yaml
    22  itaDatabaseDefinition:
    23    config:
    24-     DB_VENDOR: "mariadb"
    25-     DB_HOST: "mariadb"
    26-     DB_PORT: "3306"
    27+     DB_VENDOR: "mariadb"                # mariadb or mysql
    28+     DB_HOST: "your.database.endpoint"   # データベースのエンドポイント
    29+     DB_PORT: "3306"                     # データベース接続ポート
    30      DB_DATABASE: "ITA_DB"               # 変更不要
    31    secret:
    32-     DB_ADMIN_USER: "root"
    33-     DB_ADMIN_PASSWORD: "Ch@ngeMeDBAdm"
    34+     DB_ADMIN_USER: "your-admin-account"      # データベースの管理権限を持つユーザ
    35+     DB_ADMIN_PASSWORD: "your-admin-password" # データベースの管理権限を持つユーザのパスワード
    36      DB_USER: "ITA_USER"
    37      DB_PASSWORD: "Ch@ngeMeITADB"
    
  2. Exastro 共通基盤用データベースの設定

    データベースの接続情報を設定します。
    表 2.14 共通設定 (Exastro 共通基盤用データベース) のオプションパラメータ

    パラメータ

    説明

    変更

    デフォルト値・選択可能な設定値

    global.pfDatabaseDefinition.name

    認証機能用データベースの定義名

    不可

    "pf-database"

    global.pfDatabaseDefinition.enabled

    認証機能用データベースの定義の有効有無

    不可

    true

    global.pfDatabaseDefinition.config.DB_VENDOR

    認証機能用データベースで使用するデータベース

    可 (外部データベース利用時)

    "mariadb" (デフォルト): MariaDB を利用
    "mysql": MySQL を利用

    global.pfDatabaseDefinition.config.DB_HOST

    認証機能用データベース利用するDB
    デフォルト状態では、同一の Kubernetes クラスタ内にデプロイされるコンテナを指定しています。
    クラスタ外部の DB を利用する場合には設定が必要となります。

    可 (外部データベース利用時)

    "mariadb"

    global.pfDatabaseDefinition.config.DB_PORT

    認証機能用データベースで利用するポート番号(TCP)

    可 (外部データベース利用時)

    "3306"

    global.pfDatabaseDefinition.config.DB_DATABASE

    認証機能用データベースで利用するデータベース名

    可 (外部データベース利用時)

    "platform"

    global.pfDatabaseDefinition.secret.DB_ADMIN_USER

    認証機能用データベースで利用する管理権限を持つDBユーザ名

    必須

    管理権限を持つDBユーザ名

    global.pfDatabaseDefinition.secret.DB_ADMIN_PASSWORD

    認証機能用データベースで利用する管理権限を持つDBユーザのパスワード(エンコードなし)

    必須

    管理権限を持つDBユーザ名のパスワード

    global.pfDatabaseDefinition.secret.DB_USER

    認証機能用データベースに作成するDBユーザ名。
    指定した DB ユーザが作成される。

    必須

    任意の文字列

    global.pfDatabaseDefinition.secret.DB_PASSWORD

    認証機能用データベースに作成するDBユーザのパスワード(エンコードなし)

    必須

    任意の文字列

    リスト 2.7 exastro.yaml
    40  pfDatabaseDefinition:
    41    config:
    42-     DB_VENDOR: "mariadb"
    43-     DB_HOST: "mariadb"
    44-     DB_PORT: "3306"
    45+     DB_VENDOR: "mariadb"                # mariadb or mysql
    46+     DB_HOST: "your.database.endpoint"   # データベースのエンドポイント
    47+     DB_PORT: "3306"                     # データベース接続ポート
    48      DB_DATABASE: "platform"             # 変更不要
    49    secret:
    50-     DB_ADMIN_USER: "root"
    51-     DB_ADMIN_PASSWORD: "Ch@ngeMeDBAdm"
    52+     DB_ADMIN_USER: "your-admin-account"      # データベースの管理者ユーザ
    53+     DB_ADMIN_PASSWORD: "your-admin-password" # データベースの管理者ユーザのパスワード
    54      DB_USER: "ITA_USER"
    55      DB_PASSWORD: "Ch@ngeMeITADB"
    
  3. OASE用データベースの設定

    OASE用データベースの接続情報を設定します。(OASEを利用しない場合設定不要)
    表 2.15 OASE設定 (Exastro OASE用データベース) のオプションパラメータ

    パラメータ

    説明

    変更

    デフォルト値・選択可能な設定値

    global.mongoDefinition.config.MONGO_PROTOCOL

    OASE用データベースで利用するDBのプロトコル

    "http"

    global.mongoDefinition.config.MONGO_HOST

    OASE用データベース利用するDB
    デフォルト状態では、同一の Kubernetes クラスタ内にデプロイされるコンテナを指定しています。
    クラスタ外部の DB を利用する場合には設定が必要となります。

    可 (外部データベース利用時)

    "mongo"

    global.mongoDefinition.config.MONGO_PORT

    OASE用データベースで利用するポート番号(TCP)

    可 (外部データベース利用時)

    "27017"

    global.mongoDefinition.secret.MONGO_ADMIN_USER

    OASE用データベースで利用する管理権限を持つDBユーザ名

    必須

    管理権限を持つDBユーザ名

    global.mongoDefinition.secret.DB_ADMIN_PASSWORD

    OASE用データベースで利用する管理権限を持つDBユーザのパスワード(エンコードなし)

    必須

    管理権限を持つDBユーザ名のパスワード

    リスト 2.8 exastro.yaml
    65  mongoDefinition:
    66    config:
    67-     MONGO_PROTOCOL: "http"
    68-     MONGO_HOST: "mongo"
    69-     MONGO_PORT: "27017"
    70+     MONGO_PROTOCOL: "your.protocol"        # http or https
    71+     MONGO_HOST: "your.database.endpoint"   # OASE用データベースのエンドポイント
    72+     MONGO_PORT: "your.port"                # OASE用データベース接続ポート
    73    secret:
    74-     MONGO_ADMIN_USER: "admin"
    75-     MONGO_ADMIN_PASSWORD: "Ch@ngeMeMGAdm"
    76+     MONGO_ADMIN_USER: "your-admin-account"      # OASE用データベースの管理者ユーザ
    77+     MONGO_ADMIN_PASSWORD: "your-admin-password" # OASE用データベースの管理者ユーザのパスワード
    
  4. データベースコンテナの無効化

    データベースコンテナが起動しないように設定します。
    表 2.16 MariaDB コンテナのオプションパラメータ

    パラメータ

    説明

    変更

    デフォルト値・選択可能な設定値

    exastro-platform.mariadb.enabled

    MariaDB コンテナのデプロイの有無

    true (デフォルト): MariaDB コンテナをデプロイします。
    false : MariaDB コンテナをデプロイしません。

    exastro-platform.mariadb.image.repository

    コンテナイメージのリポジトリ名

    不可

    "docker.io/mariadb"

    exastro-platform.mariadb.image.tag

    コンテナイメージのタグ

    不可

    "10.11"

    exastro-platform.mariadb.image.pullPolicy

    イメージプルポリシー

    IfNotPresent (デフォルト): コンテナイメージが存在しない場合のみプル
    Always: 毎回必ずプル
    None: プルしない

    exastro-platform.mariadb.persistence.enabled

    Exastro 共用データベースのデータ永続化の有効フラグ

    "true" (デフォルト): データを永続化する
    "false": データを永続化しない

    exastro-platform.mariadb.persistence.reinstall

    再インストール時にデータ領域の初期化の要否

    不可

    "true": データを初期化(削除)する
    "false" (デフォルト): データを初期化(削除)しない

    exastro-platform.mariadb.persistence.accessMode

    永続ボリュームのアクセスモードの指定。

    可(データ永続化時)

    "ReadWriteOnce"

    exastro-platform.mariadb.persistence.size

    永続ボリュームのディスク容量

    可 (データ永続化時)

    "20Gi"

    exastro-platform.mariadb.persistence.storageClass

    永続ボリュームにストレージクラスを利用する場合のクラスを指定

    可 (データ永続化時)

    "-" (デフォルト): ストレージクラスを指定しない。
    ストレージクラス名: クラウドプロバイダなどから提供されるストレージクラス名を指定。

    exastro-platform.mariadb.persistence.matchLabels.name

    利用する永続ボリューム名を指定

    可(データ永続化時)

    "pv-database"

    exastro-platform.mariadb.resources.requests.memory

    メモリ要求

    "256Mi"

    exastro-platform.mariadb.resources.requests.cpu

    CPU要求

    "1m"

    exastro-platform.mariadb.resources.limits.memory

    メモリ上限

    "2Gi"

    exastro-platform.mariadb.resources.limits.cpu

    CPU上限

    "4"

    リスト 2.9 exastro.yaml
    415  mariadb:
    416-   enabled: true
    417+   enabled: false
    
    OASE用データベースコンテナが起動しないように設定します。
    表 2.17 MongoDB コンテナのオプションパラメータ

    パラメータ

    説明

    変更

    デフォルト値・選択可能な設定値

    exastro-platform.mongo.enabled

    MongoDB コンテナのデプロイの有無

    true (デフォルト): MongoDB コンテナをデプロイします。
    false : MongoDB コンテナをデプロイしません。

    exastro-platform.mongo.image.repository

    コンテナイメージのリポジトリ名

    不可

    "mongo"

    exastro-platform.mongo.image.pullPolicy

    イメージプルポリシー

    IfNotPresent (デフォルト): コンテナイメージが存在しない場合のみプル
    Always: 毎回必ずプル
    None: プルしない

    exastro-platform.mongo.image.tag

    コンテナイメージのタグ

    不可

    "6.0"

    exastro-platform.mongo.persistence.enabled

    Exastro 共用データベースのデータ永続化の有効フラグ

    true (デフォルト): データを永続化する
    false: データを永続化しない

    exastro-platform.mongo.persistence.reinstall

    再インストール時にデータ領域の初期化の要否

    不可

    true : データを初期化(削除)する
    false (デフォルト): データを初期化(削除)しない

    exastro-platform.mongo.persistence.accessMode

    永続ボリュームのアクセスモードの指定。

    不可

    "ReadWriteOnce"

    exastro-platform.mongo.persistence.size

    永続ボリュームのディスク容量

    可 (データ永続化時)

    "20Gi"

    exastro-platform.mongo.persistence.storageClass

    永続ボリュームにストレージクラスを利用する場合のクラスを指定

    可 (データ永続化時)

    - (デフォルト): ストレージクラスを指定しない。
    ストレージクラス名: クラウドプロバイダなどから提供されるストレージクラス名を指定。

    exastro-platform.mongo.persistence.matchLabels.name

    利用する永続ボリューム名を指定

    不可

    "コメントアウト"

    exastro-platform.mongo.resources.requests.memory

    メモリ要求

    "256Mi"

    exastro-platform.mongo.resources.requests.cpu

    CPU要求

    "1m"

    exastro-platform.mongo.resources.limits.memory

    メモリ上限

    "2Gi"

    exastro-platform.mongo.resources.limits.cpu

    CPU上限

    "4"

    リスト 2.10 exastro.yaml
    524  mongo:
    525-   enabled: true
    526+   enabled: false
    

2.4.5. アプリケーションの DB ユーザ設定

Exastro でアプリケーションのために作成する DB ユーザの設定をします。

2.4.5.1. 設定例

下記のアプリケーションが利用・作成する DB ユーザをそれぞれ設定します。
  • Exastro IT Automation

  • Exastro 共通基盤

  • Keycloak

警告

認証情報などはすべて平文で問題ありません。(Base64エンコードは不要)
  1. Exastro IT Automation 用データベースの設定

    アプリケーションが利用・作成する DB ユーザを設定します。
    表 2.22 共通設定 (Exastro IT Automation 用データベース) のオプションパラメータ

    パラメータ

    説明

    変更

    デフォルト値・選択可能な設定値

    global.itaDatabaseDefinition.name

    Exastro IT Automation 用データベースの定義名

    不可

    "ita-database"

    global.itaDatabaseDefinition.enabled

    Exastro IT Automation 用データベースの定義の利用有無

    不可

    true

    global.itaDatabaseDefinition.config.DB_VENDOR

    Exastro IT Automation 用データベースで使用するデータベース

    可 (外部データベース利用時)

    "mariadb" (デフォルト): MariaDB を利用
    "mysql": MySQL を利用

    global.itaDatabaseDefinition.config.DB_HOST

    Exastro IT Automation 用データベース利用するDB
    デフォルト状態では、同一の Kubernetes クラスタ内にデプロイされるコンテナを指定しています。
    クラスタ外部の DB を利用する場合には設定が必要となります。

    可 (外部データベース利用時)

    "mariadb"

    global.itaDatabaseDefinition.config.DB_PORT

    Exastro IT Automation 用データベースで利用するポート番号(TCP)

    可 (外部データベース利用時)

    "3306"

    global.itaDatabaseDefinition.config.DB_DATABASE

    Exastro IT Automation 用データベースで利用するデータベース名

    可 (外部データベース利用時)

    "platform"

    global.itaDatabaseDefinition.secret.DB_ADMIN_USER

    Exastro IT Automation 用データベースで利用する管理権限を持つDBユーザ名

    必須

    管理権限を持つDBユーザ名

    global.itaDatabaseDefinition.secret.DB_ADMIN_PASSWORD

    Exastro IT Automation 用データベースで利用する管理権限を持つDBユーザのパスワード(エンコードなし)

    必須

    管理権限を持つDBユーザ名のパスワード

    global.itaDatabaseDefinition.secret.DB_USER

    Exastro IT Automation 用データベースに作成するDBユーザ名。
    指定した DB ユーザが作成される。

    必須

    任意の文字列

    global.itaDatabaseDefinition.secret.DB_PASSWORD

    Exastro IT Automation 用データベースに作成するDBユーザのパスワード(エンコードなし)

    必須

    任意の文字列

    リスト 2.16 exastro.yaml
    22  itaDatabaseDefinition:
    23    enabled: true
    24    config:
    25      DB_VENDOR: "mariadb"
    26      DB_HOST: "mariadb"
    27      DB_PORT: "3306"
    28      DB_DATABASE: "ITA_DB"
    29    secret:
    30      DB_ADMIN_USER: ""
    31      DB_ADMIN_PASSWORD: ""
    32-     DB_USER: ""
    33-     DB_PASSWORD: ""
    34+     DB_USER: "ita-db-user"                # Exastro IT Automation のアプリが使うDBユーザ
    35+     DB_PASSWORD: "ita-db-user-password"   # Exastro IT Automation のアプリが使うDBユーザのパスワード
    
  2. Keycloak 用データベースの設定

    アプリケーションが利用・作成する DB ユーザを設定します。
    表 2.23 共通設定 (Keycloak) のオプションパラメータ

    パラメータ

    説明

    変更

    デフォルト値・選択可能な設定値

    global.keycloakDefinition.name

    Keycloak の定義名

    不可

    keycloak

    global.keycloakDefinition.enabled

    Keycloak の定義の利用有無

    不可

    true

    global.keycloakDefinition.config.API_KEYCLOAK_PROTOCOL

    Keycloak API エンドポイントのプロトコル

    不可

    "http”

    global.keycloakDefinition.config.API_KEYCLOAK_HOST

    Keycloak API エンドポイントのホスト名、もしくは、FQDN

    不可

    "keycloak"

    global.keycloakDefinition.config.API_KEYCLOAK_PORT

    Keycloak API エンドポイントのポート番号

    不可

    "8080"

    global.keycloakDefinition.config.KEYCLOAK_PROTOCOL

    Keycloak エンドポイントのプロトコル

    不可

    "http"

    global.keycloakDefinition.config.KEYCLOAK_HOST

    Keycloak エンドポイントのホスト名、もしくは、FQDN

    不可

    "keycloak"

    global.keycloakDefinition.config.KEYCLOAK_PORT

    Keycloak API エンドポイントのポート番号

    不可

    "8080"

    global.keycloakDefinition.config.KEYCLOAK_MASTER_REALM

    Keycloak のマスターレルム名

    不可

    "master"

    global.keycloakDefinition.config.KEYCLOAK_DB_DATABASE

    Keycloak が利用するデータベース名

    不可

    "keycloak"

    global.keycloakDefinition.secret.SYSTEM_ADMIN

    Keycloak のマスターレルムにおける管理権限を持ったユーザ名を指定。
    指定した Keycloak ユーザが作成される。
    ※KEYCLOAK_USER→SYSTEM_ADMINに変更

    必須

    任意の文字列

    global.keycloakDefinition.secret.SYSTEM_ADMIN_PASSWORD

    Keycloak のマスターレルムにおける管理権限を持ったユーザに設定するパスワード(エンコードなし)
    ※KEYCLOAK_PASSWORD→SYSTEM_ADMIN_PASSWORDに変更

    必須

    任意の文字列

    global.keycloakDefinition.secret.KEYCLOAK_DB_USER

    Keycloak が使用するデータベースユーザ。
    指定した DB ユーザが作成される。

    必須

    任意の文字列

    global.keycloakDefinition.secret.KEYCLOAK_DB_PASSWORD

    Keycloak が使用するデータベースユーザのパスワード(エンコードなし)

    必須

    任意の文字列

    リスト 2.17 exastro.yaml
    51  keycloakDefinition:
    52    secret:
    53      SYSTEM_ADMIN: "admin"
    54      SYSTEM_ADMIN_PASSWORD: "Ch@ngeMeKCAdm"
    55-     KEYCLOAK_DB_USER: "keycloak"
    56-     KEYCLOAK_DB_PASSWORD: "Ch@ngeMeKCADB"
    57+     KEYCLOAK_DB_USER: "keycloak-db-user"               # Keycloak が使うDBユーザ
    58+     KEYCLOAK_DB_PASSWORD: "keycloak-db-user-password"  # Keycloak が使うDBユーザのパスワード
    
  3. Exastro 共通基盤用データベースの設定

    アプリケーションが利用・作成する DB ユーザを設定します。
    表 2.24 共通設定 (Exastro 共通基盤用データベース) のオプションパラメータ

    パラメータ

    説明

    変更

    デフォルト値・選択可能な設定値

    global.pfDatabaseDefinition.name

    認証機能用データベースの定義名

    不可

    "pf-database"

    global.pfDatabaseDefinition.enabled

    認証機能用データベースの定義の有効有無

    不可

    true

    global.pfDatabaseDefinition.config.DB_VENDOR

    認証機能用データベースで使用するデータベース

    可 (外部データベース利用時)

    "mariadb" (デフォルト): MariaDB を利用
    "mysql": MySQL を利用

    global.pfDatabaseDefinition.config.DB_HOST

    認証機能用データベース利用するDB
    デフォルト状態では、同一の Kubernetes クラスタ内にデプロイされるコンテナを指定しています。
    クラスタ外部の DB を利用する場合には設定が必要となります。

    可 (外部データベース利用時)

    "mariadb"

    global.pfDatabaseDefinition.config.DB_PORT

    認証機能用データベースで利用するポート番号(TCP)

    可 (外部データベース利用時)

    "3306"

    global.pfDatabaseDefinition.config.DB_DATABASE

    認証機能用データベースで利用するデータベース名

    可 (外部データベース利用時)

    "platform"

    global.pfDatabaseDefinition.secret.DB_ADMIN_USER

    認証機能用データベースで利用する管理権限を持つDBユーザ名

    必須

    管理権限を持つDBユーザ名

    global.pfDatabaseDefinition.secret.DB_ADMIN_PASSWORD

    認証機能用データベースで利用する管理権限を持つDBユーザのパスワード(エンコードなし)

    必須

    管理権限を持つDBユーザ名のパスワード

    global.pfDatabaseDefinition.secret.DB_USER

    認証機能用データベースに作成するDBユーザ名。
    指定した DB ユーザが作成される。

    必須

    任意の文字列

    global.pfDatabaseDefinition.secret.DB_PASSWORD

    認証機能用データベースに作成するDBユーザのパスワード(エンコードなし)

    必須

    任意の文字列

    リスト 2.18 exastro.yaml
    40  pfDatabaseDefinition:
    41    config:
    42      DB_VENDOR: "mariadb"
    43      DB_HOST: "mariadb"
    44      DB_PORT: "3306"
    45      DB_DATABASE: "platform"
    46    secret:
    47      DB_ADMIN_USER: "root"
    48      DB_ADMIN_PASSWORD: "Ch@ngeMeDBAdm"
    49-     DB_USER: "pf-user"
    50-     DB_PASSWORD: "Ch@ngeMePFDB"
    51+     DB_USER: "pf-db-user"           # Exastro 共通基盤が使うDBユーザ
    52+     DB_PASSWORD: "pf-db-password"   # Exastro 共通基盤が使うDBユーザのパスワード
    

2.4.6. GitLab 連携設定

GitLab 連携のための接続情報を登録します。

警告

GitLab 連携を利用しない場合は、下記のように設定してください。
GITLAB_HOST: ""
  • 外部GitLab

  • GitLabコンテナ

  • 特徴

マネージドGitLabや別途用意した Kubernetes クラスタ外のGitLabを利用します。
Kubernetes クラスタ外にあるため、環境を分離して管理することが可能です。
  • 設定例

外部GitLabを操作するために必要な接続情報を設定します。
  1. GitLabデータベースの設定

    GitLabコンテナに接続できるようにするための設定します。
表 2.25 共通設定 (GitLab) のオプションパラメータ

パラメータ

説明

変更

デフォルト値・選択可能な設定値

global.gitlabDefinition.name

GitLab の定義名

不可

gitlab

global.gitlabDefinition.enabled

GitLab の定義の利用有無

不可

true

global.gitlabDefinition.config.GITLAB_PROTOCOL

GitLab エンドポイントのプロトコル

http

global.gitlabDefinition.config.GITLAB_HOST

GitLab エンドポイントへのホスト名、もしくは、FQDN

gitlab

global.gitlabDefinition.config.GITLAB_PORT

GitLab エンドポイントのポート番号

80

global.gitlabDefinition.secret.GITLAB_ROOT_PASSWORD

GitLabのRoot権限のパスワード

必須

任意の文字列(8文字以上で予測可能な単語等は利用不可)

global.gitlabDefinition.secret.GITLAB_ROOT_TOKEN

GitLab の root 権限アカウントのアクセストークン

必須

アクセエストークン(平文)

警告

GITLAB_ROOT_TOKEN は下記の権限スコープが割り当てられたトークンが必要です。
・api
・write_repository
・sudo
下記は、GitLab 連携の設定例を記載しています。
リスト 2.19 exastro.yaml
57    gitlabDefinition:
58      config:
59-       GITLAB_PROTOCOL: "http"
60-       GITLAB_HOST: ""
61-       GITLAB_PORT: "8080"
62+       GITLAB_PROTOCOL: "接続プロトコル http or https"
63+       GITLAB_HOST: "接続先"
64+       GITLAB_PORT: "接続ポート"
65      secret:
66-       GITLAB_ROOT_PASSWORD: "Ch@ngeMeGL"
67-       GITLAB_ROOT_TOKEN: "change-this-token"
68+       GITLAB_ROOT_PASSWORD: "GitLabのRoot権限のパスワード"
69+       GITLAB_ROOT_TOKEN: "GitLabのRoot権限を持ったトークン"

2.4.7. Exastro システム管理者の作成

Keycloak セットアップ時に Exastro システム管理者の初期ユーザを作成するための情報を設定します。
表 2.28 共通設定 (Keycloak) のオプションパラメータ

パラメータ

説明

変更

デフォルト値・選択可能な設定値

global.keycloakDefinition.name

Keycloak の定義名

不可

keycloak

global.keycloakDefinition.enabled

Keycloak の定義の利用有無

不可

true

global.keycloakDefinition.config.API_KEYCLOAK_PROTOCOL

Keycloak API エンドポイントのプロトコル

不可

"http”

global.keycloakDefinition.config.API_KEYCLOAK_HOST

Keycloak API エンドポイントのホスト名、もしくは、FQDN

不可

"keycloak"

global.keycloakDefinition.config.API_KEYCLOAK_PORT

Keycloak API エンドポイントのポート番号

不可

"8080"

global.keycloakDefinition.config.KEYCLOAK_PROTOCOL

Keycloak エンドポイントのプロトコル

不可

"http"

global.keycloakDefinition.config.KEYCLOAK_HOST

Keycloak エンドポイントのホスト名、もしくは、FQDN

不可

"keycloak"

global.keycloakDefinition.config.KEYCLOAK_PORT

Keycloak API エンドポイントのポート番号

不可

"8080"

global.keycloakDefinition.config.KEYCLOAK_MASTER_REALM

Keycloak のマスターレルム名

不可

"master"

global.keycloakDefinition.config.KEYCLOAK_DB_DATABASE

Keycloak が利用するデータベース名

不可

"keycloak"

global.keycloakDefinition.secret.SYSTEM_ADMIN

Keycloak のマスターレルムにおける管理権限を持ったユーザ名を指定。
指定した Keycloak ユーザが作成される。
※KEYCLOAK_USER→SYSTEM_ADMINに変更

必須

任意の文字列

global.keycloakDefinition.secret.SYSTEM_ADMIN_PASSWORD

Keycloak のマスターレルムにおける管理権限を持ったユーザに設定するパスワード(エンコードなし)
※KEYCLOAK_PASSWORD→SYSTEM_ADMIN_PASSWORDに変更

必須

任意の文字列

global.keycloakDefinition.secret.KEYCLOAK_DB_USER

Keycloak が使用するデータベースユーザ。
指定した DB ユーザが作成される。

必須

任意の文字列

global.keycloakDefinition.secret.KEYCLOAK_DB_PASSWORD

Keycloak が使用するデータベースユーザのパスワード(エンコードなし)

必須

任意の文字列

リスト 2.22 exastro.yaml
51  keycloakDefinition:
52    secret:
53-     KEYCLOAK_USER: "admin"
54-     KEYCLOAK_PASSWORD: "Ch@ngeMeKCAdm"
55+     KEYCLOAK_USER: "admin"               # Exastro システムの管理者
56+     KEYCLOAK_PASSWORD: "admin-password"  # Exastro システムの管理者のパスワード
57      KEYCLOAK_DB_USER: "keycloak"
58      KEYCLOAK_DB_PASSWORD: "Ch@ngeMeKCADB"

2.4.8. 永続ボリュームの設定

データベースのデータ永続化 (クラスタ内コンテナがある場合)、および、ファイルの永続化のために、永続ボリュームを設定する必要があります。
永続ボリュームの詳細については、 永続ボリューム - Kubernetes を参照してください。
ストレージ利用時の2つの方法について説明します。
  • マネージドディスク

  • Kubernetes ノードのディレクトリ

  • 特徴

パブリッククラウドで提供されるストレージサービスを利用することでストレージの構築や維持管理が不要となります。
  • 設定例

Azure のストレージを利用する場合、下記のように StorageClass を定義することで利用が可能です。
リスト 2.23 storage-class-exastro-suite.yaml
 1apiVersion: storage.k8s.io/v1
 2kind: StorageClass
 3metadata:
 4  name: exastro-suite-azurefile-csi-nfs
 5provisioner: file.csi.azure.com
 6allowVolumeExpansion: true
 7parameters:
 8  protocol: nfs
 9mountOptions:
10  - nconnect=8
リスト 2.24 exastro.yaml
 5  itaGlobalDefinition:
 6    config:
 7      DEFAULT_LANGUAGE: "ja"
 8      LANGUAGE: "en"
 9      TZ: "Asia/Tokyo"
10    secret:
11      ENCRYPT_KEY: ""
12    persistence:
13      enabled: true
14      accessMode: ReadWriteMany
15      size: 10Gi
16      volumeType: hostPath # e.g.) hostPath or AKS
17-      storageClass: "-" # e.g.) azurefile or - (None)
18+      storageClass: "azurefile" # e.g.) azurefile or - (None)
※ 下記は、データベース連携 で設定済みです。
  • mariadb

リスト 2.25 exastro.yaml
415  mariadb:
416    persistence:
417      enabled: true
418      reinstall: false
419      accessMode: ReadWriteOnce
420      size: 20Gi
421      volumeType: hostPath # e.g.) hostPath or AKS
422-      storageClass: "-" # e.g.) azurefile or - (None)
423+      storageClass: "exastro-suite-azurefile-csi-nfs" # e.g.) azurefile or - (None)
  • gitlab

リスト 2.26 exastro.yaml
464  gitlab:
465-   enabled: false
466+   enabled: true
467     ~ 略 ~
468    persistence:
469      enabled: true
470      volumeName: pv-gitlab
471      accessMode: ReadWriteMany
472      size: 20Gi
473-     storageClass: "-" # e.g.) azurefile or - (None)
474+     storageClass: "exastro-suite-azurefile-csi-nfs" # e.g.) azurefile or - (None)
  • mongo

リスト 2.27 exastro.yaml
524  mongo:
525    enabled: true
526    image:
527      repository: "docker.io/mongo"
528      pullPolicy: IfNotPresent
529      # Overrides the image tag whose default is the chart appVersion.
530      tag: "6.0"
531    persistence:
532      enabled: true
533      accessMode: ReadWriteOnce
534      size: 20Gi
535-     storageClass: "-" # e.g.) azurefile, local-path or - (None)
536+     storageClass: "exastro-suite-azurefile-csi-nfs" # e.g.) azurefile or - (None)

2.5. インストール

2.5.1. 永続ボリュームの作成

永続ボリュームの設定 で作成したマニフェストファイルを適用し、ボリュームを作成します。
# pv-database.yaml
kubectl apply -f pv-database.yaml

# pv-ita-common.yaml
kubectl apply -f pv-ita-common.yaml

# pv-mongo.yaml ※OASEを利用しない場合設定不要
kubectl apply -f pv-mongo.yaml

# pv-gitlab.yaml ※外部GitLabを利用する場合設定不要
kubectl apply -f pv-gitlab.yaml
# 確認
kubectl get pv
NAME            CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM                                  STORAGECLASS   REASON   AGE
pv-database     20Gi       RWO            Retain           Available                                                                  6s
pv-gitlab       20Gi       RWX            Retain           Available                                                                  5s
pv-ita-common   10Gi       RWX            Retain           Available                                                                  6s
pv-mongo        20Gi       RWO            Retain           Available   exastro/volume-mongo-storage-mongo-0                           5s

2.5.2. インストール

Helm バージョンとアプリケーションのバージョンについては下記を確認してください。
表 2.29 Helm チャートとアプリケーションのバージョン

Chart Version

Exastro Version

Exastro IT Automation

Exastro Platform

リリースシナリオ

1.0.2

2.1.0

2.0.3

1.4.0

Exastro IT Automation Version 2.0 GA リリース

...

...

...

...

...

1.1.x

2.2.x

2.1.x

1.x.0

Exastro IT Automation Version 2.1 GA リリース(予定)

インストール時にサービスの公開方法によって、アクセス方法が異なります。
Ingress, LoadBalancer, NodePort それぞれの方法について説明します。
  1. Helm コマンドを使い Kubernetes 環境にインストールを行います。

    リスト 2.32 コマンド
    helm install exastro exastro/exastro \
      --namespace exastro --create-namespace \
      --values exastro.yaml
    
    リスト 2.33 出力結果
    NAME: exastro
    LAST DEPLOYED: Sat Jan 28 15:00:02 2023
    NAMESPACE: exastro
    STATUS: deployed
    REVISION: 1
    TEST SUITE: None
    NOTES:
    Exastro install completion!
    
    1. Execute the following command and wait until the pod becomes "Running" or "Completed":
    
      # NOTE: You can also append "-w" to the command or wait until the state changes with "watch command"
    
      kubectl get pods --namespace exastro
    
    2. Get the ENCRYPT_KEY by running these commands:
    
      # Exastro IT Automation ENCRYPT_KEY
      kubectl get secret ita-secret-ita-global -n exastro -o jsonpath='{.data.ENCRYPT_KEY}' | base64 -d
    
      # Exastro Platform ENCRYPT_KEY
      kubectl get secret platform-secret-pf-global -n exastro -o jsonpath='{.data.ENCRYPT_KEY}' | base64 -d
    
      !!! Please save the output ENCRYPT_KEY carefully. !!!
    
    3. Run the following command to get the application URL and go to the URL or go to the displayed URL:
      *************************
      * Service Console       *
      *************************
      http://exastro-suite.example.local/
    
      *************************
      * Administrator Console *
      *************************
      http://exastro-suite-mng.example.local/auth/
    
    
    # Note: You can display this note again by executing the following command.
    
    以下、上記の出力結果に従って操作をします。
  2. インストール状況確認
コマンドラインから以下のコマンドを入力して、インストールが完了していることを確認します。
リスト 2.34 コマンド
# Pod の一覧を取得
kubectl get po -n exastro

| 正常に起動している場合は、ita-migration-xxxとplatform-migration-xxxが “Completed” 、その他すべてが “Running” となります。
| ※正常に起動するまで数分かかる場合があります。
リスト 2.35 出力結果
NAME                                                      READY   STATUS      RESTARTS   AGE
ita-api-admin-64657656c6-r4s2l                            1/1     Running     0          30m
ita-api-organization-75ff9d599c-gthvl                     1/1     Running     0          30m
ita-by-ansible-execute-fdd8dfc57-7676h                    1/1     Running     0          30m
ita-by-ansible-legacy-role-vars-listup-6cd558d78b-xxl6x   1/1     Running     0          30m
ita-by-ansible-legacy-vars-listup-5db44d54d8-zxqj7        1/1     Running     0          30m
ita-by-ansible-pioneer-vars-listup-6bf744f5b6-k8ctx       1/1     Running     0          30m
ita-by-ansible-towermaster-sync-59594b5d84-phbg7          1/1     Running     0          30m
ita-by-cicd-for-iac-f6855c588-r6w4k                       1/1     Running     0          30m
ita-by-collector-6fc8c7b4d4-hjwck                         1/1     Running     0          30m
ita-by-conductor-regularly-5897dcb9f6-4npz7               1/1     Running     0          30m
ita-by-conductor-synchronize-6fd6dcd5f4-qgdhx             1/1     Running     0          30m
ita-by-excel-export-import-df76d77c4-ms4j2                1/1     Running     0          30m
ita-by-hostgroup-split-86746f758-b796k                    1/1     Running     0          30m
ita-by-menu-create-8588c9747d-66xwn                       1/1     Running     0          30m
ita-by-menu-export-import-6b8498f476-zwml7                1/1     Running     0          30m
ita-by-terraform-cli-execute-8478554d8d-qztbv             1/1     Running     0          30m
ita-by-terraform-cli-vars-listup-bf688659d-zgh8d          1/1     Running     0          30m
ita-by-terraform-cloud-ep-execute-5dbbb599b-qh8rc         1/1     Running     0          30m
ita-by-terraform-cloud-ep-vars-listup-5564fcb5b-nphm7     1/1     Running     0          30m
ita-migration-1.0.4-0wdt                                  0/1     Completed   0          30m
ita-web-server-854bcdbbf4-s7fdb                           1/1     Running     0          30m
keycloak-56d8b4556c-tndnv                                 1/1     Running     0          30m
platform-api-bddb446db-s9zjh                              1/1     Running     0          30m
platform-auth-799f57fb6c-wlbtf                            1/1     Running     0          30m
platform-migration-1.4.2-6sks                             0/1     Completed   0          30m
platform-web-88db7c489-wkmn9                              1/1     Running     0          30m
  1. 暗号化キーのバックアップ

    Exastro システムのパスワードや認証情報といった機密情報はすべて暗号化されています。
    必ず、下記で取得した暗号化キーをバックアップして、適切に保管してください。

    危険

    暗号化キーを紛失した場合、バックアップデータからシステムを復旧した際にデータの復号ができなくなります。
    リスト 2.36 コマンド
    # Exastro IT Automation ENCRYPT_KEY
    kubectl get secret ita-secret-ita-global -n exastro -o jsonpath='{.data.ENCRYPT_KEY}' | base64 -d
    
    リスト 2.37 出力結果
    JnIoXzJtPic2MXFqRl1yI1chMj8hWzQrNypmVn41Pk8=
    
    リスト 2.38 コマンド
    # Exastro Platform ENCRYPT_KEY
    kubectl get secret platform-secret-pf-global -n exastro -o jsonpath='{.data.ENCRYPT_KEY}' | base64 -d
    
    リスト 2.39 出力結果
    bHFZe2VEVVM2PmFeQDMqNG4oZT4lTlglLjJJekxBTHE=
    
  2. 接続確認

    出力結果に従って、Administrator Console の URL にアクセスします。
    下記は、実行例のため サービス公開の設定 で設定したホスト名に読み替えてください。
    リスト 2.40 出力結果(例)
    *************************
    * Service Console       *
    *************************
    http://exastro-suite.example.local/
    
    *************************
    * Administrator Console *
    *************************
    http://exastro-suite-mng.example.local/auth/
    
    表 2.30 接続確認用URL

    管理コンソール

    http://exastro-suite-mng.example.local/auth/

2.5.3. 管理コンソールへのログイン

以下の画面が表示された場合、Administration Console を選択して、ログイン画面を開きます。
administrator-console
ログイン ID とパスワードは Exastro システム管理者の作成 で登録した、KEYCLOAK_USER 及び KEYCLOAK_PASSWORD です。
login
Keycloak の管理画面が開きます。
login
ログインが確認できたら、Organization (オーガナイゼーション) の作成を行います。

2.6. アップグレード

Exastro システムのアップグレード方法について紹介します。

2.6.1. アップグレードの準備

警告

アップグレード実施前に データバックアップ・リストア の手順に従い、バックアップを取得しておくことを推奨します。

2.6.1.1. Helm リポジトリの更新

Exastro システムの Helm リポジトリを更新します。
更新前のバージョンを確認します。
リスト 2.61 コマンド
1# リポジトリ情報の確認
2helm search repo exastro
リスト 2.62 実行結果
1helm search repo exastro
2NAME                            CHART VERSION   APP VERSION     DESCRIPTION
3exastro/exastro                 1.0.0           2.0.3           A Helm chart for Exastro. Exastro is an Open So...
4exastro/exastro-it-automation   1.2.0           2.0.3           A Helm chart for Exastro IT Automation. Exastro...
5exastro/exastro-platform        1.5.0           1.4.0           A Helm chart for Exastro Platform. Exastro Plat...
Helm リポジトリを更新します。
リスト 2.63 コマンド
1# リポジトリ情報の更新
2helm repo update
更新後のバージョンを確認します。
リスト 2.64 コマンド
1# リポジトリ情報の確認
2helm search repo exastro
リスト 2.65 実行結果
1helm search repo exastro
2NAME                            CHART VERSION   APP VERSION     DESCRIPTION
3exastro/exastro                 1.0.1           2.1.0           A Helm chart for Exastro. Exastro is an Open So...
4exastro/exastro-it-automation   1.2.0           2.0.3           A Helm chart for Exastro IT Automation. Exastro...
5exastro/exastro-platform        1.5.0           1.4.0           A Helm chart for Exastro Platform. Exastro Plat...

2.6.1.2. デフォルト設定値の更新の確認

デフォルト値の更新を確認します。
インストール時に作成した設定ファイル exastro.yaml とアップグレード後の設定ファイルを比較します。
リスト 2.66 コマンド
diff exastro.yaml <(helm show values exastro/exastro)
リスト 2.67 実行結果
exastro-platform:
  platform-api:
    image:
      repository: "exastro/exastro-platform-api"
       tag: ""

  platform-auth:
+    extraEnv:
+      # Please set the URL to access
+      EXTERNAL_URL: ""
+      EXTERNAL_URL_MNG: ""
    ingress:
      enabled: true
      hosts:
        - host: exastro-suite.example.local
          paths:

2.6.1.3. 設定値の更新

デフォルト設定値の比較結果から、項目の追加などにより設定値の追加が必要な場合は更新をしてください。
設定値の更新が不要であればこの手順はスキップしてください。
例えば下記の差分確認結果から、exastro-platform.platform-auth.extraEnv が追加されていますので、必要に応じて、exastro.yaml に項目と設定値を追加します。
リスト 2.68 実行結果
exastro-platform:
  platform-api:
    image:
      repository: "exastro/exastro-platform-api"
       tag: ""

  platform-auth:
+    extraEnv:
+      # Please set the URL to access
+      EXTERNAL_URL: ""
+      EXTERNAL_URL_MNG: ""
    ingress:
      enabled: true
      hosts:
        - host: exastro-suite.example.local
          paths:

2.6.2. アップグレード

2.6.2.1. サービス停止

  1. Pod 起動数の確認

    作業前の Pod 起動数の確認をし、状態を記録します。
    リスト 2.69 コマンド
    RS_AE=`kubectl get deploy ita-by-ansible-execute -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_ALRV=`kubectl get deploy ita-by-ansible-legacy-role-vars-listup -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_ATS=`kubectl get deploy ita-by-ansible-towermaster-sync -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_CS=`kubectl get deploy ita-by-conductor-synchronize -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_MC=`kubectl get deploy ita-by-menu-create -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_PA=`kubectl get deploy platform-auth -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    
    以下はITA2.1.0以降からITA2.1.1以降にバージョンアップする際に実行してください。
    RS_ALV=`kubectl get deploy ita-by-ansible-legacy-vars-listup -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_APV=`kubectl get deploy ita-by-ansible-pioneer-vars-listup -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_CFI=`kubectl get deploy ita-by-cicd-for-iac -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_CR=`kubectl get deploy ita-by-conductor-regularly -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_COL=`kubectl get deploy ita-by-collector -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_EEI=`kubectl get deploy ita-by-excel-export-import -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_HS=`kubectl get deploy ita-by-hostgroup-split -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_MEI=`kubectl get deploy ita-by-menu-export-import -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_TCE=`kubectl get deploy ita-by-terraform-cli-execute -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_TCV=`kubectl get deploy ita-by-terraform-cli-vars-listup -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_TCEE=`kubectl get deploy ita-by-terraform-cloud-ep-execute -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    RS_TCEV=`kubectl get deploy ita-by-terraform-cloud-ep-vars-listup -o jsonpath='{@.spec.replicas}{"\n"}' -n exastro`
    
  2. リバースプロキシの停止

    リバースプロキシ (platform-auth) の Pod 起動数を 0 に変更し、エンドユーザーからのアクセスを制限します。
    リスト 2.70 コマンド
    kubectl scale deployment platform-auth -n exastro --replicas=0
    
  3. バックヤード処理の停止

    バックヤード処理 (ita-by-***) の Pod 起動数を 0 に変更し、データベースの更新を停止します。
    リスト 2.71 コマンド
    kubectl scale deployment ita-by-ansible-execute -n exastro --replicas=0
    kubectl scale deployment ita-by-ansible-legacy-role-vars-listup -n exastro --replicas=0
    kubectl scale deployment ita-by-ansible-towermaster-sync -n exastro --replicas=0
    kubectl scale deployment ita-by-conductor-synchronize -n exastro --replicas=0
    kubectl scale deployment ita-by-menu-create -n exastro --replicas=0
    
    以下はITA2.1.0以降からITA2.1.1以降にバージョンアップする際に実行してください。
    kubectl scale deployment ita-by-ansible-legacy-vars-listup -n exastro --replicas=0
    kubectl scale deployment ita-by-ansible-pioneer-vars-listup -n exastro --replicas=0
    kubectl scale deployment ita-by-cicd-for-iac -n exastro --replicas=0
    kubectl scale deployment ita-by-collector -n exastro --replicas=0
    kubectl scale deployment ita-by-conductor-regularly -n exastro --replicas=0
    kubectl scale deployment ita-by-excel-export-import -n exastro --replicas=0
    kubectl scale deployment ita-by-hostgroup-split -n exastro --replicas=0
    kubectl scale deployment ita-by-menu-export-import -n exastro --replicas=0
    kubectl scale deployment ita-by-terraform-cli-execute -n exastro --replicas=0
    kubectl scale deployment ita-by-terraform-cli-vars-listup -n exastro --replicas=0
    kubectl scale deployment ita-by-terraform-cloud-ep-execute -n exastro --replicas=0
    kubectl scale deployment ita-by-terraform-cloud-ep-vars-listup -n exastro --replicas=0
    
  4. Pod 起動数の確認

    上記で停止した対象の Pod 数が 0 になっていることを確認
    リスト 2.72 コマンド
    kubectl get deployment -n exastro
    
    リスト 2.73 実行結果
    NAME                                     READY   UP-TO-DATE   AVAILABLE   AGE
    mariadb                                  1/1     1            1           3h41m
    ita-web-server                           1/1     1            1           3h41m
    platform-web                             1/1     1            1           3h41m
    ita-api-admin                            1/1     1            1           3h41m
    ita-api-organization                     1/1     1            1           3h41m
    platform-api                             1/1     1            1           3h41m
    keycloak                                 1/1     1            1           3h41m
    ita-by-menu-create                       0/0     0            0           3h41m
    ita-by-ansible-execute                   0/0     0            0           3h41m
    ita-by-ansible-legacy-role-vars-listup   0/0     0            0           3h41m
    ita-by-ansible-towermaster-sync          0/0     0            0           3h41m
    ita-by-conductor-synchronize             0/0     0            0           3h41m
    platform-auth                            0/0     0            0           3h41m
    
    以下はITA2.1.0以降からITA2.1.1以降にバージョンアップする際に確認してください。
    NAME                                     READY   UP-TO-DATE   AVAILABLE   AGE
    ita-by-ansible-legacy-vars-listup        0/0     0            0           3h41m
    ita-by-ansible-pioneer-vars-listup       0/0     0            0           3h41m
    ita-by-cicd-for-iac                      0/0     0            0           3h41m
    ita-by-collector                         0/0     0            0           3h41m
    ita-by-conductor-regularly               0/0     0            0           3h41m
    ita-by-excel-export-import               0/0     0            0           3h41m
    ita-by-hostgroup-split                   0/0     0            0           3h41m
    ita-by-menu-export-import                0/0     0            0           3h41m
    ita-by-terraform-cli-execute             0/0     0            0           3h41m
    ita-by-terraform-cli-vars-listup         0/0     0            0           3h41m
    ita-by-terraform-cloud-ep-execute        0/0     0            0           3h41m
    ita-by-terraform-cloud-ep-vars-listup    0/0     0            0           3h41m
    

2.6.2.2. アップグレード実施

アップグレードを実施します。
リスト 2.74 コマンド
helm upgrade exastro exastro/exastro \
  --namespace exastro \
  --values exastro.yaml
リスト 2.75 出力結果
NAME: exastro
LAST DEPLOYED: Sat Jan 28 15:00:02 2023
NAMESPACE: exastro
STATUS: deployed
REVISION: 2
TEST SUITE: None
NOTES:
Exastro install completion!

1. Execute the following command and wait until the pod becomes "Running" or "Completed":

  # NOTE: You can also append "-w" to the command or wait until the state changes with "watch command"

  kubectl get pods --namespace exastro

2. Get the ENCRYPT_KEY by running these commands:

  # Exastro IT Automation ENCRYPT_KEY
  kubectl get secret ita-secret-ita-global -n exastro -o jsonpath='{.data.ENCRYPT_KEY}' | base64 -d

  # Exastro Platform ENCRYPT_KEY
  kubectl get secret platform-secret-pf-global -n exastro -o jsonpath='{.data.ENCRYPT_KEY}' | base64 -d

  !!! Please save the output ENCRYPT_KEY carefully. !!!

3. Run the following command to get the application URL and go to the URL or go to the displayed URL:
  *************************
  * Service Console       *
  *************************
  http://exastro-suite.example.local/

  *************************
  * Administrator Console *
  *************************
  http://exastro-suite-mng.example.local/auth/


  # Note: You can display this note again by executing the following command.

2.6.2.3. サービス再開

  1. サービス再開

    サービス停止時に取得した各 Deployment の Pod 起動数を元に戻します。
    リスト 2.76 コマンド
    kubectl scale deployment ita-by-ansible-execute -n exastro --replicas=${RS_AE}
    kubectl scale deployment ita-by-ansible-legacy-role-vars-listup -n exastro --replicas=${RS_ALRV}
    kubectl scale deployment ita-by-ansible-towermaster-sync -n exastro --replicas=${RS_ATS}
    kubectl scale deployment ita-by-conductor-synchronize -n exastro --replicas=${RS_CS}
    kubectl scale deployment ita-by-menu-create -n exastro --replicas=${RS_MC}
    kubectl scale deployment platform-auth -n exastro --replicas=${RS_PA}
    
    以下はITA2.1.0以降からITA2.1.1以降にバージョンアップする際に実行してください。
    kubectl scale deployment ita-by-ansible-legacy-vars-listup -n exastro --replicas=${RS_ALV}
    kubectl scale deployment ita-by-ansible-pioneer-vars-listup -n exastro --replicas=${RS_APV}
    kubectl scale deployment ita-by-cicd-for-iac -n exastro --replicas=${RS_CFI}
    kubectl scale deployment ita-by-conductor-regularly -n exastro --replicas=${RS_CR}
    kubectl scale deployment ita-by-collector -n exastro --replicas=${RS_COL}
    kubectl scale deployment ita-by-excel-export-import -n exastro --replicas=${RS_EEI}
    kubectl scale deployment ita-by-hostgroup-split -n exastro --replicas=${RS_HS}
    kubectl scale deployment ita-by-menu-export-import -n exastro --replicas=${RS_MEI}
    kubectl scale deployment ita-by-terraform-cli-execute -n exastro --replicas=${RS_TCE}
    kubectl scale deployment ita-by-terraform-cli-vars-listup -n exastro --replicas=${RS_TCV}
    kubectl scale deployment ita-by-terraform-cloud-ep-execute -n exastro --replicas=${RS_TCEE}
    kubectl scale deployment ita-by-terraform-cloud-ep-vars-listup -n exastro --replicas=${RS_TCEV}
    
  2. Pod 起動数の確認

    上記で起動した対象の Pod 数が元に戻りすべて READY になっていることを確認
    リスト 2.77 コマンド
    kubectl get deployment -n exastro
    
    リスト 2.78 実行結果
    NAME                                     READY   UP-TO-DATE   AVAILABLE   AGE
    ita-api-admin-7c78cc475-xt8kh                             1/1     Running     0             47m
    ita-api-organization-f4bccc5c4-8txpj                      1/1     Running     0             47m
    ita-by-ansible-execute-666d5bdf86-bt94w                   1/1     Running     0             47m
    ita-by-ansible-legacy-role-vars-listup-79c5cfdf7c-wntg5   1/1     Running     0             47m
    ita-by-ansible-legacy-vars-listup-7b7f5fb88c-nqzrd        1/1     Running     0             47m
    ita-by-ansible-pioneer-vars-listup-5d5f5b589-d4hn9        1/1     Running     0             47m
    ita-by-ansible-towermaster-sync-548bd8c867-2vp9z          1/1     Running     0             47m
    ita-by-cicd-for-iac-558986b4c5-fk7bh                      1/1     Running     0             47m
    ita-by-collector-59ff796d8c-xc4dx                         1/1     Running     0             47m
    ita-by-conductor-regularly-b5c5dd6dc-7t8km                1/1     Running     0             47m
    ita-by-conductor-synchronize-787f9fd8f7-mxsw6             1/1     Running     0             47m
    ita-by-excel-export-import-66db589589-xv5zz               1/1     Running     0             47m
    ita-by-hostgroup-split-8459fb48fc-ltrtb                   1/1     Running     0             47m
    ita-by-menu-create-5bc6849cd5-xkm6r                       1/1     Running     0             47m
    ita-by-menu-export-import-84ccc5467-9fnb8                 1/1     Running     0             47m
    ita-by-terraform-cli-execute-695ffbd4c-pqkwj              1/1     Running     0             47m
    ita-by-terraform-cli-vars-listup-6dcccf9585-nxbkj         1/1     Running     0             47m
    ita-by-terraform-cloud-ep-execute-7bbfcd6f6c-fkqpd        1/1     Running     0             47m
    ita-by-terraform-cloud-ep-vars-listup-5d4c7c94ff-7gmsk    1/1     Running     0             47m
    ita-migration-1.0.5-iql5                                  0/1     Completed   0             47m
    ita-web-server-75f8c85f7c-vvkp5                           1/1     Running     0             47m
    keycloak-9d464565b-zwq6b                                  1/1     Running     0             47m
    platform-api-57bff76cc-fmdcn                              1/1     Running     0             47m
    platform-auth-54c7f8bcc8-lmgv6                            1/1     Running     0             47m
    platform-migration-1.4.3-gs4x                             0/1     Completed   0             47m
    platform-web-7d74bb98d-srtdp                              1/1     Running     0             47m
    

2.6.2.4. アップグレード状況確認

コマンドラインから以下のコマンドを入力して、アップグレードが完了していることを確認します。
リスト 2.79 コマンド
# Pod の一覧を取得
kubectl get po -n exastro
正常に起動している場合は、ita-migration-xxxとplatform-migration-xxxが “Completed” 、その他すべてが “Running” となります。
※正常に起動するまで数分かかる場合があります。
リスト 2.80 出力結果
 NAME                                                      READY   STATUS      RESTARTS   AGE
 ita-api-admin-64657656c6-r4s2l                            1/1     Running     0          30m
 ita-api-oase-receiver-6647cb4457-46d2                     1/1     Running     0          30m
 ita-api-organization-75ff9d599c-gthvl                     1/1     Running     0          30m
 ita-by-ansible-execute-fdd8dfc57-7676h                    1/1     Running     0          30m
 ita-by-ansible-legacy-role-vars-listup-6cd558d78b-xxl6x   1/1     Running     0          30m
 ita-by-ansible-legacy-vars-listup-5db44d54d8-zxqj7        1/1     Running     0          30m
 ita-by-ansible-pioneer-vars-listup-6bf744f5b6-k8ctx       1/1     Running     0          30m
 ita-by-ansible-towermaster-sync-59594b5d84-phbg7          1/1     Running     0          30m
 ita-by-cicd-for-iac-f6855c588-r6w4k                       1/1     Running     0          30m
 ita-by-collector-6fc8c7b4d4-hjwck                         1/1     Running     0          30m
 ita-by-conductor-regularly-5897dcb9f6-4npz7               1/1     Running     0          30m
 ita-by-conductor-synchronize-6fd6dcd5f4-qgdhx             1/1     Running     0          30m
 ita-by-excel-export-import-df76d77c4-ms4j2                1/1     Running     0          30m
 ita-by-hostgroup-split-86746f758-b796k                    1/1     Running     0          30m
 ita-by-menu-create-8588c9747d-66xwn                       1/1     Running     0          30m
 ita-by-menu-export-import-6b8498f476-zwml7                1/1     Running     0          30m
 ita-by-oase-conclusion-567c85567b-8tgvq                   1/1     Running     0          30m
 ita-by-terraform-cli-execute-8478554d8d-qztbv             1/1     Running     0          30m
 ita-by-terraform-cli-vars-listup-bf688659d-zgh8d          1/1     Running     0          30m
 ita-by-terraform-cloud-ep-execute-5dbbb599b-qh8rc         1/1     Running     0          30m
 ita-by-terraform-cloud-ep-vars-listup-5564fcb5b-nphm7     1/1     Running     0          30m
 ita-migration-1.0.4-0wdt                                  0/1     Completed   0          30m
 ita-web-server-854bcdbbf4-s7fdb                           1/1     Running     0          30m
 keycloak-56d8b4556c-tndnv                                 1/1     Running     0          30m
 platform-api-bddb446db-s9zjh                              1/1     Running     0          30m
 platform-auth-799f57fb6c-wlbtf                            1/1     Running     0          30m
 platform-migration-1.4.2-6sks                             0/1     Completed   0          30m
 platform-web-88db7c489-wkmn9                              1/1     Running     0          30m

2.7. アンインストール

Exastro システムのアンインストール方法について紹介します。

2.7.1. アンインストールの準備

警告

アンインストール実施前に データバックアップ・リストア の手順に従い、バックアップを取得しておくことを推奨します。

2.7.2. アンインストール

2.7.2.1. アンインストール実施

アンインストールを実施します。
リスト 2.81 コマンド
helm uninstall exastro --namespace exastro
リスト 2.82 出力結果
release "exastro" uninstalled

2.7.2.2. データベースのデータの削除

Persitent Volume を Kubernetes 上に hostPath で作成した場合の方法を記載します。
マネージドデータベースを含む外部データベースを利用している場合は、環境にあったデータ削除方法を実施してください。
リスト 2.83 コマンド
kubectl delete pv pv-database
リスト 2.84 実行結果
persistentvolume "pv-database" deleted
Kubernetes のコントロールノードにログインし、データを削除します。
下記コマンドは、Persistent Volume 作成時の hostPath に /var/data/exastro-suite/exastro-platform/database を指定した場合の例です。
リスト 2.85 コマンド
# 永続データがあるコントロールノードにログイン
ssh user@contol.node.example

# 永続データの削除
sudo rm -rf /var/data/exastro-suite/exastro-platform/database

2.7.2.3. ファイルデータの削除

Persitent Volume を Kubernetes 上に hostPath で作成した場合の方法を記載します。
マネージドストレージを含む外部ストレージを利用している場合は、環境にあったデータ削除方法を実施してください。
リスト 2.86 コマンド
kubectl delete pv pv-ita-common
リスト 2.87 実行結果
persistentvolume "pv-ita-common" deleted
Kubernetes のコントロールノードにログインし、データを削除します。
下記コマンドは、Persistent Volume 作成時の hostPath に /var/data/exastro-suite/exastro-it-automation/ita-common を指定した場合の例です。
リスト 2.88 コマンド
# 永続データがあるコントロールノードにログイン
ssh user@contol.node.example

# 永続データの削除
sudo rm -rf /var/data/exastro-suite/exastro-it-automation/ita-common