OOM updates 12/70212/1
authorInstrumental <jonathan.gathman@att.com>
Wed, 10 Oct 2018 23:51:33 +0000 (18:51 -0500)
committerInstrumental <jonathan.gathman@att.com>
Wed, 10 Oct 2018 23:51:37 +0000 (18:51 -0500)
Issue-ID: AAF-539
Change-Id: Ie169661ac36e9ecbc0dc56c7d71191be5e649b7b
Signed-off-by: Instrumental <jonathan.gathman@att.com>
auth/helm/aaf/templates/aaf-cm.yaml [new file with mode: 0644]
auth/helm/aaf/templates/aaf-fs.yaml [new file with mode: 0644]
auth/helm/aaf/templates/aaf-gui.yaml [new file with mode: 0644]
auth/helm/aaf/templates/aaf-hello.yaml [new file with mode: 0644]
auth/helm/aaf/templates/aaf-locate.yaml [new file with mode: 0644]
auth/helm/aaf/templates/aaf-oauth.yaml [new file with mode: 0644]
auth/helm/aaf/templates/aaf-service.yaml [new file with mode: 0644]
auth/sample/bin/pod_wait.sh
auth/sample/bin/service.sh

diff --git a/auth/helm/aaf/templates/aaf-cm.yaml b/auth/helm/aaf/templates/aaf-cm.yaml
new file mode 100644 (file)
index 0000000..0940de4
--- /dev/null
@@ -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 (file)
index 0000000..7d59684
--- /dev/null
@@ -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 (file)
index 0000000..bc2a23d
--- /dev/null
@@ -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 (file)
index 0000000..b11365d
--- /dev/null
@@ -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 (file)
index 0000000..7f10fbf
--- /dev/null
@@ -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 (file)
index 0000000..a08e86f
--- /dev/null
@@ -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 (file)
index 0000000..e76f61b
--- /dev/null
@@ -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
index 08998db..1435036 100644 (file)
@@ -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"
index f261c18..b6121ea 100644 (file)
@@ -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