tosca_definitions_version: cloudify_dsl_1_3 description: > This example deploys the OOM Message Router application. Each service/deployment pair is associated with a single Kubernetes node. Node template naming convention: PROVISIONINGAPI_RESOURCETYPE_APPLICATIONCOMPONENT The following resources are created: - Security Group - openstack_port_zookeeper - NIC that connects to the Openstack Server - openstack_port_kafka - NIC that connects to the Openstack Server - openstack_port_dmaap - NIC that connects to the Openstack Server - openstack_server_zookeeper - a VM that a Kubernetes Node is installed on. - openstack_server_kafka - a VM that a Kubernetes Node is installed on. - openstack_server_dmaap - a VM that a Kubernetes Node is installed on. - kubernetes_node_zookeeper - a Kubernetes node that will join the Kubernetes cluster. - kubernetes_node_kafka - a Kubernetes node that will join the Kubernetes cluster. - kubernetes_node_dmaap - a Kubernetes node that will join the Kubernetes cluster. - kubernetes_deployment_zookeeper - a Kubernetes deployment. - kubernetes_deployment_kafka - a Kubernetes deployment. - kubernetes_deployment_dmaap - a Kubernetes deployment. - kubernetes_service_zookeeper - a Kubernetes service. - kubernetes_service_kafka - a Kubernetes service. - kubernetes_service_dmaap - a Kubernetes service. The following pre-setup steps are assumed, but not required: - Create Cloudify Example Environment: https://github.com/cloudify-examples/cloudify-environment-setup. - Create Kubernetes Cluster: https://github.com/cloudify-examples/simple-kubernetes-blueprint. imports: - https://raw.githubusercontent.com/cloudify-cosmo/cloudify-manager/4.1/resources/rest-service/cloudify/types/types.yaml # Plugin required: https://github.com/cloudify-cosmo/cloudify-openstack-plugin/releases/download/2.2.0/cloudify_openstack_plugin-2.2.0-py27-none-linux_x86_64-centos-Core.wgn - https://raw.githubusercontent.com/cloudify-cosmo/cloudify-openstack-plugin/2.2.0/plugin.yaml # Plugin required: https://github.com/cloudify-incubator/cloudify-utilities-plugin/releases/download/1.2.5/cloudify_utilities_plugin-1.2.5-py27-none-linux_x86_64-centos-Core.wgn - https://raw.githubusercontent.com/cloudify-incubator/cloudify-utilities-plugin/1.2.5/plugin.yaml # Plugin required: https://github.com/cloudify-incubator/cloudify-kubernetes-plugin/releases/download/1.2.0/cloudify_kubernetes_plugin-1.2.0-py27-none-linux_x86_64-centos-Core.wgn - https://raw.githubusercontent.com/cloudify-incubator/cloudify-kubernetes-plugin/1.2.0/plugin.yaml # Plugin required: http://repository.cloudifysource.org/cloudify/wagons/cloudify-diamond-plugin/1.3.5/cloudify_diamond_plugin-1.3.5-py27-none-linux_x86_64-centos-Core.wgn - https://raw.githubusercontent.com/cloudify-cosmo/cloudify-diamond-plugin/1.3.5/plugin.yaml # Plugin required: http://repository.cloudifysource.org/cloudify/wagons/cloudify-fabric-plugin/1.5/cloudify_fabric_plugin-1.5-py27-none-linux_x86_64-centos-Core.wgn - https://raw.githubusercontent.com/cloudify-cosmo/cloudify-fabric-plugin/1.5/plugin.yaml - cloudify/types/kubernetes.yaml inputs: configuration_file_content: type: string NS: default: oom image: description: Image to be used when launching agent VMs default: { get_secret: centos_core_image } flavor: description: Flavor of the agent VMs default: { get_secret: large_image_flavor } agent_user: description: > User for connecting to agent VMs default: centos app_name: default: message-router security_group: default: { concat: [ 'secgrp_', { get_input: app_name } ] } dsl_definitions: openstack_config: &openstack_config username: { get_secret: keystone_username } password: { get_secret: keystone_password } tenant_name: { get_secret: keystone_tenant_name } auth_url: { get_secret: keystone_url } region: { get_secret: region } groups: openstack_server_port_group_zookeeper: members: - openstack_server_zookeeper - openstack_port_zookeeper openstack_server_port_group_kafka: members: - openstack_server_kafka - openstack_port_kafka openstack_server_port_group_dmaap: members: - openstack_server_dmaap - openstack_port_dmaap policies: openstack_server_port_policies_scaling: type: cloudify.policies.scaling properties: default_instances: 1 targets: - openstack_server_port_group_zookeeper - openstack_server_port_group_kafka - openstack_server_port_group_dmaap node_templates: kubernetes_service_zookeeper: type: cloudify.kubernetes.resources.Service properties: definition: apiVersion: v1 kind: Service metadata: name: zookeeper labels: app: zookeeper spec: ports: - name: zookeeper1 port: 2181 selector: app: zookeeper clusterIP: None relationships: - type: cloudify.kubernetes.relationships.managed_by_master target: k8s - type: cloudify.relationships.depends_on target: kubernetes_deployment_zookeeper kubernetes_deployment_zookeeper: type: cloudify.kubernetes.resources.Deployment properties: definition: file: resource_path: kubernetes/message-router/message-router-zookeeper.yaml relationships: - type: cloudify.kubernetes.relationships.managed_by_master target: k8s - type: cloudify.relationships.depends_on target: kubernetes_node_zookeeper kubernetes_node_zookeeper: type: cloudify.nodes.Kubernetes.Node relationships: - type: cloudify.relationships.contained_in target: openstack_server_zookeeper interfaces: cloudify.interfaces.lifecycle: start: implementation: fabric.fabric_plugin.tasks.run_task inputs: task_properties: hostname: { get_attribute: [ SELF, hostname ] } labels: app: zookeeper openstack_server_zookeeper: type: cloudify.openstack.nodes.Server properties: &openstack_server_properties openstack_config: *openstack_config agent_config:
{{/*
# Copyright © 2017 Amdocs, Bell Canada
# Modifications Copyright © 2018-2019 AT&T
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/}}

{{ include "common.secretFast" . }}
---
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "common.fullname" . }}-secret
  namespace: {{ include "common.namespace" . }}
  labels:
    app: {{ include "common.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ include "common.release" . }}
    heritage: {{ .Release.Service }}
type: Opaque
data:
{{- range $path, $bytes := .Files.Glob "resources/secrets/*" }}
  {{ base $path }}: {{ tpl ($.Files.