summaryrefslogtreecommitdiffstats
path: root/auth/helm
diff options
context:
space:
mode:
Diffstat (limited to 'auth/helm')
-rw-r--r--auth/helm/aaf-hello/agent.sh103
-rw-r--r--auth/helm/aaf-hello/templates/aaf-hello.yaml2
-rw-r--r--auth/helm/aaf-hello/values.yaml5
-rw-r--r--auth/helm/aaf/Chart.yaml2
-rw-r--r--auth/helm/aaf/values.yaml2
5 files changed, 109 insertions, 5 deletions
diff --git a/auth/helm/aaf-hello/agent.sh b/auth/helm/aaf-hello/agent.sh
new file mode 100644
index 00000000..a622686a
--- /dev/null
+++ b/auth/helm/aaf-hello/agent.sh
@@ -0,0 +1,103 @@
+function prop () {
+ echo $(grep " $1" values.yaml | grep -v "#"| sed -e "s/.*$1: *//")
+}
+
+REPO=$(prop repository)
+if [ -z "$REPO" ]; then
+ REPO="nexus3.onap.org:10001"
+fi
+
+if [ "\"\"" = "$REPO" ]; then
+ IMAGE="$(prop agentImage)"
+else
+ IMAGE="$REPO/$(prop agentImage)"
+fi
+
+APP_FQI=$(prop fqi)
+FQDN=$(prop fqdn)
+LATITUDE=$(prop cadi_latitude)
+LONGITUDE=$(prop cadi_longitude)
+DEPLOY_FQI=$(prop deploy_fqi)
+echo "Enter Password for Deployer: $DEPLOY_FQI"
+#read DEPLOY_PASSWORD
+#if [ -z "$DEPLOY_PASSWORD" ]; then
+ # ONAP TEST Password. DO NOT PUT REAL PASSWORDS HERE!!!
+ DEPLOY_PASSWORD='"demo123456!"'
+#fi
+DEPLOYMENT=$(kubectl -n onap get deployments | grep ${FQDN//\"} | cut -f1 -d' ')
+if [ -z "$DEPLOYMENT" ]; then
+ DEPLOYMENT=$FQDN
+fi
+echo Running from $IMAGE for Deployment $DEPLOYMENT
+
+kubectl -n onap run -it --rm aaf-agent-$USER --image=$IMAGE --overrides='
+{
+ "spec": {
+ "containers": [
+ {
+ "name": "aaf-agent-'$USER'",
+ "image": "'$IMAGE'",
+ "imagePullPolicy": "IfNotPresent",
+ "command": [
+ "bash",
+ "-c",
+ "/opt/app/aaf_config/bin/agent.sh && cd /opt/app/osaaf/local && exec bash"
+ ],
+ "env": [
+ {
+ "name": "APP_FQI",
+ "value": '$APP_FQI'
+ },{
+ "name": "APP_FQDN",
+ "value": '$FQDN'
+ },{
+ "name": "DEPLOY_FQI",
+ "value": '$DEPLOY_FQI'
+ },{
+ "name": "DEPLOY_PASSWORD",
+ "value": '$DEPLOY_PASSWORD'
+ },{
+ "name": "aaf_locate_url",
+ "value": "https://aaf-locate.onap:8095"
+ },{
+ "name": "aaf_locator_container",
+ "value": "helm"
+ },{
+ "name": "aaf_locator_container_ns",
+ "value": "onap"
+ },{
+ "name": "aaf_locator_public_fqdn",
+ "value": "aaf.osaaf.org"
+ },{
+ "name": "aaf_locator_fqdn",
+ "value": '$FQDN'
+ },{
+ "name": "cadi_latitude",
+ "value": '$LATITUDE'
+ },{
+ "name": "cadi_longitude",
+ "value": '$LONGITUDE'
+ }
+ ],
+ "stdin": true,
+ "stdinOnce": true,
+ "tty": true,
+ "volumeMounts": [
+ {
+ "mountPath": "/opt/app/osaaf",
+ "name": "'${FQDN//\"}'-vol"
+ }
+ ]
+ }
+ ],
+ "volumes": [
+ {
+ "name": "'${FQDN//\"}'-vol",
+ "persistentVolumeClaim": {
+ "claimName": "'${DEPLOYMENT//\"}'-pvc"
+ }
+ }
+ ]
+ }
+}
+' --restart=Never -- bash
diff --git a/auth/helm/aaf-hello/templates/aaf-hello.yaml b/auth/helm/aaf-hello/templates/aaf-hello.yaml
index 7bf35cde..3ff9a576 100644
--- a/auth/helm/aaf-hello/templates/aaf-hello.yaml
+++ b/auth/helm/aaf-hello/templates/aaf-hello.yaml
@@ -57,7 +57,7 @@ spec:
claimName: aaf-hello-pvc
initContainers:
- name: aaf-hello-config
- image: "{{ .Values.image.repository }}{{ .Values.service.initImage }}"
+ image: "{{ .Values.image.repository }}{{ .Values.service.agentImage }}"
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: "/opt/app/osaaf"
diff --git a/auth/helm/aaf-hello/values.yaml b/auth/helm/aaf-hello/values.yaml
index da37ff63..5a3931c2 100644
--- a/auth/helm/aaf-hello/values.yaml
+++ b/auth/helm/aaf-hello/values.yaml
@@ -37,8 +37,8 @@ image:
# repository: localhost:5000/
service:
- initImage: onap/aaf/aaf_agent:2.1.15-SNAPSHOT
- image: onap/aaf/aaf_hello:2.1.15-SNAPSHOT
+ agentImage: onap/aaf/aaf_agent:2.1.16-SNAPSHOT
+ image: onap/aaf/aaf_hello:2.1.16-SNAPSHOT
app_ns: "org.osaaf.aaf"
fqi: "aaf@aaf.osaaf.org"
fqdn: "aaf-hello"
@@ -47,6 +47,7 @@ service:
public_port: "30086"
cadi_latitude: "38.0"
cadi_longitude: "-72.0"
+ deploy_fqi: "deployer@people.osaaf.org"
persistence:
# Where on local disk to store
diff --git a/auth/helm/aaf/Chart.yaml b/auth/helm/aaf/Chart.yaml
index 3f370a55..f83041e9 100644
--- a/auth/helm/aaf/Chart.yaml
+++ b/auth/helm/aaf/Chart.yaml
@@ -22,4 +22,4 @@ apiVersion: v1
appVersion: "1.0"
description: AAF Helm Chart
name: aaf
-version: 2.1.15-SNAPSHOT
+version: 2.1.16-SNAPSHOT
diff --git a/auth/helm/aaf/values.yaml b/auth/helm/aaf/values.yaml
index 4bb2037f..b320d9c8 100644
--- a/auth/helm/aaf/values.yaml
+++ b/auth/helm/aaf/values.yaml
@@ -104,7 +104,7 @@ image:
# When using Docker Repo, add, and include trailing "/"
# repository: nexus3.onap.org:10003/
# repository: localhost:5000/
- version: 2.1.15-SNAPSHOT
+ version: 2.1.16-SNAPSHOT
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious