0

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

虚拟机: ubuntu 18.04 16 核 32 GB RAM 500 GB 存储。

命令 :

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

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

错误:

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

解决方法:

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

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

完全错误:

...

  • helm install -f kubernetes/values.yaml --name license-clio --namespace default --debug ./kubernetes/license-usage-manager/lum-helm [debug] Created tunnel using local port: '46109'

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

[调试] 原始图表版本:“” [调试] 图表路径:/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
4

2 回答 2

1

此错误已根据尝试使用 AIO 安装 Acumos Clio的错误解决

我在我的实际 value.yaml 中提供了一个 imagetag:1.3.2 并且 lum 部署成功

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

实际的 :

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

和运行时复制

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

于 2020-10-15T09:50:39.530 回答
0

我找到了这个解决方法:

  • 取消注释 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
于 2020-10-19T10:41:44.777 回答