Add mod/runtimeapi
[dcaegen2/platform.git] / mod / runtimeapi / runtime-web / src / test / data / blueprints_samples / dcae-controller-toolbox-gui-eom-k8s.yaml
1 # ============LICENSE_START=======================================================
2 # Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 # ============LICENSE_END=========================================================
16 #This is the blueprint to deploy the DCAE Toolbox GUI.
17 #2.0.0
18 #
19 ---
20 tosca_definitions_version: cloudify_dsl_1_3
21 imports:
22 - http://www.getcloudify.org/spec/cloudify/4.4/types.yaml
23 - /k8splugin/1.4.22/node-type.yaml
24 - /relationship/1.0.1/types.yaml
25 - /cloudifydmaapplugin/1.4.6/node-type.yaml
26 - /dcaepolicyplugin/2.3.1/node-type.yaml
27 - /pgaas/0.3.2/pgaas_types.yaml
28 inputs:
29   additionalsans:
30     type: string
31     default: ''
32     description: additional sans (string)
33   annotations:
34     default: {}
35   dcae-controller-toolbox-gui_cpu_limit:
36     type: string
37     default: '250m'
38     description: cpu limit for deployment (string)
39   dcae-controller-toolbox-gui_cpu_request:
40     type: string
41     default: '250m'
42     description: cpu requested for deployment (string)
43   dcae-controller-toolbox-gui_memory_limit:
44     type: string
45     default: '128Mi'
46     description: memory limit for deployment (string)
47   dcae-controller-toolbox-gui_memory_request:
48     type: string
49     default: '128Mi'
50     description: memory requested for deployment (string)
51   dcae_service_location:
52     type: string
53     description: Docker host override for docker bps (string)
54   idns_fqdn:
55     type: string
56     default: ''
57     description: The idns you will be using for your deployment (string)
58   image:
59     type: string
60     default: 'dcae-controller-tosca-gui:2.0.3'
61     description: The docker image for you microservice (string)
62   namespace:
63     type: string
64   replicas:
65     type: integer
66     default: 1
67     description: The number of replicas for your kubernetes deployment (integer)
68   service_component_name_override:
69     type: string
70     default: 'dcae-controller-toolbox-gui'
71     description: Unique identifier for your deployment (string)
72   use_aaf_tls:
73     type: boolean
74     default: false
75     description: To use or not use the aaf section (boolean)
76 node_templates:
77   dcae-controller-toolbox-gui_dcae-controller-toolbox-gui:
78     type: dcae.nodes.ContainerizedServiceComponent
79     properties:
80       application_config:
81         services_calls: []
82         streams_publishes: {}
83         streams_subscribes: {}
84       docker_config:
85         healthcheck:
86           interval: 360s
87           timeout: 120s
88           type: http
89           endpoint: /actuator/health
90         livehealthcheck:
91           interval: 360s
92           timeout: 120s
93           type: http
94           endpoint: /actuator/health
95         volumes: []
96         ports:
97         - '8080:30998'
98       image:
99         get_input: image
100       location_id:
101         get_input: dcae_service_location
102       service_component_type: dcae-controller-toolbox-gui
103       replicas:
104         get_input: replicas
105       service_component_name_override:
106         concat:
107         - get_secret: location_id
108         - '-'
109         - get_input: service_component_name_override
110       configuration:
111         file_content:
112           apiVersion: v1
113           clusters:
114           - name: default-cluster
115             cluster:
116               server:
117                 concat:
118                 - https://
119                 - get_secret: kc-kubernetes_master_ip
120                 - ':'
121                 - get_secret: kc-kubernetes_master_port
122               insecure-skip-tls-verify: true
123           contexts:
124           - name: default-context
125             context:
126               cluster: default-cluster
127               namespace:
128                 get_input: namespace
129               user: default-user
130           kind: Config
131           preferences: {}
132           users:
133           - name: default-user
134             user:
135               token:
136                 get_secret: dcae-mechid-k8s-token
137           current-context: default-context
138       resource_config:
139         limits:
140           cpu:
141             get_input: dcae-controller-toolbox-gui_cpu_limit
142           memory:
143             get_input: dcae-controller-toolbox-gui_memory_limit
144         requests:
145           cpu:
146             get_input: dcae-controller-toolbox-gui_cpu_request
147           memory:
148             get_input: dcae-controller-toolbox-gui_memory_request
149       aaf_tls_info:
150         use_aaf_tls:
151           get_input: use_aaf_tls
152         cert_directory: /opt/app/aafcertman
153         image: aaf-init-container:1.0.1
154         env:
155         - name: NAMESPACE
156           valueFrom:
157             fieldRef:
158               fieldPath: metadata.namespace
159         - name: deployer_id
160           valueFrom:
161             secretKeyRef:
162               name:
163                 concat:
164                 - get_input: namespace
165                 - -cert-secret
166               key: deployerid
167         - name: deployer_pass
168           valueFrom:
169             secretKeyRef:
170               name:
171                 concat:
172                 - get_input: namespace
173                 - -cert-secret
174               key: deployerpass
175         - name: cert_id
176           valueFrom:
177             secretKeyRef:
178               name:
179                 concat:
180                 - get_input: namespace
181                 - -cert-secret
182               key: certid
183         - name: cm_url
184           valueFrom:
185             secretKeyRef:
186               name:
187                 concat:
188                 - get_input: namespace
189                 - -cert-secret
190               key: cmurl
191         - name: idns_fqdn
192           value:
193             get_input: idns_fqdn
194         - name: app_service_names
195           value:
196             concat:
197             - get_secret: location_id
198             - '-'
199             - get_input: service_component_name_override
200         args:
201         - place
202         - cmtemplate
203         - -idnsfqdn=$(idns_fqdn)
204         - -cmurl=$(cm_url)
205         - -deployerid=$(deployer_id)
206         - -deployerpass=$(deployer_pass)
207         - -certid=$(cert_id)
208         - -namespace=$(NAMESPACE)
209         - -services=$(app_service_names)
210         - concat:
211           - -additionalsans=
212           - get_input: additionalsans
213         use_aaf_tls_renewal: true
214         renewal_args:
215         - renew
216         - -idnsfqdn=$(idns_fqdn)
217         - -cmurl=$(cm_url)
218         resource_config:
219           limits:
220             cpu: 250m
221             memory: 256Mi
222           requests:
223             cpu: 100m
224             memory: 256Mi
225       annotations:
226         get_input: annotations
227     relationships: []