acumos AI clio 安装失败 "error converting YAML to JSON"

acumos AI clio installation fails with "error converting YAML to JSON"

我一直在尝试安装 clio 版本。

VM : ubuntu 18.04 16 核 32 GB 内存 500 GB 存储空间。

命令:

bash /home/ubuntu/system-integration/tools/aio_k8s_deployer/aio_k8s_deployer.sh 所有 acai-server ubuntu generic

几乎所有安装步骤都已成功完成,但在“setup-lum”期间,出现以下错误。

错误:

lum-helm/templates/deployment.yaml 上的 YAML 解析错误: 将 YAML 转换为 JSON 时出错:yaml:第 36 行:此上下文中不允许映射值

解决方法:

我能够摆脱这些错误(通过 helm install --dry-运行 测试) 一种。删除“资源、亲和力和容忍块 b.将“Release.Name”替换为实际发布值(例如 license-clio-configmap)

但是当我 运行 完整安装命令时,那些 helms 图表再次更新。

完全错误:

...

[调试] 服务器:“127.0.0.1:46109”

[debug] 原图版本:"" [调试] 图表路径:/deploy/system-integration/AIO/lum/kubernetes/license-usage-manager/lum-helm

lum-helm/templates/deployment.yaml 上的 YAML 解析错误:将 YAML 转换为 JSON 时出错:yaml:第 36 行:此上下文中不允许映射值

deployment.yaml

的 Yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ template "lum-helm.fullname" . }}
  labels:
    app: {{ template "lum-helm.name" . }}
    chart: {{ template "lum-helm.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      app: {{ template "lum-helm.name" . }}
      release: {{ .Release.Name }}
  template:
    metadata:
      labels:
        app: {{ template "lum-helm.name" . }}
        release: {{ .Release.Name }}
    spec:
      initContainers:
            - name: wait-for-db
              image: busybox:1.28
              command:
              - 'sh'
              - '-c'
              - >
                until nc -z -w 2 {{ .Release.Name }}-postgresql {{ .Values.postgresql.servicePort }} && echo postgresql ok;
                  do sleep 2;
                done
      containers:
        - name: {{ .Chart.Name }}
          image: nexus3.acumos.org:10002/acumos/lum-server:default
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          env:
            - name: DATABASE_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: {{ .Release.Name }}-postgresql
                  key: postgresql-password
            - name: NODE
          volumeMounts:
          - name: config-volume
            mountPath: /opt/app/lum/etc/config.json
            subPath: lum-config.json
          ports:
            - name: http
              containerPort: 2080
              protocol: TCP
          livenessProbe:
            httpGet:
              path: '/api/healthcheck'
              port: http
            initialDelaySeconds: 60
            periodSeconds: 10
            failureThreshold: 10
          readinessProbe:
            httpGet:
              path: '/api/healthcheck'
              port: http
            initialDelaySeconds: 60
            periodSeconds: 10
            failureThreshold: 10
          resources:
{{ toYaml .Values.resources | indent 12 }}
    {{- with .Values.nodeSelector }}
      nodeSelector:
{{ toYaml . | indent 8 }}
    {{- end }}
    {{- with .Values.affinity }}
      affinity:
{{ toYaml . | indent 8 }}
    {{- end }}
    {{- with .Values.tolerations }}
      tolerations:
{{ toYaml . | indent 8 }}
    {{- end }}
      volumes:
        - name: config-volume
          configMap:
            name: {{ .Release.Name }}-configmap

此错误已根据 Error trying to install Acumos Clio using AIO

解决

我在实际 value.yaml 中提供了 imagetag:1.3.2,lum 部署成功

在 acumos 设置中有两个副本 setup-lum.sh 和 values.yaml

实际:

~/system-integration/AIO/lum/kubernetes/value.yaml

和运行时间复制

~/aio_k8s_deployer/deploy/system-integration/AIO/lum/kubernetes/value.yaml

我找到了这个解决方法:

  • 取消注释 values.yaml 文件中的 IMAGE-TAG 行
  • 在setup-lum.sh文件中注释了以下几行(这些已经在第一个运行执行过,这样我就跳过了覆盖问题)
rm -frd kubernetes/license-usage-manager
git clone "https://gerrit.acumos.org/r/license-usage-manager" \
  kubernetes/license-usage-manager