update Agent for Helm
[aaf/authz.git] / auth / helm / aaf-hello / aaf.sh
1 . ../../docker/aaf.props
2 IMAGE=onap/aaf/aaf_agent:$VERSION
3
4 kubectl -n onap run -it --rm aaf-agent-$USER --image=$IMAGE --overrides='
5 {
6     "spec": {
7         "containers": [
8             {
9                 "name": "aaf-agent-'$USER'",
10                 "image": "'$IMAGE'",
11                 "imagePullPolicy": "IfNotPresent",
12                 "command": [
13                    "bash", 
14                    "-c",
15                    "/opt/app/aaf_config/bin/agent.sh && cd /opt/app/osaaf/local && exec bash"
16                  ],
17                 "env": [
18                    {
19                      "name": "APP_FQI",
20                      "value": "aaf@aaf.osaaf.org"
21                    },{
22                      "name": "DEPLOY_FQI",
23                      "value": "deployer@people.osaaf.org"
24                    },{
25                      "name": "DEPLOY_PASSWORD",
26                      "value": "demo123456!"
27                    },{
28                      "name": "aaf_locate_url",
29                      "value": "https://aaf-locate.onap:8095"
30                    },{
31                      "name": "aaf_locator_container",
32                      "value": "helm"
33                    },{
34                      "name": "aaf_locator_container_ns",
35                      "value": "onap"
36                    },{
37                      "name": "aaf_locator_public_fqdn",
38                      "value": "aaf.osaaf.org"
39                    },{
40                      "name": "aaf_locator_fqdn",
41                      "value": "aaf-hello"
42                    },{
43                      "name": "cadi_latitude",
44                      "value": "'$LATITUDE'"
45                    },{
46                      "name": "cadi_longitude",
47                      "value": "'$LONGITUDE'"
48                    }
49                 ],
50                 "stdin": true,
51                 "stdinOnce": true,
52                 "tty": true,
53                 "volumeMounts": [
54                     {
55                         "mountPath": "/opt/app/osaaf",
56                         "name": "aaf-hello-vol"
57                     }
58                 ]
59             }
60         ],
61       "volumes": [
62             {
63                 "name": "aaf-hello-vol",
64                 "persistentVolumeClaim": {
65                     "claimName": "aaf-hello-pvc"
66                 }
67             }
68         ]
69    }
70 }
71 ' --restart=Never  -- bash