1 # ================================================================================
2 # Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
3 # Copyright (c) 2020 Pantheon.tech. All rights reserved.
4 # Copyright (c) 2020-2021 Nokia. All rights reserved.
5 # Copyright (c) 2020 J. F. Lucas. All rights reserved.
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 # ============LICENSE_END=========================================================
21 tosca_definitions_version: cloudify_dsl_1_3
25 executor: 'central_deployment_agent'
26 package_name: k8splugin
27 package_version: 3.5.3
31 dcae.types.LoggingInfo:
33 Information for setting up centralized logging via ELK using a "sidecar" container.
34 If 'log_directory' is not provided, the plugin will not set up ELK logging.
35 (The properties all have to be declared as not required, otherwise the
36 'log_info' property on the node would also be required.)
40 The path in the container where the component writes its logs.
41 If the component is following the EELF requirements, this would be
42 the directory where the four EELF files are being written.
43 (Other logs can be placed in the directory--if their names in '.log',
44 they'll also be sent into ELK.)
49 Hope not to use this. By default, the plugin will mount the log volume
50 at /var/log/onap/<component_type> in the sidecar container's file system.
51 'alternate_fb_path' allows overriding the default. Will affect how the log
52 data can be found in the ELK system.
58 Information for using TLS (HTTPS). (The properties all have to be declared as not
59 required, otherwise the tls_info property on the node would also be required.)
63 The path in the container where the component expects to find TLS-related data.
68 Flag indicating whether TLS (HTTPS) is to be used
72 dcae.types.ExternalCertParameters:
74 Certificate parameters for external TLS info
78 Common name which should be present in certificate
84 List of Subject Alternative Names (SANs) which should be present in certificate
89 dcae.types.ExternalTLSInfo:
91 Information for using external TLS.
93 external_cert_directory:
95 The path in the container where the component expects to find TLS-related data.
98 default: "/opt/app/dcae-certificate/external"
101 Flag indicating whether external TLS is to be used
107 Name of Certificate Authority configured on CertService side
113 Type of output certificates
117 external_certificate_parameters:
119 Certificate parameters for external TLS info
120 type: dcae.types.ExternalCertParameters
124 dcae.nodes.ContainerizedComponent:
125 # Base type for all containerized components
126 # Captures common properties and interfaces
127 derived_from: cloudify.nodes.Root
131 description: Full uri of the Docker image
136 Application configuration for this component. The data structure is
137 expected to be a complex map (native YAML) and to be constructed and filled
138 by the creator of the blueprint.
143 Copied from the auxiliary portion of the component spec that contains things
144 like healthcheck definitions for the component. Health checks are
150 This is used to specify the cpu and memory request and limit for container.
151 Please specify "requests" property and/or a "limits" property, with subproproperties
152 for cpu and memory. (https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/)
155 type: dcae.types.LoggingInfo
157 Information for setting up centralized logging via ELK.
161 type: dcae.types.TLSInfo
163 Information for setting up TLS (HTTPS).
167 type: dcae.types.ExternalTLSInfo
169 Information for setting up external TLS
175 The number of instances of the component that should be launched initially
181 Set to true if the orchestrator should always pull a new copy of the image
182 before deploying. By default the orchestrator pulls only if the image is
183 not already present on the host where the container is being launched.
189 The identifier for the location where the component is to be deployed.
190 If absent, the plugin uses its configured default location, typically the location
191 where the plugin is running (the central site). Also used to supply a location to
192 the DMaaP bus controller if the component is being provisioned as a publisher or
193 subscriber to a DMaaP feed or topic.
197 dcae.interfaces.update:
199 implementation: k8s.k8splugin.scale
201 implementation: k8s.k8splugin.update_image
203 # The ContainerizedServiceComponent node type is to be used for DCAE service components.
205 # The plugin deploys the component into a Kubernetes cluster with a very specific choice
206 # of Kubernetes elements that are deliberately not under the control of the blueprint author.
207 # The idea is to deploy all service components in a consistent way, with the details abstracted
208 # away from the blueprint author. The plugin is responsible for:
209 # * Generation of the service component name
210 # * Managing of service component configuration information
211 dcae.nodes.ContainerizedServiceComponent:
212 derived_from: dcae.nodes.ContainerizedComponent
214 service_component_type:
216 description: Service component type of the application being run in the container
221 Unique id for this DCAE service instance this component belongs to. This value
222 will be applied as a tag in the registration of this component with Consul.
228 Location id of where to run the container. Not used by the plugin. Here for backward compatibility.
232 service_component_name_override:
235 Manually override and set the name for this component. If this
236 is set, then the name will not be auto-generated. Using this feature provides
237 a service component with a fixed name that's known in advance, but care must be taken
238 to avoid attempting to deploy two components with the same name. If the component
239 exposes any ports, the k8s Service created by the plugin will use service_component_name_override
240 as the DNS host name.
244 cloudify.interfaces.lifecycle:
246 # Generate service component name and populate config into Consul
247 implementation: k8s.k8splugin.create_for_components
249 # Create k8s entities for the component and start
250 implementation: k8s.k8splugin.create_and_start_container_for_components
252 # Stop and remove k8s entities associated with the component
253 implementation: k8s.k8splugin.stop_and_remove_container
255 # Delete configuration from Consul
256 implementation: k8s.k8splugin.cleanup_discovery
257 dcae.interfaces.policy:
258 # This is to be invoked by the policy handler upon policy updates
260 implementation: k8s.k8splugin.policy_update
262 # This node type is intended for DCAE service components that use DMaaP and must use the
264 dcae.nodes.ContainerizedServiceComponentUsingDmaap:
265 derived_from: dcae.nodes.ContainerizedServiceComponent
269 List of DMaaP streams used for publishing.
271 Message router items look like:
278 Data router items look like:
284 This information is forwarded to the dmaap plugin to provision
288 List of DMaaP streams used for subscribing.
290 Message router items look like:
297 Data router items look like:
307 Note that username and password is optional. If not provided or null then the
308 plugin will generate them.
312 cloudify.interfaces.lifecycle:
314 # Generate service component name, populate config into Consul, set up runtime properties for DMaaP plugin
315 implementation: k8s.k8splugin.create_for_components_with_streams
317 # ContainerizedApplication is intended to be more of an all-purpose Docker container node
318 # for non-componentized applications.
319 dcae.nodes.ContainerizedApplication:
320 derived_from: cloudify.nodes.Root
324 description: Name of the Docker container to be given
327 description: Full uri of the Docker image
329 cloudify.interfaces.lifecycle:
331 # Create Docker container and start
332 implementation: k8s.k8splugin.create_and_start_container
334 # Stop and remove Docker container
335 implementation: k8s.k8splugin.stop_and_remove_container
336 dcae.interfaces.scale:
338 implementation: k8s.k8splugin.scale
339 dcae.interfaces.update:
341 implementation: k8s.k8splugin.update_image