diff options
-rw-r--r-- | auth/helm/aaf/templates/aaf-cm.yaml | 72 | ||||
-rw-r--r-- | auth/helm/aaf/templates/aaf-fs.yaml | 72 | ||||
-rw-r--r-- | auth/helm/aaf/templates/aaf-gui.yaml | 72 | ||||
-rw-r--r-- | auth/helm/aaf/templates/aaf-hello.yaml | 72 | ||||
-rw-r--r-- | auth/helm/aaf/templates/aaf-locate.yaml | 72 | ||||
-rw-r--r-- | auth/helm/aaf/templates/aaf-oauth.yaml | 72 | ||||
-rw-r--r-- | auth/helm/aaf/templates/aaf-service.yaml | 72 | ||||
-rw-r--r-- | auth/sample/bin/pod_wait.sh | 1 | ||||
-rw-r--r-- | auth/sample/bin/service.sh | 7 |
9 files changed, 511 insertions, 1 deletions
diff --git a/auth/helm/aaf/templates/aaf-cm.yaml b/auth/helm/aaf/templates/aaf-cm.yaml new file mode 100644 index 00000000..0940de43 --- /dev/null +++ b/auth/helm/aaf/templates/aaf-cm.yaml @@ -0,0 +1,72 @@ +### +### AAF-CERTMAN +### +kind: Service +apiVersion: v1 +metadata: + name: aaf-cm +spec: + selector: + app: aaf-cm + type: NodePort + ports: + - name: aaf-cm + protocol: TCP + port: 8150 + NodePort: 30084 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aaf-cm + labels: + app: aaf-cm +spec: + replicas: 1 + selector: + matchLabels: + app: aaf-cm + template: + metadata: + labels: + app: aaf-cm + spec: + volumes: + # Use this Pod Sharing dir to declare various States of starting + - name: {{ .Chart.Name }}-config-vol + emptyDir: {} + 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: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "aaf-cm" + - name: AAF_LOCATOR_AS + value: "aaf-locate" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "aaf-cass" + containers: +### +### 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","sleep","45", "/opt/app/aaf/bin/cm"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + ports: + - name: aaf-cm + protocol: TCP + containerPort: 8150 diff --git a/auth/helm/aaf/templates/aaf-fs.yaml b/auth/helm/aaf/templates/aaf-fs.yaml new file mode 100644 index 00000000..7d596845 --- /dev/null +++ b/auth/helm/aaf/templates/aaf-fs.yaml @@ -0,0 +1,72 @@ +### +### AAF-FS +### +kind: Service +apiVersion: v1 +metadata: + name: aaf-fs +spec: + selector: + app: aaf-fs + type: NodePort + ports: + - name: aaf-fs + protocol: TCP + port: 8096 + NodePort: 30085 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aaf-fs + labels: + app: aaf-fs +spec: + replicas: 1 + selector: + matchLabels: + app: aaf-fs + template: + metadata: + labels: + app: aaf-fs + spec: + volumes: + # Use this Pod Sharing dir to declare various States of starting + - name: {{ .Chart.Name }}-config-vol + emptyDir: {} + 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: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "aaf-fs" + - name: AAF_LOCATOR_AS + value: "aaf-locate" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "aaf-cass" + containers: +### +### 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","sleep","50", "/opt/app/aaf/bin/fs"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + ports: + - name: aaf-fs + protocol: TCP + containerPort: 8096 diff --git a/auth/helm/aaf/templates/aaf-gui.yaml b/auth/helm/aaf/templates/aaf-gui.yaml new file mode 100644 index 00000000..bc2a23df --- /dev/null +++ b/auth/helm/aaf/templates/aaf-gui.yaml @@ -0,0 +1,72 @@ +### +### AAF-GUI +### +kind: Service +apiVersion: v1 +metadata: + name: aaf-gui +spec: + selector: + app: aaf-gui + type: NodePort + ports: + - name: aaf-gui + protocol: TCP + port: 8200 + NodePort: 30083 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aaf-gui + labels: + app: aaf-gui +spec: + replicas: 1 + selector: + matchLabels: + app: aaf-gui + template: + metadata: + labels: + app: aaf-gui + spec: + volumes: + # Use this Pod Sharing dir to declare various States of starting + - name: {{ .Chart.Name }}-config-vol + emptyDir: {} + 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: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "aaf-gui" + - name: AAF_LOCATOR_AS + value: "aaf-locate" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "aaf-cass" + containers: +### +### 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","sleep","50", "/opt/app/aaf/bin/gui"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + ports: + - name: aaf-gui + protocol: TCP + containerPort: 8200 diff --git a/auth/helm/aaf/templates/aaf-hello.yaml b/auth/helm/aaf/templates/aaf-hello.yaml new file mode 100644 index 00000000..b11365d2 --- /dev/null +++ b/auth/helm/aaf/templates/aaf-hello.yaml @@ -0,0 +1,72 @@ +### +### AAF-HELLO +### +kind: Service +apiVersion: v1 +metadata: + name: aaf-hello +spec: + selector: + app: aaf-hello + type: NodePort + ports: + - name: aaf-hello + protocol: TCP + port: 8130 + NodePort: 30086 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aaf-hello + labels: + app: aaf-hello +spec: + replicas: 1 + selector: + matchLabels: + app: aaf-hello + template: + metadata: + labels: + app: aaf-hello + spec: + volumes: + # Use this Pod Sharing dir to declare various States of starting + - name: {{ .Chart.Name }}-config-vol + emptyDir: {} + 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: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "aaf-hello" + - name: AAF_LOCATOR_AS + value: "aaf-locate" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "aaf-cass" + containers: +### +### 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","sleep","50", "/opt/app/aaf/bin/hello"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + ports: + - name: aaf-hello + protocol: TCP + containerPort: 8130 diff --git a/auth/helm/aaf/templates/aaf-locate.yaml b/auth/helm/aaf/templates/aaf-locate.yaml new file mode 100644 index 00000000..7f10fbf5 --- /dev/null +++ b/auth/helm/aaf/templates/aaf-locate.yaml @@ -0,0 +1,72 @@ +### +### AAF-LOCATE +### +kind: Service +apiVersion: v1 +metadata: + name: aaf-locate +spec: + selector: + app: aaf-locate + type: NodePort + ports: + - name: aaf-locate + protocol: TCP + port: 8095 + NodePort: 30081 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aaf-locate + labels: + app: aaf-locate +spec: + replicas: 1 + selector: + matchLabels: + app: aaf-locate + template: + metadata: + labels: + app: aaf-locate + spec: + volumes: + # Use this Pod Sharing dir to declare various States of starting + - name: {{ .Chart.Name }}-config-vol + emptyDir: {} + 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: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "aaf-locate" + - name: AAF_LOCATOR_AS + value: "aaf-locate" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "aaf-cass" + containers: +### +### 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","sleep","50", "/opt/app/aaf/bin/locate"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + ports: + - name: aaf-locate + protocol: TCP + containerPort: 8095 diff --git a/auth/helm/aaf/templates/aaf-oauth.yaml b/auth/helm/aaf/templates/aaf-oauth.yaml new file mode 100644 index 00000000..a08e86fb --- /dev/null +++ b/auth/helm/aaf/templates/aaf-oauth.yaml @@ -0,0 +1,72 @@ +### +### AAF-OAUTH +### +kind: Service +apiVersion: v1 +metadata: + name: aaf-oauth +spec: + selector: + app: aaf-oauth + type: NodePort + ports: + - name: aaf-oauth + protocol: TCP + port: 8140 + NodePort: 30082 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aaf-oauth + labels: + app: aaf-oauth +spec: + replicas: 2 + selector: + matchLabels: + app: aaf-oauth + template: + metadata: + labels: + app: aaf-oauth + spec: + volumes: + # Use this Pod Sharing dir to declare various States of starting + - name: {{ .Chart.Name }}-config-vol + emptyDir: {} + 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: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "aaf-oauth" + - name: AAF_LOCATOR_AS + value: "aaf-locate" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "aaf-cass" + containers: +### +### 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","sleep","50", "/opt/app/aaf/bin/oauth"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + ports: + - name: aaf-oauth + protocol: TCP + containerPort: 8140 diff --git a/auth/helm/aaf/templates/aaf-service.yaml b/auth/helm/aaf/templates/aaf-service.yaml new file mode 100644 index 00000000..e76f61b3 --- /dev/null +++ b/auth/helm/aaf/templates/aaf-service.yaml @@ -0,0 +1,72 @@ +### +### AAF-SERVICE +### +kind: Service +apiVersion: v1 +metadata: + name: aaf-service +spec: + selector: + app: aaf-service + type: NodePort + ports: + - name: aaf-service + protocol: TCP + port: 8100 + NodePort: 30080 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aaf-service + labels: + app: aaf-service +spec: + replicas: 2 + selector: + matchLabels: + app: aaf-service + template: + metadata: + labels: + app: aaf-service + spec: + volumes: + # Use this Pod Sharing dir to declare various States of starting + - name: {{ .Chart.Name }}-config-vol + emptyDir: {} + 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: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "aaf-service" + - name: AAF_LOCATOR_AS + value: "aaf-locate" + - 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","50", "/opt/app/aaf/bin/service"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + ports: + - name: service + protocol: TCP + containerPort: 8100 diff --git a/auth/sample/bin/pod_wait.sh b/auth/sample/bin/pod_wait.sh index 08998db0..14350366 100644 --- a/auth/sample/bin/pod_wait.sh +++ b/auth/sample/bin/pod_wait.sh @@ -51,6 +51,7 @@ if [ "sleep" = "$OTHER" ]; then sleep $1 shift status "ready" + echo "Done" else echo "App $APP is waiting to start until $OTHER is ready" status "waiting for $OTHER" diff --git a/auth/sample/bin/service.sh b/auth/sample/bin/service.sh index f261c18e..b6121ead 100644 --- a/auth/sample/bin/service.sh +++ b/auth/sample/bin/service.sh @@ -7,6 +7,10 @@ LOCAL=/opt/app/osaaf/local DATA=/opt/app/osaaf/data PUBLIC=/opt/app/osaaf/public CONFIG=/opt/app/aaf_config + +# If doesn't exist... still create +mkdir -p /opt/app/osaaf + # Temp use for clarity of code FILE= @@ -85,7 +89,8 @@ if [ ! -e $LOCAL/org.osaaf.aaf.props ]; then echo cadi_longitude=${LONGITUDE} >> ${TMP} echo cadi_x509_issuers=${CADI_X509_ISSUERS} >> ${TMP} echo aaf_register_as=${AAF_REGISTER_AS} >> ${TMP} - echo aaf_locate_url=https://${AAF_REGISTER_AS}:8095 >> ${TMP} + LOCATOR_AS=${LOCATOR:=AAF_REGISTER_AS} + echo aaf_locate_url=https://${AAF_LOCATOR_AS}:8095 >> ${TMP} cat $TMP |