From 14f3707e3d7704987b71e9276bef974b3c72c3f8 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Tue, 9 Oct 2018 08:32:06 -0500 Subject: Docs for Install Also has new helm charts for OOM viewing Issue-ID: AAF-543 Change-Id: I31877319d7fe609f4819766c08ff6dec8d5d40d0 Signed-off-by: Instrumental --- auth/docker/.gitignore | 1 + auth/helm/.gitignore | 2 + auth/helm/aaf/templates/aaf-cass.yaml | 71 ++++++++ auth/helm/aaf/templates/aaf-pod.yaml | 296 -------------------------------- auth/helm/aaf/templates/aaf.yaml | 205 ++++++++++++++++++++++ auth/helm/aaf/templates/logs_pv.yaml | 25 --- auth/helm/aaf/templates/logs_pvc.yaml | 29 ---- auth/helm/aaf/templates/status_pv.yaml | 24 +++ auth/helm/aaf/templates/status_pvc.yaml | 29 ++++ auth/helm/aaf/values.yaml | 10 +- auth/sample/bin/pod_wait.sh | 47 +++-- auth/sample/bin/service.sh | 2 +- 12 files changed, 367 insertions(+), 374 deletions(-) create mode 100644 auth/helm/.gitignore create mode 100644 auth/helm/aaf/templates/aaf-cass.yaml delete mode 100644 auth/helm/aaf/templates/aaf-pod.yaml create mode 100644 auth/helm/aaf/templates/aaf.yaml delete mode 100644 auth/helm/aaf/templates/logs_pv.yaml delete mode 100644 auth/helm/aaf/templates/logs_pvc.yaml create mode 100644 auth/helm/aaf/templates/status_pv.yaml create mode 100644 auth/helm/aaf/templates/status_pvc.yaml (limited to 'auth') diff --git a/auth/docker/.gitignore b/auth/docker/.gitignore index 47b48da5..8aa26850 100644 --- a/auth/docker/.gitignore +++ b/auth/docker/.gitignore @@ -2,3 +2,4 @@ /d.props /aaf.props /cass.props +/policy* diff --git a/auth/helm/.gitignore b/auth/helm/.gitignore new file mode 100644 index 00000000..a12eb33b --- /dev/null +++ b/auth/helm/.gitignore @@ -0,0 +1,2 @@ +aaf.orig/ +pause/ diff --git a/auth/helm/aaf/templates/aaf-cass.yaml b/auth/helm/aaf/templates/aaf-cass.yaml new file mode 100644 index 00000000..7002bc09 --- /dev/null +++ b/auth/helm/aaf/templates/aaf-cass.yaml @@ -0,0 +1,71 @@ +kind: Service +apiVersion: v1 +metadata: + name: aaf-cass +spec: + selector: + app: aaf-cass + ports: + - name: storage + protocol: TCP + port: 7000 + containerPort: 7000 + - name: ssl-storage + protocol: TCP + port: 7001 + containerPort: 7001 + - name: native-trans + protocol: TCP + port: 9042 + containerPort: 9042 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aaf-cass + labels: + app: aaf-cass +spec: + replicas: 1 + selector: + matchLabels: + app: aaf-cass + template: + metadata: + labels: + app: aaf-cass + spec: + volumes: + - name: {{ .Chart.Name }}-cass-vol + persistentVolumeClaim: + claimName: {{ .Chart.Name }}-cass-pvc + containers: +### +### AAF-CASS +### + - name: {{ .Chart.Name }}-cass + image: {{ .Values.image.repository }}onap/aaf/aaf_cass:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + # installing with cmd "onap" will not only initialize the DB, but add ONAP bootstrap data as well + command: ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh","onap"] + volumeMounts: + - mountPath: "/data" + name: {{ .Chart.Name }}-cass-vol + ports: + - name: storage + containerPort: 7000 + - name: ssl-storage + containerPort: 7001 + - name: native-trans + containerPort: 9042 + - name: rpc + containerPort: 9160 + env: + - name: CASSANDRA_CLUSTER_NAME + value: "osaaf" + - name: CASSANDRA_DC + value: "dc1" + - name: HEAP_NEWSIZE + value: "512M" + - name: MAX_HEAP_SIZE + value: "1024M" diff --git a/auth/helm/aaf/templates/aaf-pod.yaml b/auth/helm/aaf/templates/aaf-pod.yaml deleted file mode 100644 index 031a45b3..00000000 --- a/auth/helm/aaf/templates/aaf-pod.yaml +++ /dev/null @@ -1,296 +0,0 @@ -kind: Pod -apiVersion: v1 -metadata: - name: {{ .Values.cadi.hostname }} - namespace: {{ .Values.global.common.namespace }} -spec: - volumes: - - name: {{ .Chart.Name }}-config-vol - persistentVolumeClaim: - claimName: {{ .Chart.Name }}-config-pvc - - name: {{ .Chart.Name }}-logs-vol - persistentVolumeClaim: - claimName: {{ .Chart.Name }}-logs-pvc - - name: {{ .Chart.Name }}-cass-vol - persistentVolumeClaim: - claimName: {{ .Chart.Name }}-cass-pvc - # Use this Pod Sharing dir to declare various States of starting - - name: {{ .Chart.Name }}-pod-status - emptyDir: {} - hostAliases: - - ip: "127.0.0.1" - hostnames: - - "cass.{{ .Values.cadi.hostname }}" - - "service.{{ .Values.cadi.hostname }}" - - "locate.{{ .Values.cadi.hostname }}" - - "oauth.{{ .Values.cadi.hostname }}" - - "gui.{{ .Values.cadi.hostname }}" - - "cm.{{ .Values.cadi.hostname }}" - - "hello.{{ .Values.cadi.hostname }}" - - "fs.{{ .Values.cadi.hostname }}" -### -### DEFINE THE CONTAINERS -### - -### -### INIT Containers -### - containers: - initContainers: - - name: {{ .Chart.Name }}-config-container - image: {{ .Values.image.repository }}onap/aaf/aaf_config:{{ .Values.image.version }} - imagePullPolicy: IfNotPresent - volumeMounts: - - mountPath: "/opt/app/osaaf" - name: {{ .Chart.Name }}-config-vol - env: - - name: HOSTNAME - value: "{{ .Values.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.cadi.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.cadi.cadi_longitude }}" -### -### Regular Containers -### - containers: -### -### AAF-CASS -### - - name: {{ .Chart.Name }}-cass - image: {{ .Values.image.repository }}onap/aaf/aaf_cass:{{ .Values.image.version }} - imagePullPolicy: IfNotPresent - # installing with cmd "onap" will not only initialize the DB, but add ONAP bootstrap data as well - command: ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh","onap"] - volumeMounts: - - mountPath: "/data" - name: {{ .Chart.Name }}-cass-vol - - mountPath: "/opt/app/aaf/status" - name: {{ .Chart.Name }}-pod-status - ports: - - name: storage - containerPort: 7000 - - name: ssl-storage - containerPort: 7001 - - name: native-trans - containerPort: 9042 - - name: rpc - containerPort: 9160 - env: - - name: CASSANDRA_CLUSTER_NAME - value: "osaaf" - - name: CASSANDRA_DC - value: "dc1" - - name: HEAP_NEWSIZE - value: "512M" - - name: MAX_HEAP_SIZE - value: "1024M" -### -### AAF-Service -### - - name: {{ .Chart.Name }}-service - image: {{ .Values.image.repository }}onap/aaf/aaf_service:{{ .Values.image.version }} - imagePullPolicy: IfNotPresent - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_service","aaf_cass","/opt/app/aaf/bin/service"] - volumeMounts: - - mountPath: "/opt/app/osaaf" - name: {{ .Chart.Name }}-config-vol - - mountPath: "/opt/app/aaf/status" - name: {{ .Chart.Name }}-pod-status - ports: - - name: service - protocol: TCP - containerPort: 8100 - hostPort: 8100 - env: - - name: HOSTNAME - value: "{{ .Values.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.cadi.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "cass.{{ .Values.cadi.hostname }}:127.0.0.1" -### -### AAF-Locate -### - - name: {{ .Chart.Name }}-locate - image: {{ .Values.image.repository }}onap/aaf/aaf_locate:{{ .Values.image.version }} - imagePullPolicy: IfNotPresent - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_locate","aaf_service","/opt/app/aaf/bin/locate"] - volumeMounts: - - mountPath: "/opt/app/osaaf" - name: {{ .Chart.Name }}-config-vol - - mountPath: "/opt/app/aaf/status" - name: {{ .Chart.Name }}-pod-status - ports: - - name: locate - protocol: TCP - containerPort: 8095 - hostPort: 443 - env: - - name: HOSTNAME - value: "{{ .Values.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.cadi.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "cass.{{ .Values.cadi.hostname }}:127.0.0.1" -### -### AAF-OAuth -### - - name: {{ .Chart.Name }}-oauth - image: {{ .Values.image.repository }}onap/aaf/aaf_oauth:{{ .Values.image.version }} - imagePullPolicy: IfNotPresent - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_oauth","aaf_service","/opt/app/aaf/bin/oauth"] - volumeMounts: - - mountPath: "/opt/app/osaaf" - name: {{ .Chart.Name }}-config-vol - - mountPath: "/opt/app/aaf/status" - name: {{ .Chart.Name }}-pod-status - ports: - - name: oauth - protocol: TCP - containerPort: 8140 - hostPort: 8140 - env: - - name: HOSTNAME - value: "{{ .Values.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.cadi.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "cass.{{ .Values.cadi.hostname }}:127.0.0.1" -### -### AAF-Gui -### - - name: {{ .Chart.Name }}-gui - image: {{ .Values.image.repository }}onap/aaf/aaf_gui:{{ .Values.image.version }} - imagePullPolicy: IfNotPresent - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_gui","aaf_locate","/opt/app/aaf/bin/gui"] - volumeMounts: - - mountPath: "/opt/app/osaaf" - name: {{ .Chart.Name }}-config-vol - - mountPath: "/opt/app/aaf/status" - name: {{ .Chart.Name }}-pod-status - ports: - - name: gui - protocol: TCP - containerPort: 8200 - hostPort: 8200 - env: - - name: HOSTNAME - value: "{{ .Values.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.cadi.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "cass.{{ .Values.cadi.hostname }}:127.0.0.1" -### -### AAF-Certman -### - - name: {{ .Chart.Name }}-cm - image: {{ .Values.image.repository }}onap/aaf/aaf_cm:{{ .Values.image.version }} - imagePullPolicy: IfNotPresent - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_cm","aaf_locate","/opt/app/aaf/bin/cm"] - volumeMounts: - - mountPath: "/opt/app/osaaf" - name: {{ .Chart.Name }}-config-vol - - mountPath: "/opt/app/aaf/status" - name: {{ .Chart.Name }}-pod-status - ports: - - name: cm - protocol: TCP - containerPort: 8150 - hostPort: 8150 - env: - - name: HOSTNAME - value: "{{ .Values.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.cadi.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "cass.{{ .Values.cadi.hostname }}:127.0.0.1" -### -### AAF-FS -### - - name: {{ .Chart.Name }}-fs - image: {{ .Values.image.repository }}onap/aaf/aaf_fs:{{ .Values.image.version }} - imagePullPolicy: IfNotPresent - volumeMounts: - - mountPath: "/opt/app/osaaf" - name: {{ .Chart.Name }}-config-vol - ports: - - name: fs - protocol: TCP - containerPort: 8096 - hostPort: 80 - env: - - name: HOSTNAME - value: "{{ .Values.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.cadi.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.cadi.cadi_longitude }}" -### -### AAF-Hello -### - - name: {{ .Chart.Name }}-hello - image: {{ .Values.image.repository }}onap/aaf/aaf_hello:{{ .Values.image.version }} - imagePullPolicy: IfNotPresent - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_hello","aaf_locate","/opt/app/aaf/bin/hello"] - volumeMounts: - - mountPath: "/opt/app/osaaf" - name: {{ .Chart.Name }}-config-vol - - mountPath: "/opt/app/aaf/status" - name: {{ .Chart.Name }}-pod-status - ports: - - name: hello - protocol: TCP - containerPort: 8130 - hostPort: 8130 - env: - - name: HOSTNAME - value: "{{ .Values.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.cadi.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "cass.{{ .Values.cadi.hostname }}:127.0.0.1" diff --git a/auth/helm/aaf/templates/aaf.yaml b/auth/helm/aaf/templates/aaf.yaml new file mode 100644 index 00000000..c8eb2970 --- /dev/null +++ b/auth/helm/aaf/templates/aaf.yaml @@ -0,0 +1,205 @@ +kind: Service +apiVersion: v1 +metadata: + name: aaf +spec: + selector: + app: aaf + #type: ExternalName + #externalName: aaf.osaaf.org + externalIPs: + - 192.168.99.100 + ports: + - name: aaf-service + protocol: TCP + port: 8100 + targetPort: 8100 + - name: aaf-locate + protocol: TCP + port: 8095 + targetPort: 8095 + - name: aaf-oauth + protocol: TCP + port: 8140 + targetPort: 8140 + - name: aaf-gui + protocol: TCP + port: 8200 + targetPort: 8200 + - name: aaf-cm + protocol: TCP + port: 8150 + targetPort: 8150 + - name: aaf-hello + protocol: TCP + port: 8130 + targetPort: 8130 + - name: aaf-fs + protocol: TCP + port: 8096 + targetPort: 8096 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aaf-svcs + labels: + app: aaf +spec: + replicas: 1 + selector: + matchLabels: + app: aaf + template: + metadata: + labels: + app: aaf + spec: + volumes: + - name: {{ .Chart.Name }}-config-vol + persistentVolumeClaim: + claimName: {{ .Chart.Name }}-config-pvc + # Use this Pod Sharing dir to declare various States of starting + - name: {{ .Chart.Name }}-status-vol + persistentVolumeClaim: + claimName: {{ .Chart.Name }}-status-pvc + initContainers: + - name: {{ .Chart.Name }}-config-container + image: {{ .Values.image.repository }}onap/aaf/aaf_config:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-status-vol + env: + - name: HOSTNAME + value: "{{ .Values.cadi.hostname }}" + - name: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "{{ .Values.cadi.aaf_register_as }}" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "aaf-cass" + containers: +### +### AAF-Service +### + - name: {{ .Chart.Name }}-service + image: {{ .Values.image.repository }}onap/aaf/aaf_service:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_service","sleep","30","/opt/app/aaf/bin/service"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-status-vol + ports: + - name: service + protocol: TCP + containerPort: 8100 +# hostPort: 8100 +### +### AAF-Locate +### + - name: {{ .Chart.Name }}-locate + image: {{ .Values.image.repository }}onap/aaf/aaf_locate:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_locate","aaf_service","/opt/app/aaf/bin/locate"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-status-vol + ports: + - name: locate + protocol: TCP + containerPort: 8095 + +### +### AAF-OAuth +### + - name: {{ .Chart.Name }}-oauth + image: {{ .Values.image.repository }}onap/aaf/aaf_oauth:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_oauth","aaf_locate","/opt/app/aaf/bin/oauth"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-status-vol + ports: + - name: oauth + protocol: TCP + containerPort: 8096 +### +### AAF-GUI +### + - name: {{ .Chart.Name }}-gui + image: {{ .Values.image.repository }}onap/aaf/aaf_gui:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_gui","aaf_cm","/opt/app/aaf/bin/gui"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-status-vol + ports: + - name: gui + protocol: TCP + containerPort: 8200 +### +### AAF-Certman +### + - name: {{ .Chart.Name }}-cm + image: {{ .Values.image.repository }}onap/aaf/aaf_cm:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_cm","aaf_locate","/opt/app/aaf/bin/cm"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-status-vol + ports: + - name: cm + protocol: TCP + containerPort: 8150 + +### +### AAF-FS +### + - name: {{ .Chart.Name }}-fs + image: {{ .Values.image.repository }}onap/aaf/aaf_fs:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_fs","aaf_locate","/opt/app/aaf/bin/fs"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-status-vol + ports: + - name: fs + protocol: TCP + containerPort: 8096 + +### +### AAF-Hello +### + - name: {{ .Chart.Name }}-hello + image: {{ .Values.image.repository }}onap/aaf/aaf_hello:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_hello","aaf_locate","/opt/app/aaf/bin/hello"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-status-vol + ports: + - name: hello + protocol: TCP + containerPort: 8130 + diff --git a/auth/helm/aaf/templates/logs_pv.yaml b/auth/helm/aaf/templates/logs_pv.yaml deleted file mode 100644 index 608d0f99..00000000 --- a/auth/helm/aaf/templates/logs_pv.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} -kind: PersistentVolume -apiVersion: v1 -metadata: - name: {{ .Chart.Name }}-logs-pv - namespace: {{ .Values.global.common.namespace }} - labels: - app: {{ .Chart.Name }}-logs - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -spec: - capacity: - storage: {{ .Values.persistence.logs.size}} - accessModes: - - {{ .Values.persistence.logs.accessMode }} - persistentVolumeReclaimPolicy: {{ .Values.persistence.logs.volumeReclaimPolicy }} - hostPath: - path: {{ .Values.persistence.mountPath }}/{{ .Values.persistence.logs.mountSubPath }} -{{- if .Values.persistence.logs.storageClass }} -{{- if (eq "-" .Values.persistence.logs.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.logs.storageClass }}" -{{- end }} -{{- end }} -{{- end -}} diff --git a/auth/helm/aaf/templates/logs_pvc.yaml b/auth/helm/aaf/templates/logs_pvc.yaml deleted file mode 100644 index bd704cdc..00000000 --- a/auth/helm/aaf/templates/logs_pvc.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ .Chart.Name }}-logs-pvc - namespace: {{ .Values.global.common.namespace }} - labels: - app: {{ .Chart.Name }}-logs -{{- if .Values.persistence.annotations }} - annotations: -{{ toYaml .Values.persistence.annotations | indent 4 }} -{{- end }} -spec: - selector: - matchLabels: - app: {{ .Chart.Name }}-logs - accessModes: - - {{ .Values.persistence.logs.accessMode }} - resources: - requests: - storage: {{ .Values.persistence.logs.size }} -{{- if .Values.persistence.logs.storageClass }} -{{- if (eq "-" .Values.persistence.logs.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.logs.storageClass }}" -{{- end }} -{{- end }} -{{- end -}} diff --git a/auth/helm/aaf/templates/status_pv.yaml b/auth/helm/aaf/templates/status_pv.yaml new file mode 100644 index 00000000..4d24662c --- /dev/null +++ b/auth/helm/aaf/templates/status_pv.yaml @@ -0,0 +1,24 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ .Chart.Name }}-status-pv + namespace: {{ .Values.global.common.namespace }} + labels: + app: {{ .Chart.Name }}-status +spec: + capacity: + storage: {{ .Values.persistence.status.size}} + accessModes: + - {{ .Values.persistence.status.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.status.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.persistence.mountPath }}/{{ .Values.persistence.status.mountSubPath }} +{{- if .Values.persistence.status.storageClass }} +{{- if (eq "-" .Values.persistence.status.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.status.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/auth/helm/aaf/templates/status_pvc.yaml b/auth/helm/aaf/templates/status_pvc.yaml new file mode 100644 index 00000000..9a965117 --- /dev/null +++ b/auth/helm/aaf/templates/status_pvc.yaml @@ -0,0 +1,29 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ .Chart.Name }}-status-pvc + namespace: {{ .Values.global.common.namespace }} + labels: + app: {{ .Chart.Name }}-status +{{- if .Values.persistence.annotations }} + annotations: +{{ toYaml .Values.persistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + app: {{ .Chart.Name }}-status + accessModes: + - {{ .Values.persistence.status.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.status.size }} +{{- if .Values.persistence.status.storageClass }} +{{- if (eq "-" .Values.persistence.status.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.status.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/auth/helm/aaf/values.yaml b/auth/helm/aaf/values.yaml index f3f1b1b6..e9a25c45 100644 --- a/auth/helm/aaf/values.yaml +++ b/auth/helm/aaf/values.yaml @@ -14,11 +14,11 @@ ingress: enabled: false cadi: - hostname: "aaf.osaaf.org" + hostname: "aaf.onap" cadi_latitude: "38.0" cadi_longitude: "-72.0" aaf_env: "DEV" - aaf_register_as: "aaf.osaaf.org" + aaf_register_as: "aaf.onap" persistence: mountPath: "/mnt/data/aaf" @@ -28,11 +28,11 @@ persistence: size: 2Gi mountSubPath: "config" storageClass: "manual" - logs: + status: volumeReclaimPolicy: Retain accessMode: ReadWriteOnce - size: 2Gi - mountSubPath: "logs" + size: 10M + mountSubPath: "status" storageClass: "manual" cass: volumeReclaimPolicy: Retain diff --git a/auth/sample/bin/pod_wait.sh b/auth/sample/bin/pod_wait.sh index 71773be7..08998db0 100644 --- a/auth/sample/bin/pod_wait.sh +++ b/auth/sample/bin/pod_wait.sh @@ -14,7 +14,6 @@ function status { fi } -echo $APP $OTHER function check { if [ -d "$DIR" ]; then @@ -28,23 +27,35 @@ function check { fi } -echo "App $APP is waiting to start until $OTHER is ready" -status "waiting for $OTHER" +function start { + n=0 + while [ $n -lt 40 ]; do + rv="$(check)" + echo "$OTHER is $rv" + if [ "$rv" = "ready" ]; then + # This is critical. Until status is literally "ready" in the status directory, no processes will start + status ready + echo "Starting $@" + n=10000 + else + (( ++n )) + echo "Sleep 10 (iteration $n)" + sleep 10 + fi + done +} + +if [ "sleep" = "$OTHER" ]; then + echo "Sleeping $1" + status "Sleeping $1" + sleep $1 + shift + status "ready" +else + echo "App $APP is waiting to start until $OTHER is ready" + status "waiting for $OTHER" -n=0 -while [ $n -lt 40 ]; do - rv="$(check)" - echo "$OTHER is $rv" - if [ "$rv" = "ready" ]; then - # This is critical. Until status is literally "ready" in the status directory, no processes will start - status ready - echo "Starting $@" - n=10000 - else - (( ++n )) - echo "Sleep 10 (iteration $n)" - sleep 10 - fi -done + start +fi eval "$@" diff --git a/auth/sample/bin/service.sh b/auth/sample/bin/service.sh index 9cbe4533..f261c18e 100644 --- a/auth/sample/bin/service.sh +++ b/auth/sample/bin/service.sh @@ -99,7 +99,7 @@ if [ ! -e $LOCAL/org.osaaf.aaf.props ]; then CASS_HOST=${CASS_HOST:="localhost:127.0.0.1"} CASS_PASS=$("$JAVA" -jar $CONFIG/bin/aaf-cadi-aaf-*-full.jar cadi digest "${CASSANDRA_PASSWORD:-cassandra}" $LOCAL/org.osaaf.aaf.keyfile) CASS_NAME=${CASS_HOST/:*/} - sed -i.backup -e "s/\\(cassandra.clusters=\\).*/\\1${CASSANDRA_CLUSTERS:=$CASS_NAME}/" \ + sed -i.backup -e "s/\\(cassandra.clusters=\\).*/\\1${CASSANDRA_CLUSTERS:=$CASS_HOST}/" \ -e "s/\\(cassandra.clusters.user=\\).*/\\1${CASSANDRA_USER:=cassandra}/" \ -e "s/\\(cassandra.clusters.password=enc:\\).*/\\1$CASS_PASS/" \ -e "s/\\(cassandra.clusters.port=\\).*/\\1${CASSANDRA_PORT:=9042}/" \ -- cgit 1.2.3-korg