---
title: "ステップ 4: values ファイルを作成する"
description: OpenLM Platform のインストール内容（Web アドレス、Ingress、配置、コンポーネント）を記述する 1 つのファイル、openlm-values.yaml を生成します。
product: OpenLM Platform
---

インストール内容をチャートに伝える values ファイルを、ワークシートから生成します。手作業で書く必要はありません。4.1 のコマンドがファイルを生成します。その後、1 つのセクションを確認すれば完了です。

このページのコマンドは、[インストールワークシート](https://www.openlm.com/documentation/ja/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/before-you-start/worksheet) から作成したファイル `openlm-install.env` から変数を読み込みます。

```bash
source ./openlm-install.env
```

## 4.1 ファイルを生成する

ブロック全体をコピーして実行します。現在のフォルダーに `openlm-values.yaml` が作成されます。

```bash
STORAGE_PROVISIONER="$(kubectl get storageclass "$STORAGE_CLASS" -o jsonpath='{.provisioner}')"
cat > openlm-values.yaml <<EOF
# openlm-values.yaml for $DOMAIN (generated $(date +%F))
global:
  useOpenShift: false            # OpenShift: see the OpenShift page
  securityContext:
    omitIds: false               # true = let the cluster choose user IDs (OpenShift sets this for you)
  affinity:
    enabled: false               # true only if your nodes carry openlm.com/role labels (Node placement page)
  taints:
    enabled: false
  traefikRoutes:
    enabled: false
  masterIngress:
    enabled: true                # one Ingress for the whole platform
    hostname: $DOMAIN
    ingressClassName: $INGRESS_CLASS
    secretName: openlm-lb-cert
  ingressAnnotations:            # remove the per-component rewrite rules; the single Ingress doesn't use them
    nginx.ingress.kubernetes.io/rewrite-target: null
    nginx.ingress.kubernetes.io/use-regex: null

# ── Settings shared by every service ──────────────────────────────────────────
openlm_config_generic:
  configmap:
    vars_list:
      LB_FQDN: "$DOMAIN"
      INFRASTRUCTURE__LBFQDN: "$DOMAIN"
      AUTHORITY_URL: "https://$DOMAIN/identity"
      INFRASTRUCTURE__AUTHORITYURL: "https://$DOMAIN/identity"
      IssuerUri: "https://$DOMAIN/identity"
      UI_BASE_HREF_URL: "https://$DOMAIN/identity"
      UI_OAUTH_ISSUER_URL: "https://$DOMAIN/identity"
      LdapServiceHost: "https://$DOMAIN"
      PERSONAL_DASHBOARD_ADDRESS: "https://$DOMAIN/personal-dashboard"
      general__personalDashboardAddress: "https://$DOMAIN/personal-dashboard"
      OLM__K8s__ServiceNamespace: "$NS"
      INFRASTRUCTURE__ServerDbPrefix: "${DB_PREFIX}_operational"
      INFRASTRUCTURE__USESECURITY: "true"
      DbType: "SqlServer_SQLServerAuth"
      DB_TYPE: "SqlServer_SQLServerAuth"
      DbConnectionConfig__DbType: "SqlServer_SQLServerAuth"
      LICENSEMANAGER__BaseUrl: "http://openlm-licensemanager/"
      UGSINTEGRATION__UGSURL: "http://openlm-usersandgroupsservice/"
      KAFKA_WITH_PORT: "$KAFKA_BOOTSTRAP"
      KAFKA_BOOTSTRAPSERVERS_CONNECTION: "$KAFKA_BOOTSTRAP"
      Audit__Kafka__ProducerConfig__BootstrapServers: "$KAFKA_BOOTSTRAP"
      LicenseManager__FeaturesConsumerSettings__BootstrapServers: "$KAFKA_BOOTSTRAP"
openlm_telemetry_config_generic:
  configmap:
    vars_list:
      TELEMETRY__ENABLED: "false"   # turn on only with an OpenTelemetry collector

# ── Components that need settings in this release (each listed once) ─────────
identity:
  enabled: true
  configmap:
    vars_list:
      IssuerUri: "https://$DOMAIN/identity"
      UI_BASE_HREF_URL: "https://$DOMAIN/identity"
      UI_OAUTH_ISSUER_URL: "https://$DOMAIN/identity"
      DbType: "SqlServer_SQLServerAuth"
identitydiscovery:
  enabled: true
  secrets:
    - { name: openlm-generic-mongo-db-credentials, type: env }
    - { name: openlm-generic-kafka-bootstrap-credentials, type: env }
    - { name: openlm-generic-redis-connection-credentials, type: env }
    - { name: openlm-identitydiscovery-hangfire-credentials, type: env }
dss:
  enabled: true
  configmap: { vars_list: { LdapServiceHost: "https://$DOMAIN" } }
dssui:
  enabled: true
  configmap: { vars_list: { UI_BASE_HREF_URL: "https://$DOMAIN/dss" } }
usageservice:
  enabled: true
  configmap: { vars_list: { ProductServiceIntegration__HostName: "openlm-productservice.$NS.svc.cluster.local" } }
denialservice:
  enabled: true
  configmap: { vars_list: { ProductServiceIntegration__HostName: "openlm-productservice.$NS.svc.cluster.local" } }
licensefilecomparatormiddleware:
  enabled: true
  configmap: { vars_list: { AWS_SQS_QUEUE_URL: "", SERVICENOW_INSTANCE_URL: "" } }
licenseconcurency:
  enabled: true
  configmap: { vars_list: { HADOOP_USER_NAME: "openlm", SPARK_USER: "openlm" } }
  pvc: { storageClassName: $STORAGE_CLASS, annotations: { storageProvisioner: $STORAGE_PROVISIONER } }
officetimecalculation:
  enabled: true
  pvc: { storageClassName: $STORAGE_CLASS, annotations: { storageProvisioner: $STORAGE_PROVISIONER } }
sparkmongo:
  enabled: true
  configmap: { vars_list: { KAFKA_BOOTSTRAPSERVERS_CONNECTION: "$KAFKA_BOOTSTRAP", MONGODB_CONNECTION: "" } }
  pvc: { storageClassName: $STORAGE_CLASS, annotations: { storageProvisioner: $STORAGE_PROVISIONER } }
sparkmssql:
  enabled: true
  pvc: { storageClassName: $STORAGE_CLASS, annotations: { storageProvisioner: $STORAGE_PROVISIONER } }
catalogenrichment:
  enabled: true
  configmap:
    vars_list:
      GRAPHQL_URL: "https://$DOMAIN/api/samcatalog/graphql"
      SAM_INVENTORY_URL: "https://$DOMAIN/api/softwareassetmanagement/graphql"
EOF
echo "written: openlm-values.yaml"
```

:::note[すべてのアドレスが `https://` である理由]
お客様の Web アドレス上のアドレスは、ID 関連のアドレスも含めてすべて `https://` で始まります。ここに `http://` が 1 つでもあると、Ingress が HTTP を HTTPS にリダイレクトするようになった時点でサインインが動作しなくなります。`http://openlm-licensemanager/` のようなクラスター*内部*のサービスのアドレスは `http://` のままにします。そのトラフィックはクラスターの外に出ません。
:::

:::warning[各コンポーネントは 1 回だけ記述する]
values ファイルでは、1 つのコンポーネントを**1 回だけ**記述できます。後でコンポーネントに設定を追加する場合は、そのコンポーネントの既存のエントリの下に追加してください。ファイルの後方に 2 つ目の `identity:` があると、警告なしに最初のエントリがその設定ごと置き換えられます。
:::

## 4.2 コンポーネントを追加する

次のブロックで、**標準セット**の残りのコンポーネントをオンにします。標準セットで、プラットフォーム全体が使えるようになります。サインイン、ライセンス管理とレポート、そして[オプションのコンポーネント](#オプションのコンポーネント)にある連携機能を除くすべての製品が含まれます。すべてのコンポーネントはオンにするまでオフのままで、4.1 のコンポーネントはすでにオンになっています。

4.1 のコンポーネントを除外するには、その `enabled: true` を `enabled: false` に変更します。

```bash
cat >> openlm-values.yaml <<'EOF'

# ── Components ────────────────────────────────────────────────────────────────
EOF
for c in \
  agentactivitymanager agentshub agentshubui alertsservice alertsserviceui alldbupgradeapi \
  allocationservice auditservice auditserviceui brokerhub \
  brokerhubconnector brokerhubui cloudbroker cloudbrokerui complianceservice \
  complianceserviceui dbconfigurationtoolui denialsaggregation denialsui \
  disposabletokens donglemonitoring donglemonitoringui dsconnector emailnotification \
  enduserservices featureservice flexlmcompare homepage homepageui \
  identityapi identityui kafkainitpod \
  licenseaccesscontrol licenseaccesscontrolui licenseallocationsui licenseautomationtool \
  licensefilesmanagement licensefilesui \
  licenseharvester licensemanager licensemanagerui licenseserversui licensesui navigationservice \
  navigationui notificationgateway notificationui operationalapi \
  personaldashboard platformhealth processmanager processmanagerui \
  productservice productsserviceui projectsserviceapi projectsservicemigration projectsserviceui \
  pushnotification reportingdataapi \
  samcatalog samcatalogui server sessioncreator \
  softwareassetmanagement softwareassetmanagementui subscriptionoptimizer \
  uiconfigurationservice uiconfigurationserviceui \
  usageui useravailibility usersandgroupsmigrationservice usersandgroupsservice \
  usersandgroupsserviceui vlm vlmui
do
  printf '%s:\n  enabled: true\n' "$c" >> openlm-values.yaml
  case "$c" in   # these components need placement switched off on their own entry as well
    licensefilesmanagement|platformhealth)
      printf '  affinity: ""\n  taints: ""\n' >> openlm-values.yaml ;;
  esac
done
echo "done: $(grep -c '^  enabled: true' openlm-values.yaml) components switched on"
```

`kafkainitpod` はサービスではありません。インストールとアップグレードの際に Kafka トピックを作成する、1 回限りのジョブです。オンのままにしてください。

:::warning[次のコンポーネントはオンにしないでください]
`kafka-rest-proxy` は、OpenLM 自身の環境向けのヘルパーチャートです。お客様のインストール向けではありません。お客様自身のデータサービス（ステップ 2）を使用してください。`openlm-apigateway` もオフのままにします。API ゲートウェイは独立したリリースです（[ステップ 5](https://www.openlm.com/documentation/ja/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/install/step-5-gateway)）。Router のコンポーネント（`routerapi`、`routerui`、`routerconsolidatorwriter`、`routeringestgateway`、`dashboardapi`、`dashboardui`）はこのリリースに含まれません。オフのままにしてください。
:::

## 必要なコンポーネント

製品をすべて使用しない場合でも、4.1 と 4.2 の標準セット全体をオンにしてください。OpenLM はこの構成を推奨しており、この構成でガイドをテストしています。

OpenLM Platform の稼働後は、不要なコンポーネントをオフにできます。`openlm-values.yaml` で該当するコンポーネントの `enabled: true` を `enabled: false` に変更し、[ステップ 6](https://www.openlm.com/documentation/ja/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/install/step-6-install) と同じ `helm upgrade --install` コマンドを実行します。各製品に必要なコンポーネントの一覧はまだこのガイドに記載されていないため、コンポーネントをオフにする前に OpenLM にお問い合わせください。

### オプションのコンポーネント

次のコンポーネントは、使用する場合にのみオンにします。各エントリは、4.2 のブロックの後に `openlm-values.yaml` へ 1 回だけ追加してください。

| 使用するもの | 追加するコンポーネント |
|---|---|
| ServiceNow Connector または ServiceNow 連携 | `servicenowconnectoretl`（次のブロックの設定を含む）、`servicenowcreds`、`servicenowalertintegration`、`servicenowemintegration`、`integrationui` |
| Zendesk Alerts Integration | `ticketingnotification` |
| データの匿名化 | `anonymization`、`anonymizationui` |

ServiceNow の場合は、次のブロックを実行します。

```bash
cat >> openlm-values.yaml <<EOF
servicenowconnectoretl:
  enabled: true
  configmap: { vars_list: { INFRASTRUCTURE__KAFKABOOTSTRAPSERVERS: "$KAFKA_BOOTSTRAP" } }
servicenowcreds: { enabled: true }
servicenowalertintegration: { enabled: true }
servicenowemintegration: { enabled: true }
integrationui: { enabled: true }
EOF
```

残りの 2 行についても、同じ方法で `<component>: { enabled: true }` を追加します。OpenShift では、匿名化 UI に [ルート](https://www.openlm.com/documentation/ja/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/platforms/openshift#ルート) で説明しているルートも必要です。

## 4.3 クラスターの種類に応じた設定を追加する

クラスターの種類によっては、このファイルに数行の追加が必要です。ここで追加してください。

| クラスター | 追加する内容 |
|---|---|
| EKS | 専用のノードグループを使用する場合を除き、追加はありません: [EKS](https://www.openlm.com/documentation/ja/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/platforms/eks#values-の設定) |
| AKS | 専用のノードプールを使用する場合を除き、追加はありません: [AKS](https://www.openlm.com/documentation/ja/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/platforms/aks#values-の設定) |
| OpenShift | OpenShift 用のブロック: [OpenShift](https://www.openlm.com/documentation/ja/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/platforms/openshift#values-の設定) |
| K3s | 追加はありません: [K3s](https://www.openlm.com/documentation/ja/cloud/deployment-operations/on-premise/deployment-guide/kubernetes/platforms/k3s#values-の設定) |

:::tip[確認]
ファイルを使ってチャートをレンダリングします。Helm は何もインストールせずにファイルを検証します。

```bash
helm repo add openlm https://openlm-helm.github.io/helmcharts && helm repo update openlm
helm template openlm-platform openlm/openlm-platform --version "$OPENLM_VERSION" \
  -n "$NS" -f openlm-values.yaml > /tmp/openlm-render.yaml && echo "render OK"
grep -c "^kind: Deployment" /tmp/openlm-render.yaml
```

`render OK` と表示され、続いて 85 前後の数値（作成される Deployment の数）が表示される必要があります。エラーが出た場合は、values ファイル内の誤っている行が示されます。
:::

`openlm-values.yaml` は保管しておいてください。すべてのアップグレードで同じファイルを使用します。
