Adding GIZMO chart to AAI
[oom.git] / kubernetes / aai / templates / aai-resources-deployment.yaml
1 # Copyright © 2017 Amdocs, Bell Canada
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 #{{ if not .Values.disableAaiAaiResources }}
16 apiVersion: extensions/v1beta1
17 kind: Deployment
18 metadata:
19   name: aai-resources
20   namespace: "{{ .Values.nsPrefix }}"
21 spec:
22   replicas: {{ .Values.aaiResourceReplicas }}
23   selector:
24     matchLabels:
25       app: aai-resources
26   template:
27     metadata:
28       labels:
29         app: aai-resources
30       name: aai-resources
31       annotations:
32         msb.onap.org/service-info: '[
33           {
34               "serviceName": "_aai-cloudInfrastructure",
35               "version": "v11",
36               "url": "/aai/v11/cloud-infrastructure",
37               "protocol": "REST",
38               "port": "8447",
39               "enable_ssl": true,
40               "lb_policy":"ip_hash",
41               "visualRange": "1",
42               "path": "/aai/v11/cloud-infrastructure"
43           },
44           {
45               "serviceName": "_aai-cloudInfrastructure",
46               "version": "v12",
47               "url": "/aai/v12/cloud-infrastructure",
48               "protocol": "REST",
49               "port": "8447",
50               "enable_ssl": true,
51               "lb_policy":"ip_hash",
52               "visualRange": "1",
53               "path": "/aai/v12/cloud-infrastructure"
54           },
55           {
56               "serviceName": "_aai-cloudInfrastructure",
57               "version": "v13",
58               "url": "/aai/v13/cloud-infrastructure",
59               "protocol": "REST",
60               "port": "8447",
61               "enable_ssl": true,
62               "lb_policy":"ip_hash",
63               "visualRange": "1",
64               "path": "/aai/v13/cloud-infrastructure"
65           },
66           {
67               "serviceName": "_aai-business",
68               "version": "v11",
69               "url": "/aai/v11/business",
70               "protocol": "REST",
71               "port": "8447",
72               "enable_ssl": true,
73               "lb_policy":"ip_hash",
74               "visualRange": "1",
75               "path": "/aai/v11/business"
76           },
77           {
78               "serviceName": "_aai-business",
79               "version": "v12",
80               "url": "/aai/v12/business",
81               "protocol": "REST",
82               "port": "8447",
83               "enable_ssl": true,
84               "lb_policy":"ip_hash",
85               "visualRange": "1",
86               "path": "/aai/v12/business"
87           },
88           {
89               "serviceName": "_aai-business",
90               "version": "v13",
91               "url": "/aai/v13/business",
92               "protocol": "REST",
93               "port": "8447",
94               "enable_ssl": true,
95               "lb_policy":"ip_hash",
96               "visualRange": "1",
97               "path": "/aai/v13/business"
98           },
99           {
100               "serviceName": "_aai-actions",
101               "version": "v11",
102               "url": "/aai/v11/actions",
103               "protocol": "REST",
104               "port": "8447",
105               "enable_ssl": true,
106               "lb_policy":"ip_hash",
107               "visualRange": "1",
108               "path": "/aai/v11/actions"
109           },
110           {
111               "serviceName": "_aai-actions",
112               "version": "v12",
113               "url": "/aai/v12/actions",
114               "protocol": "REST",
115               "port": "8447",
116               "enable_ssl": true,
117               "lb_policy":"ip_hash",
118               "visualRange": "1",
119               "path": "/aai/v12/actions"
120           },
121           {
122               "serviceName": "_aai-actions",
123               "version": "v13",
124               "url": "/aai/v13/actions",
125               "protocol": "REST",
126               "port": "8447",
127               "enable_ssl": true,
128               "lb_policy":"ip_hash",
129               "visualRange": "1",
130               "path": "/aai/v13/actions"
131           },
132           {
133               "serviceName": "_aai-service-design-and-creation",
134               "version": "v11",
135               "url": "/aai/v11/service-design-and-creation",
136               "protocol": "REST",
137               "port": "8447",
138               "enable_ssl": true,
139               "lb_policy":"ip_hash",
140               "visualRange": "1",
141               "path": "/aai/v11/service-design-and-creation"
142           },
143           {
144               "serviceName": "_aai-service-design-and-creation",
145               "version": "v12",
146               "url": "/aai/v12/service-design-and-creation",
147               "protocol": "REST",
148               "port": "8447",
149               "enable_ssl": true,
150               "lb_policy":"ip_hash",
151               "visualRange": "1",
152               "path": "/aai/v12/service-design-and-creation"
153           },
154           {
155               "serviceName": "_aai-service-design-and-creation",
156               "version": "v13",
157               "url": "/aai/v13/service-design-and-creation",
158               "protocol": "REST",
159               "port": "8447",
160               "enable_ssl": true,
161               "lb_policy":"ip_hash",
162               "visualRange": "1",
163               "path": "/aai/v13/service-design-and-creation"
164           },
165           {
166               "serviceName": "_aai-network",
167               "version": "v11",
168               "url": "/aai/v11/network",
169               "protocol": "REST",
170               "port": "8447",
171               "enable_ssl": true,
172               "lb_policy":"ip_hash",
173               "visualRange": "1",
174               "path": "/aai/v11/network"
175           },
176           {
177               "serviceName": "_aai-network",
178               "version": "v12",
179               "url": "/aai/v12/network",
180               "protocol": "REST",
181               "port": "8447",
182               "enable_ssl": true,
183               "lb_policy":"ip_hash",
184               "visualRange": "1",
185               "path": "/aai/v12/network"
186           },
187           {
188               "serviceName": "_aai-network",
189               "version": "v13",
190               "url": "/aai/v13/network",
191               "protocol": "REST",
192               "port": "8447",
193               "enable_ssl": true,
194               "lb_policy":"ip_hash",
195               "visualRange": "1",
196               "path": "/aai/v13/network"
197           },
198           {
199               "serviceName": "_aai-externalSystem",
200               "version": "v11",
201               "url": "/aai/v11/external-system",
202               "protocol": "REST",
203               "port": "8447",
204               "enable_ssl": true,
205               "lb_policy":"ip_hash",
206               "visualRange": "1",
207               "path": "/aai/v11/external-system"
208           },      
209           {
210               "serviceName": "_aai-externalSystem",
211               "version": "v12",
212               "url": "/aai/v12/external-system",
213               "protocol": "REST",
214               "port": "8447",
215               "enable_ssl": true,
216               "lb_policy":"ip_hash",
217               "visualRange": "1",
218               "path": "/aai/v12/external-system"
219           },      
220           {
221               "serviceName": "_aai-externalSystem",
222               "version": "v13",
223               "url": "/aai/v13/external-system",
224               "protocol": "REST",
225               "port": "8447",
226               "enable_ssl": true,
227               "lb_policy":"ip_hash",
228               "visualRange": "1",
229               "path": "/aai/v13/external-system"
230           },
231           {
232               "serviceName": "aai-cloudInfrastructure",
233               "version": "v11",
234               "url": "/aai/v11/cloud-infrastructure",
235               "protocol": "REST",
236               "port": "8447",
237               "enable_ssl": true,
238               "lb_policy":"ip_hash",
239               "visualRange": "1"
240           },
241           {
242               "serviceName": "aai-cloudInfrastructure",
243               "version": "v12",
244               "url": "/aai/v12/cloud-infrastructure",
245               "protocol": "REST",
246               "port": "8447",
247               "enable_ssl": true,
248               "lb_policy":"ip_hash",
249               "visualRange": "1"
250           },
251           {
252               "serviceName": "aai-cloudInfrastructure",
253               "version": "v13",
254               "url": "/aai/v13/cloud-infrastructure",
255               "protocol": "REST",
256               "port": "8447",
257               "enable_ssl": true,
258               "lb_policy":"ip_hash",
259               "visualRange": "1"
260           },
261           {
262               "serviceName": "aai-business",
263               "version": "v11",
264               "url": "/aai/v11/business",
265               "protocol": "REST",
266               "port": "8447",
267               "enable_ssl": true,
268               "lb_policy":"ip_hash",
269               "visualRange": "1"
270           },
271           {
272               "serviceName": "aai-business",
273               "version": "v12",
274               "url": "/aai/v12/business",
275               "protocol": "REST",
276               "port": "8447",
277               "enable_ssl": true,
278               "lb_policy":"ip_hash",
279               "visualRange": "1"
280           },
281           {
282               "serviceName": "aai-business",
283               "version": "v13",
284               "url": "/aai/v13/business",
285               "protocol": "REST",
286               "port": "8447",
287               "enable_ssl": true,
288               "lb_policy":"ip_hash",
289               "visualRange": "1"
290           },
291           {
292               "serviceName": "aai-actions",
293               "version": "v11",
294               "url": "/aai/v11/actions",
295               "protocol": "REST",
296               "port": "8447",
297               "enable_ssl": true,
298               "lb_policy":"ip_hash",
299               "visualRange": "1"
300           },
301           {
302               "serviceName": "aai-actions",
303               "version": "v12",
304               "url": "/aai/v12/actions",
305               "protocol": "REST",
306               "port": "8447",
307               "enable_ssl": true,
308               "lb_policy":"ip_hash",
309               "visualRange": "1"
310           },
311           {
312               "serviceName": "aai-actions",
313               "version": "v13",
314               "url": "/aai/v13/actions",
315               "protocol": "REST",
316               "port": "8447",
317               "enable_ssl": true,
318               "lb_policy":"ip_hash",
319               "visualRange": "1"
320           },
321           {
322               "serviceName": "aai-service-design-and-creation",
323               "version": "v11",
324               "url": "/aai/v11/service-design-and-creation",
325               "protocol": "REST",
326               "port": "8447",
327               "enable_ssl": true,
328               "lb_policy":"ip_hash",
329               "visualRange": "1"
330           },
331           {
332               "serviceName": "aai-service-design-and-creation",
333               "version": "v12",
334               "url": "/aai/v12/service-design-and-creation",
335               "protocol": "REST",
336               "port": "8447",
337               "enable_ssl": true,
338               "lb_policy":"ip_hash",
339               "visualRange": "1"
340           },
341           {
342               "serviceName": "aai-service-design-and-creation",
343               "version": "v13",
344               "url": "/aai/v13/service-design-and-creation",
345               "protocol": "REST",
346               "port": "8447",
347               "enable_ssl": true,
348               "lb_policy":"ip_hash",
349               "visualRange": "1"
350           },
351           {
352               "serviceName": "aai-network",
353               "version": "v11",
354               "url": "/aai/v11/network",
355               "protocol": "REST",
356               "port": "8447",
357               "enable_ssl": true,
358               "lb_policy":"ip_hash",
359               "visualRange": "1"
360           },
361           {
362               "serviceName": "aai-network",
363               "version": "v12",
364               "url": "/aai/v12/network",
365               "protocol": "REST",
366               "port": "8447",
367               "enable_ssl": true,
368               "lb_policy":"ip_hash",
369               "visualRange": "1"
370           },
371           {
372               "serviceName": "aai-network",
373               "version": "v13",
374               "url": "/aai/v13/network",
375               "protocol": "REST",
376               "port": "8447",
377               "enable_ssl": true,
378               "lb_policy":"ip_hash",
379               "visualRange": "1"
380           },
381           {
382               "serviceName": "aai-externalSystem",
383               "version": "v11",
384               "url": "/aai/v11/external-system",
385               "protocol": "REST",
386               "port": "8447",
387               "enable_ssl": true,
388               "lb_policy":"ip_hash",
389               "visualRange": "1"
390           },      
391           {
392               "serviceName": "aai-externalSystem",
393               "version": "v12",
394               "url": "/aai/v12/external-system",
395               "protocol": "REST",
396               "port": "8447",
397               "enable_ssl": true,
398               "lb_policy":"ip_hash",
399               "visualRange": "1"
400           },      
401           {
402               "serviceName": "aai-externalSystem",
403               "version": "v13",
404               "url": "/aai/v13/external-system",
405               "protocol": "REST",
406               "port": "8447",
407               "enable_ssl": true,
408               "lb_policy":"ip_hash",
409               "visualRange": "1"
410           }      
411           ]'
412     spec:
413       initContainers:
414       - command:
415         - /root/ready.py
416         args:
417         - --container-name
418         - hbase
419         env:
420         - name: NAMESPACE
421           valueFrom:
422             fieldRef:
423               apiVersion: v1
424               fieldPath: metadata.namespace
425         image: {{ .Values.image.readiness }}
426         imagePullPolicy: {{ .Values.pullPolicy }}
427         name: aai-resources-readiness
428       containers:
429       - name: aai-resources
430         image: "{{ .Values.image.aaiResourcesImage }}:{{ .Values.image.aaiResourcesVersion}}"
431         imagePullPolicy: {{ .Values.pullPolicy }}
432         env:
433         - name: CHEF_BRANCH
434           value: master
435         - name: AAI_CHEF_ENV
436           value: simpledemo
437         - name: AAI_CORE_VERSION
438           value: {{ .Values.aaicoreversion }}
439         - name: AAI_CHEF_LOC
440           value: /var/chef/aai-data/environments
441         - name: CHEF_GIT_URL
442           value: http://gerrit.onap.org/r/aai
443         - name: HBASE_STARTUP_ARTIFICIAL_DELAY
444           value: "60"
445         volumeMounts:
446         - mountPath: /etc/localtime
447           name: localtime
448           readOnly: true
449         - mountPath: /var/chef/aai-data/chef-config/dev/.knife/solo.rb
450           subPath: solo.rb
451           name: aai-chef-config
452         - mountPath: /var/chef/aai-data/environments/
453           name: aai-data
454         - mountPath: /var/log/onap
455           name: aai-resources-logs
456         - mountPath: /opt/app/aai-resources/bundleconfig/etc/logback.xml
457           name: aai-resources-log-conf
458           subPath: logback.xml
459         ports:
460         - containerPort: 8447
461         readinessProbe:
462           tcpSocket:
463             port: 8447
464           initialDelaySeconds: 5
465           periodSeconds: 10
466       - name: filebeat-onap-aai-resources
467         image: {{ .Values.image.filebeat }}
468         imagePullPolicy: {{ .Values.pullPolicy }}
469         volumeMounts:
470         - mountPath: /usr/share/filebeat/filebeat.yml
471           subPath: filebeat.yml
472           name: filebeat-conf
473         - mountPath: /var/log/onap
474           name: aai-resources-logs
475         - mountPath: /usr/share/filebeat/data
476           name: aai-resources-filebeat
477       volumes:
478       - name: localtime
479         hostPath:
480           path: /etc/localtime
481       - name: aai-chef-config
482         configMap:
483           name: aai-chef-config-configmap
484       - name: aai-data
485         configMap:
486           name: aai-resources-environments-configmap
487       - name: filebeat-conf
488         configMap:
489           name: aai-filebeat-configmap
490       - name: aai-resources-logs
491         emptyDir: {}
492       - name: aai-resources-filebeat
493         emptyDir: {}
494       - name: aai-resources-log-conf
495         configMap:
496          name: aai-resources-log-configmap
497       restartPolicy: Always
498       imagePullSecrets:
499       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
500 #{{ end }}
501