summaryrefslogtreecommitdiffstats
path: root/reference_templates
diff options
context:
space:
mode:
Diffstat (limited to 'reference_templates')
-rw-r--r--reference_templates/DeploymentHandler-README.md23
-rw-r--r--reference_templates/DeploymentHandler.yaml-template102
-rw-r--r--reference_templates/DockerBP.yaml-template345
-rw-r--r--reference_templates/README.txt52
-rw-r--r--reference_templates/cdap-sdk.yaml-template71
-rw-r--r--reference_templates/cdap_broker.yaml-template97
-rw-r--r--reference_templates/cdapbp7.yaml-template1054
-rw-r--r--reference_templates/centos_vm.yaml-template243
-rw-r--r--reference_templates/config_binding_service.yaml-template62
-rw-r--r--reference_templates/consul_cluster.yaml-template384
-rw-r--r--reference_templates/heartbeat-service.yaml-template61
-rw-r--r--reference_templates/holmes-engine.yaml-template98
-rw-r--r--reference_templates/holmes-rules.yaml-template81
-rw-r--r--reference_templates/inventory.yaml-template196
-rw-r--r--reference_templates/k8s-dashboard.yaml-template119
-rw-r--r--reference_templates/k8s-datafile-collector.yaml-template124
-rw-r--r--reference_templates/k8s-pgaas-database.yaml-template57
-rw-r--r--reference_templates/k8s-pgaas-getdbinfo.yaml-template99
-rw-r--r--reference_templates/pgaas-cluster.yaml-template435
-rw-r--r--reference_templates/pgaas-database.yaml-template63
-rw-r--r--reference_templates/pgaas-disk.yaml-template123
-rw-r--r--reference_templates/pgaas-getdbinfo.yaml-template92
-rw-r--r--reference_templates/pgaas-onevm.yaml-template300
-rw-r--r--reference_templates/pgaas.yaml-template412
-rw-r--r--reference_templates/policy_handler.yaml-template70
-rw-r--r--reference_templates/prh-service.yaml-template61
-rw-r--r--reference_templates/snmptrap-collector.yaml-template95
-rw-r--r--reference_templates/tca.yaml-template92
-rw-r--r--reference_templates/tcadocker-service.yaml-template192
-rw-r--r--reference_templates/test_dr_mr.yaml-template121
-rw-r--r--reference_templates/test_dr_pubsub.yaml-template145
-rw-r--r--reference_templates/test_mr_multipub.yaml-template178
-rw-r--r--reference_templates/test_mr_multisub.yaml-template186
-rw-r--r--reference_templates/test_mr_pubsub.yaml-template89
-rw-r--r--reference_templates/test_mr_pubsub_extra.yaml-template93
-rw-r--r--reference_templates/ves.yaml-template135
36 files changed, 6150 insertions, 0 deletions
diff --git a/reference_templates/DeploymentHandler-README.md b/reference_templates/DeploymentHandler-README.md
new file mode 100644
index 0000000..8b76890
--- /dev/null
+++ b/reference_templates/DeploymentHandler-README.md
@@ -0,0 +1,23 @@
+## Deployment Handler Installation Blueprint
+[`DeploymentHandler.yaml`](./DeploymentHandler.yaml) is a Cloudify blueprint that can be used to deploy an instance of the DCAE Deployment Handler (DH) as a Docker container in the DCAE Docker environment.
+
+### Input parameters
+Some deployment parameters can be controlled via inputs supplied to Cloudify at the time a deployment is created from the blueprint.
+The table below describes the available input parameters.
+
+Parameter|Description|Required?|Default
+---------|-----------|---------|-------
+`location_id`|Location where DH is to be deployed; should point to a central site|Yes|None
+`docker_host_override`|Registered service name of the Docker host where DH should be deployed|Yes|`platform_dockerhost`
+`deployment_handler_image`|Fully qualified name of the Docker image to use for DH|Yes|Current stable version of image
+`application_config`|Application-specific configuration parameters (see below)|No|`{}`
+`host_log_root`|root directory for logs in the Docker host file system|Yes|`/opt/onap/log`
+
+### Application configuration
+The DH has sensible defaults for its configuration. The `application_config` input can be used to supply additional configuration information to override defaults and/or to set values for optional parameters. The content of this input is a dictionary with parameter names as keys and parameter values as values. See the documentation for the DH for the available configuration parameters.
+
+### Additional configuration
+`DeploymentHandler.yaml` relies on the DCAE Docker plugin to carry out the actual deployment. The plugin gathers information from the blueprint and the inputs and uses this information to make API calls to a Docker Engine running in the DCAE environment.
+
+Certain aspects of Docker behavior are controlled through inputs to the plugin's `create` operation. This includes mapping directories and files from the host file system into the Docker container's file system. It is also possible to pass environment variables to the container. The inputs to the `create` operation are specified inside the blueprint in the `interfaces` section of node definition for the deployment handler.
+
diff --git a/reference_templates/DeploymentHandler.yaml-template b/reference_templates/DeploymentHandler.yaml-template
new file mode 100644
index 0000000..4856636
--- /dev/null
+++ b/reference_templates/DeploymentHandler.yaml-template
@@ -0,0 +1,102 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START==========================================
+# org.onap.dcae
+# ===================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ===================================================================
+# 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.
+# ============LICENSE_END============================================
+#
+# ECOMP and OpenECOMP are trademarks
+# and service marks of AT&T Intellectual Property.
+#
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: >
+ This blueprint deploys/manages the DCAE deployment handler as a Docker container
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml
+
+
+inputs:
+
+ location_id:
+ description: Deployment location
+
+ docker_host_override:
+ description: Target docker host
+ default: 'platform_dockerhost'
+
+ deployment_handler_image:
+ description: Docker image for deployment handler
+ default: '{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.platform.deployment-handler:3.2.0'
+
+ application_config:
+ description: deployment handler application configuration (to override defaults)
+ default: {}
+
+ host_log_root:
+ description: root directory for logs in the Docker host file system
+ default: '/opt/onap/log'
+
+node_templates:
+
+ # Deployment Handler
+ deployment-handler:
+ type: dcae.nodes.DockerContainerForPlatforms
+ properties:
+ name:
+ 'deployment_handler'
+ image:
+ { get_input: deployment_handler_image }
+ application_config:
+ { get_input: application_config }
+ host_port:
+ 8188
+ container_port:
+ 8443
+ docker_config:
+ healthcheck:
+ type: 'http'
+ interval: '300s'
+ timeout: '5s'
+ endpoint: '/'
+ relationships:
+ - type: dcae.relationships.component_contained_in
+ target: docker_host
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ SOMEVAR: somevalue
+ #volumes:
+ #- host:
+ #path: { concat: [ { get_input: host_log_root }, '/dcae/deployment_handler' ] }
+ #container:
+ #bind: /opt/app/dh/log
+ #mode: rw
+
+ # Docker host
+ docker_host:
+ type: dcae.nodes.SelectedDockerHost
+ properties:
+ location_id:
+ { get_input: location_id }
+ docker_host_override:
+ { get_input: docker_host_override }
diff --git a/reference_templates/DockerBP.yaml-template b/reference_templates/DockerBP.yaml-template
new file mode 100644
index 0000000..e655063
--- /dev/null
+++ b/reference_templates/DockerBP.yaml-template
@@ -0,0 +1,345 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - http://www.getcloudify.org/spec/openstack-plugin/1.4/plugin.yaml
+ - http://www.getcloudify.org/spec/fabric-plugin/1.4.1/plugin.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/sshkeyshare/sshkey_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml
+
+
+
+inputs:
+ registered_dockerhost_name:
+ description: the name that this Dockerhost is registered as
+ location_id:
+ description: the location ID for the location where the Docker hsot is being deployed
+ type: string
+ target_datacenter:
+ description: |-
+ This is the name of the target Consul datacenter that the docker host will try to join
+ type: string
+ registrator_image:
+ description: |-
+ Full uri to registrator Docker image. Note! You should be using the forked version of
+ registrator in order to have Consul health checks for Docker containers.
+ type: string
+ centos7image_id:
+ type: string
+ default: ''
+ ubuntu1604image_id:
+ type: string
+ flavor_id:
+ type: string
+ security_group:
+ type: string
+ public_net:
+ type: string
+ private_net:
+ type: string
+ openstack: {}
+ keypair:
+ type: string
+ location_prefix:
+ type: string
+ location_domain:
+ type: string
+ node_name:
+ description: Used to construct the fqdn of the docker host
+ type: string
+ default: dokr00
+ key_filename:
+ type: string
+ codesource_url:
+ type: string
+ codesource_version:
+ type: string
+ vm_init_dokr_00:
+ type: string
+ default: |-
+ #!/bin/sh
+ set -x
+ DATACENTER=
+ vm_init_dokr_01:
+ type: string
+ default: |-
+ REGNAME=
+ vm_init_dokr_fqdn:
+ type: string
+ description: |-
+ The FQDN environment variable is to be used in the cloud init script for the Docker host.
+ This is to be applied as metadata on the Consul node for the Docker host under the key
+ "fqdn".
+ default: |-
+ FQDN=
+ vm_init_dokr_service_tags:
+ type: string
+ description: |-
+ Environment variable assigned to a list of strings that are to be used as tags to label
+ the docker host. These tags are used when registering the docker host as a service in
+ Consul. The format of this input parameter is a string that is a shell script variable
+ assignment of the variable SERVICE_TAGS. It must be either null or a json array of strings.
+ Here is a valid example of when the value is a json array:
+
+ 'SERVICE_TAGS="[\"foo\", \"bar\"]"'
+
+ Note how the double quotes per array element are escaped.
+ default: "SERVICE_TAGS=null"
+ vm_init_dokr_02:
+ type: string
+ default: |
+ MYIP=`wget -qO- http://169.254.169.254/2009-04-04/meta-data/local-ipv4`
+ while [ -z "$MYPUB" ]; do
+ MYPUB=`wget -qO- http://169.254.169.254/2009-04-04/meta-data/public-ipv4`
+ sleep 5
+ done
+ echo "My public IP: $MYPUB"
+ MYNAME=`hostname`
+ echo >>/etc/hosts
+ echo $MYIP $MYNAME >>/etc/hosts
+
+ # Grab nameservers to be used to setup recursors for Consul
+ cat <<EOF > /tmp/grab_nameservers.py
+ with open("/etc/resolv.conf", "r") as f:
+ nss = [line.split(" ")[1].strip() for line in f.readlines() if line.startswith("nameserver")]
+ print("[\"{0}\"]".format("\",\"".join(nss)))
+ EOF
+ NAMESERVERS=$(python3 /tmp/grab_nameservers.py)
+
+ mkdir -p /opt/consul/config /opt/consul/data /opt/consul/bin
+ # Download Consul from Nexus
+ apt-get update
+ DEBIAN_FRONTEND=noninteractive apt-get install -y -q unzip
+ CONSUL_BIN_DIR=/opt/consul/bin
+ curl -Ss https://releases.hashicorp.com/consul/0.8.3/consul_0.8.3_linux_amd64.zip > $CONSUL_BIN_DIR/consul_0.8.3_linux_amd64.zip
+ unzip $CONSUL_BIN_DIR/consul_0.8.3_linux_amd64.zip -d $CONSUL_BIN_DIR
+ # NOTE: The health check for the docker host is a simple existence look up for
+ # registrator (name is hardcoded). It does not check if registrator is running.
+ # This would require a script health check which means we might need to turn on
+ # "enable_script_check".
+ # NOTE: At the time of this change, there is no issue but there could be a
+ # chicken-and-egg issue where the health check might depend upon future downstream
+ # nodes (registrator) that downstream node requires a *healthy* docker host.
+ cat <<EOF > /opt/consul/config/consul.json
+ {
+ "bind_addr" : "0.0.0.0",
+ "client_addr" : "0.0.0.0",
+ "advertise_addr" : "$MYIP",
+ "data_dir" : "/opt/consul/data",
+ "datacenter": "$DATACENTER",
+ "http_api_response_headers": {
+ "Access-Control-Allow-Origin" : "*"
+ },
+ "rejoin_after_leave": true,
+ "server": false,
+ "ui": false,
+ "enable_syslog": true,
+ "log_level": "info",
+ "ports": {
+ "dns": 53
+ },
+ "recursors": $NAMESERVERS,
+ "service" : {
+ "id": "$REGNAME",
+ "name": "$REGNAME",
+ "address": "$MYPUB",
+ "port": 2376,
+ "tags": $SERVICE_TAGS,
+ "checks": [
+ {
+ "http": "http://$MYPUB:2376/containers/registrator/json",
+ "interval": "30s"
+ }
+ ]
+ },
+ "node_meta": {
+ "fqdn": "$FQDN"
+ }
+ }
+ EOF
+
+ # Specify DOCKER_HOST environment variable to support healthchecks for Docker containers
+ # in Consul. Tried using the local unix socket but that did not work (possible bug in Consul)
+ # so forcing to use the http connection to Docker engine.
+ cat <<EOF > /lib/systemd/system/consul.service
+ [Unit]
+ Description=Consul
+ Requires=network-online.target
+ After=network.target
+ [Service]
+ Type=simple
+ Environment=DOCKER_HOST=tcp://localhost:2376
+ ExecStart=/opt/consul/bin/consul agent -config-dir=/opt/consul/config
+ ExecReload=/bin/kill -HUP \$MAINPID
+ [Install]
+ WantedBy=multi-user.target
+ EOF
+ systemctl enable consul
+ systemctl start consul
+ until /opt/consul/bin/consul join "cloudify-manager-${DATACENTER}"
+ do
+ echo Waiting to join Consul cluster
+ sleep 60
+ done
+
+ DEBIAN_FRONTEND=noninteractive apt-get install -y -q linux-image-extra-`uname -r` linux-image-extra-virtual apparmor dirmngr
+ DEBIAN_FRONTEND=noninteractive apt-get install -y -q docker.io
+ echo 'DOCKER_OPTS="--raw-logs -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock"' >>/etc/default/docker
+ systemctl restart docker
+node_templates:
+ key_pair:
+ type: cloudify.openstack.nodes.KeyPair
+ properties:
+ private_key_path: { get_input: key_filename }
+ use_external_resource: True
+ resource_id: { get_input: keypair }
+ openstack_config: &open_conf
+ get_input: openstack
+ private_net:
+ type: cloudify.openstack.nodes.Network
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: private_net }
+ openstack_config: *open_conf
+ security_group:
+ type: cloudify.openstack.nodes.SecurityGroup
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: security_group }
+ openstack_config: *open_conf
+ fixedip_dokr00:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_dokr00:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_dokr00:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, { get_input: node_name }, '.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_dokr00, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_dokr00
+ host_dokr00:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, { get_input: node_name }] }
+ userdata:
+ concat:
+ - { get_input: vm_init_dokr_00 }
+ - { get_input: target_datacenter }
+ - |+
+
+ - { get_input: vm_init_dokr_01 }
+ - { get_input: registered_dockerhost_name }
+ - |+
+
+ - { get_input: vm_init_dokr_fqdn }
+ - { get_property: [ dns_dokr00, fqdn ] }
+ - |+
+
+ - { get_input: vm_init_dokr_service_tags }
+ - |+
+
+ - { get_input: vm_init_dokr_02 }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_dokr00
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_dokr00
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: dns_dokr00
+
+ registrator:
+ type: dcae.nodes.DockerContainer
+ properties:
+ name:
+ 'registrator'
+ image:
+ { get_input: registrator_image }
+ relationships:
+ - type: dcae.relationships.component_contained_in
+ target: docker_host
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ EXTERNAL_IP:
+ get_attribute: [ floatingip_dokr00, floating_ip_address ]
+ volumes:
+ - host:
+ path: '/var/run/docker.sock'
+ container:
+ bind: '/tmp/docker.sock'
+ mode: 'ro'
+
+ docker_host:
+ type: dcae.nodes.SelectedDockerHost
+ properties:
+ location_id:
+ { get_input: location_id }
+ docker_host_override:
+ { get_input: registered_dockerhost_name }
+ relationships:
+ - type: cloudify.relationships.depends_on #this is to avoid a race condition
+ target: host_dokr00
diff --git a/reference_templates/README.txt b/reference_templates/README.txt
new file mode 100644
index 0000000..3834c38
--- /dev/null
+++ b/reference_templates/README.txt
@@ -0,0 +1,52 @@
+Blueprints used for deployment of VM's and cluster for DCAE deployment (Amsterdam release)
+=========================================================================================
+centos_vm.yaml-template
+DockerBP.yaml-template
+consul_cluster.yaml-template
+cdap-sdk.yaml-template
+cdapbp7.yaml-template
+pgaas-database.yaml-template
+pgaas-cluster.yaml-template
+pgaas-onevm.yaml-template
+pgaas-getdbinfo.yaml-template
+pgaas-disk.yaml-template
+pgaas.yaml-template
+
+
+Blueprint used for spinning up Platform components in VM's (Amsterdam release)
+==============================================================================
+centos_vm.yaml-template
+inventory.yaml-template
+cdap_broker.yaml-template
+policy_handler.yaml-template
+DeploymentHandler.yaml-template
+config_binding_service.yaml-template
+
+Blueprint used for spinning up Service components in VM's (Amsterdam release)
+==============================================================================
+holmes-rules.yaml-template
+holmes-engine.yaml-template
+heartbeat-service.yaml-template
+ves.yaml-template
+tca.yaml-template
+snmptrap-collector.yaml-template
+prh-service.yaml-template
+tcadocker-service.yaml-template
+
+
+Blueprints used for K8S deployment through K8SPlugin
+====================================================
+k8s-policy_handler.yaml-template
+k8s-inventory.yaml-template
+k8s-deployment_handler.yaml-template
+k8s-config_binding_service.yaml-template
+
+
+Blueprints used for testing dmaap plugin
+========================================
+test_dr_mr.yaml-template
+test_dr_pubsub.yaml-template
+test_mr_multipub.yaml-template
+test_mr_multisub.yaml-template
+test_mr_pubsub_extra.yaml-template
+test_mr_pubsub.yaml-template
diff --git a/reference_templates/cdap-sdk.yaml-template b/reference_templates/cdap-sdk.yaml-template
new file mode 100644
index 0000000..cd1244f
--- /dev/null
+++ b/reference_templates/cdap-sdk.yaml-template
@@ -0,0 +1,71 @@
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+
+tosca_definitions_version: cloudify_dsl_1_3
+imports:
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml
+
+inputs:
+ dh_override:
+ type: string
+ default: "component_dockerhost"
+ dh_location_id:
+ type: string
+ default: "dcaeams"
+ cdap_cluster_name:
+ type: string
+ default: "cdap"
+node_templates:
+ docker_cdap_host:
+ properties:
+ docker_host_override:
+ get_input: dh_override
+ location_id:
+ get_input: dh_location_id
+ type: dcae.nodes.SelectedDockerHost
+ cdapdocker:
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ stop:
+ inputs:
+ cleanup_image: true
+ start:
+ inputs:
+ ports:
+ - '11011:11011'
+ envs:
+ SERVICE_11015_NAME: { get_input: cdap_cluster_name }
+ SERVICE_11011_IGNORE: 'true'
+ properties:
+ host_port: 11015
+ container_port: 11015
+ docker_config:
+ healthcheck:
+ endpoint: "/status"
+ interval: "15s"
+ timeout: "15s"
+ type: "http"
+ name: 'cdap_docker'
+ image: "caskdata/cdap-standalone:4.1.2"
+ relationships:
+ - type: dcae.relationships.component_contained_in
+ target: docker_cdap_host
+ type: dcae.nodes.DockerContainerForPlatforms
+
diff --git a/reference_templates/cdap_broker.yaml-template b/reference_templates/cdap_broker.yaml-template
new file mode 100644
index 0000000..3c29634
--- /dev/null
+++ b/reference_templates/cdap_broker.yaml-template
@@ -0,0 +1,97 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: >
+ This blueprint is for managing the CDAP infrastructure
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/cdapcloudify/14/cdapcloudify_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml
+
+inputs:
+ location_id:
+ type: string
+ default: ""
+ cdap_cluster_name:
+ type: string
+ default: "cdap"
+
+node_templates:
+
+ broker_deleter:
+ #does nothing on install, but deletes all registered apps when broker is uninstalled
+ #uninstalling the broker without doing this leaves them in purgatory forever, unless CDAP was also uninstalled, but that may or may not be true or in the same blueprint.
+ type: dcae.nodes.broker_deleter
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ delete:
+ inputs:
+ connected_broker_dns_name: { get_property: [cdap_broker, name] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: cdap_broker
+
+ cdap_broker:
+ type: dcae.nodes.DockerContainerForPlatforms
+ properties:
+ name: 'cdap_broker'
+ application_config:
+ bindingttw: 5
+ hcinterval: 60s
+ autoderegisterafter: 10m
+ pipelinehealthlimit: 2
+ host_port: 7777
+ container_port: 7777
+ docker_config:
+ healthcheck:
+ type: "http"
+ #broker has a semi healthcheck endpoint at root right now, TODO would be to add a real /healtcheck endpoint
+ endpoint: "/"
+ interval: "120s"
+ timeout: "60s"
+ image: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.platform.cdapbroker:v4.0.0"
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ CDAP_CLUSTER_TO_MANAGE: { get_input: cdap_cluster_name }
+ volumes:
+ - host:
+ path: '/tmp/log/cdapbroker/'
+ container:
+ bind: '/tmp/log/cdapbroker/' #Broker EELF log directory
+ mode: 'rw'
+ relationships:
+ - type: dcae.relationships.component_contained_in
+ target: docker_host
+
+ docker_host:
+ type: dcae.nodes.SelectedDockerHost
+ properties:
+ location_id:
+ { get_input: location_id }
+ docker_host_override:
+ 'platform_dockerhost'
+ #WARNING: ASSUMES THIS EXISTS AND IS ALREADY REGISTERED
diff --git a/reference_templates/cdapbp7.yaml-template b/reference_templates/cdapbp7.yaml-template
new file mode 100644
index 0000000..7fddaa1
--- /dev/null
+++ b/reference_templates/cdapbp7.yaml-template
@@ -0,0 +1,1054 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - http://www.getcloudify.org/spec/openstack-plugin/1.4/plugin.yaml
+ - http://www.getcloudify.org/spec/fabric-plugin/1.4.1/plugin.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/sshkeyshare/sshkey_types.yaml
+
+inputs:
+ centos7image_id:
+ type: string
+ default: ''
+ ubuntu1404image_id:
+ type: string
+ default: ''
+ ubuntu1604image_id:
+ type: string
+ flavor_id:
+ type: string
+ security_group:
+ type: string
+ public_net:
+ type: string
+ private_net:
+ type: string
+ openstack: {}
+ keypair:
+ type: string
+ location_prefix:
+ type: string
+ location_domain:
+ type: string
+ key_filename:
+ type: string
+ codesource_url:
+ type: string
+ codesource_version:
+ type: string
+
+ vm_init_cdap:
+ type: string
+ default: |
+ wget -qO- $CODE_SOURCE/${CODE_VERSION}/cloud_init/cdap-init.sh >/tmp/cdap-init.sh
+ sh /tmp/cdap-init.sh "$CODE_SOURCE" "$CODE_VERSION" "$CLUSTER_INDEX" "$CLUSTER_SIZE" "$CLUSTER_FQDNS" "$CLUSTER_LOCAL_IPS" "$CLUSTER_FLOATING_IPS" "$DATACENTER" "$REGISTERED_NAME"
+ location_id:
+ default: "solutioning-central"
+ cdap_cluster_name:
+ type: string
+ default: "cdap"
+
+node_templates:
+ key_pair:
+ type: cloudify.openstack.nodes.KeyPair
+ properties:
+ private_key_path: { get_input: key_filename }
+ use_external_resource: True
+ resource_id: { get_input: keypair }
+ openstack_config: &open_conf
+ get_input: openstack
+ private_net:
+ type: cloudify.openstack.nodes.Network
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: private_net }
+ openstack_config: *open_conf
+ security_group:
+ type: cloudify.openstack.nodes.SecurityGroup
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: security_group }
+ openstack_config: *open_conf
+
+ sharedsshkey_cdap:
+ type: ccsdk.nodes.ssh.keypair
+ hostdeps_cdap:
+ type: cloudify.nodes.Root
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: dns_cdap00
+ - type: cloudify.relationships.depends_on
+ target: fixedip_cdap00
+ - type: cloudify.relationships.depends_on
+ target: dns_cdap01
+ - type: cloudify.relationships.depends_on
+ target: fixedip_cdap01
+ - type: cloudify.relationships.depends_on
+ target: dns_cdap02
+ - type: cloudify.relationships.depends_on
+ target: fixedip_cdap02
+ - type: cloudify.relationships.depends_on
+ target: dns_cdap03
+ - type: cloudify.relationships.depends_on
+ target: fixedip_cdap03
+ - type: cloudify.relationships.depends_on
+ target: dns_cdap04
+ - type: cloudify.relationships.depends_on
+ target: fixedip_cdap04
+ - type: cloudify.relationships.depends_on
+ target: dns_cdap05
+ - type: cloudify.relationships.depends_on
+ target: fixedip_cdap05
+ - type: cloudify.relationships.depends_on
+ target: dns_cdap06
+ - type: cloudify.relationships.depends_on
+ target: fixedip_cdap06
+ fixedip_cdap00:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_cdap00:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_cdap00:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, 'cdap00.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_cdap00, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cdap00
+ host_cdap00:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, 'cdap00' ] }
+ userdata:
+ concat:
+ - |-
+ #!/bin/sh
+ mkdir /root/.sshkey
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, public ] }
+ - |-
+ ' >/root/.sshkey/id_rsa.pub
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, base64private ] }
+ - |-
+ ' | base64 -d >/root/.sshkey/id_rsa
+ chmod 700 /root/.sshkey
+ chmod 600 /root/.sshkey/*
+ set -x
+ CLUSTER_INDEX=00
+ CLUSTER_SIZE=7
+ CLUSTER_FQDNS=
+ - { get_property: [ dns_cdap00, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap01, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap02, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap03, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap04, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap05, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap06, fqdn ] }
+ - "\nCLUSTER_FLOATING_IPS="
+ - { get_attribute: [ floatingip_cdap00, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap01, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap02, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap03, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap04, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap05, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap06, floating_ip_address ] }
+ - "\nCLUSTER_LOCAL_IPS="
+ - { get_attribute: [ fixedip_cdap00, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap01, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap02, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap03, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap04, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap05, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap06, fixed_ip_address ] }
+ - "\nCODE_SOURCE="
+ - { get_input: codesource_url }
+ - "\nCODE_VERSION="
+ - { get_input: codesource_version }
+ - "\n"
+ - "DATACENTER="
+ - { get_input: location_id }
+ - "\n"
+ - { get_input: vm_init_cdap }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_cdap00
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_cdap00
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: hostdeps_cdap
+ - type: cloudify.relationships.depends_on
+ target: sharedsshkey_cdap
+ fixedip_cdap01:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_cdap01:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_cdap01:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, 'cdap01.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_cdap01, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cdap01
+ host_cdap01:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, 'cdap01' ] }
+ userdata:
+ concat:
+ - |-
+ #!/bin/sh
+ mkdir /root/.sshkey
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, public ] }
+ - |-
+ ' >/root/.sshkey/id_rsa.pub
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, base64private ] }
+ - |-
+ ' | base64 -d >/root/.sshkey/id_rsa
+ chmod 700 /root/.sshkey
+ chmod 600 /root/.sshkey/*
+ set -x
+ CLUSTER_INDEX=01
+ CLUSTER_SIZE=7
+ CLUSTER_FQDNS=
+ - { get_property: [ dns_cdap00, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap01, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap02, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap03, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap04, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap05, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap06, fqdn ] }
+ - "\nCLUSTER_FLOATING_IPS="
+ - { get_attribute: [ floatingip_cdap00, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap01, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap02, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap03, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap04, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap05, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap06, floating_ip_address ] }
+ - "\nCLUSTER_LOCAL_IPS="
+ - { get_attribute: [ fixedip_cdap00, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap01, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap02, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap03, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap04, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap05, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap06, fixed_ip_address ] }
+ - "\nCODE_SOURCE="
+ - { get_input: codesource_url }
+ - "\nCODE_VERSION="
+ - { get_input: codesource_version }
+ - "\n"
+ - "DATACENTER="
+ - { get_input: location_id }
+ - "\n"
+ - { get_input: vm_init_cdap }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_cdap01
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_cdap01
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: hostdeps_cdap
+ - type: cloudify.relationships.depends_on
+ target: sharedsshkey_cdap
+ fixedip_cdap02:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_cdap02:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_cdap02:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, 'cdap02.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_cdap02, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cdap02
+ host_cdap02:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, 'cdap02' ] }
+ userdata:
+ concat:
+ - |-
+ #!/bin/sh
+ mkdir /root/.sshkey
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, public ] }
+ - |-
+ ' >/root/.sshkey/id_rsa.pub
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, base64private ] }
+ - |-
+ ' | base64 -d >/root/.sshkey/id_rsa
+ chmod 700 /root/.sshkey
+ chmod 600 /root/.sshkey/*
+ set -x
+ CLUSTER_INDEX=02
+ CLUSTER_SIZE=7
+ CLUSTER_FQDNS=
+ - { get_property: [ dns_cdap00, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap01, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap02, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap03, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap04, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap05, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap06, fqdn ] }
+ - "\nCLUSTER_FLOATING_IPS="
+ - { get_attribute: [ floatingip_cdap00, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap01, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap02, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap03, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap04, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap05, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap06, floating_ip_address ] }
+ - "\nCLUSTER_LOCAL_IPS="
+ - { get_attribute: [ fixedip_cdap00, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap01, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap02, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap03, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap04, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap05, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap06, fixed_ip_address ] }
+ - "\nCODE_SOURCE="
+ - { get_input: codesource_url }
+ - "\nCODE_VERSION="
+ - { get_input: codesource_version }
+ - "\n"
+ - "DATACENTER="
+ - { get_input: location_id }
+ - "\n"
+ - "REGISTERED_NAME="
+ - { get_input: cdap_cluster_name }
+ - "\n"
+ - { get_input: vm_init_cdap }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_cdap02
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_cdap02
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: hostdeps_cdap
+ - type: cloudify.relationships.depends_on
+ target: sharedsshkey_cdap
+
+ fixedip_cdap03:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_cdap03:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_cdap03:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, 'cdap03.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_cdap03, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cdap03
+ host_cdap03:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, 'cdap03' ] }
+ userdata:
+ concat:
+ - |-
+ #!/bin/sh
+ mkdir /root/.sshkey
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, public ] }
+ - |-
+ ' >/root/.sshkey/id_rsa.pub
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, base64private ] }
+ - |-
+ ' | base64 -d >/root/.sshkey/id_rsa
+ chmod 700 /root/.sshkey
+ chmod 600 /root/.sshkey/*
+ set -x
+ CLUSTER_INDEX=03
+ CLUSTER_SIZE=7
+ CLUSTER_FQDNS=
+ - { get_property: [ dns_cdap00, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap01, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap02, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap03, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap04, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap05, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap06, fqdn ] }
+ - "\nCLUSTER_FLOATING_IPS="
+ - { get_attribute: [ floatingip_cdap00, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap01, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap02, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap03, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap04, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap05, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap06, floating_ip_address ] }
+ - "\nCLUSTER_LOCAL_IPS="
+ - { get_attribute: [ fixedip_cdap00, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap01, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap02, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap03, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap04, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap05, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap06, fixed_ip_address ] }
+ - "\nCODE_SOURCE="
+ - { get_input: codesource_url }
+ - "\nCODE_VERSION="
+ - { get_input: codesource_version }
+ - "\n"
+ - "DATACENTER="
+ - { get_input: location_id }
+ - "\n"
+ - { get_input: vm_init_cdap }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_cdap03
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_cdap03
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: hostdeps_cdap
+ - type: cloudify.relationships.depends_on
+ target: sharedsshkey_cdap
+ fixedip_cdap04:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_cdap04:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_cdap04:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, 'cdap04.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_cdap04, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cdap04
+ host_cdap04:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, 'cdap04' ] }
+ userdata:
+ concat:
+ - |-
+ #!/bin/sh
+ mkdir /root/.sshkey
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, public ] }
+ - |-
+ ' >/root/.sshkey/id_rsa.pub
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, base64private ] }
+ - |-
+ ' | base64 -d >/root/.sshkey/id_rsa
+ chmod 700 /root/.sshkey
+ chmod 600 /root/.sshkey/*
+ set -x
+ CLUSTER_INDEX=04
+ CLUSTER_SIZE=7
+ CLUSTER_FQDNS=
+ - { get_property: [ dns_cdap00, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap01, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap02, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap03, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap04, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap05, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap06, fqdn ] }
+ - "\nCLUSTER_FLOATING_IPS="
+ - { get_attribute: [ floatingip_cdap00, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap01, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap02, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap03, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap04, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap05, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap06, floating_ip_address ] }
+ - "\nCLUSTER_LOCAL_IPS="
+ - { get_attribute: [ fixedip_cdap00, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap01, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap02, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap03, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap04, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap05, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap06, fixed_ip_address ] }
+ - "\nCODE_SOURCE="
+ - { get_input: codesource_url }
+ - "\nCODE_VERSION="
+ - { get_input: codesource_version }
+ - "\n"
+ - "DATACENTER="
+ - { get_input: location_id }
+ - "\n"
+ - { get_input: vm_init_cdap }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_cdap04
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_cdap04
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: hostdeps_cdap
+ - type: cloudify.relationships.depends_on
+ target: sharedsshkey_cdap
+ fixedip_cdap05:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_cdap05:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_cdap05:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, 'cdap05.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_cdap05, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cdap05
+ host_cdap05:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, 'cdap05' ] }
+ userdata:
+ concat:
+ - |-
+ #!/bin/sh
+ mkdir /root/.sshkey
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, public ] }
+ - |-
+ ' >/root/.sshkey/id_rsa.pub
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, base64private ] }
+ - |-
+ ' | base64 -d >/root/.sshkey/id_rsa
+ chmod 700 /root/.sshkey
+ chmod 600 /root/.sshkey/*
+ set -x
+ CLUSTER_INDEX=05
+ CLUSTER_SIZE=7
+ CLUSTER_FQDNS=
+ - { get_property: [ dns_cdap00, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap01, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap02, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap03, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap04, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap05, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap06, fqdn ] }
+ - "\nCLUSTER_FLOATING_IPS="
+ - { get_attribute: [ floatingip_cdap00, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap01, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap02, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap03, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap04, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap05, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap06, floating_ip_address ] }
+ - "\nCLUSTER_LOCAL_IPS="
+ - { get_attribute: [ fixedip_cdap00, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap01, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap02, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap03, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap04, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap05, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap06, fixed_ip_address ] }
+ - "\nCODE_SOURCE="
+ - { get_input: codesource_url }
+ - "\nCODE_VERSION="
+ - { get_input: codesource_version }
+ - "\n"
+ - "DATACENTER="
+ - { get_input: location_id }
+ - "\n"
+ - { get_input: vm_init_cdap }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_cdap05
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_cdap05
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: hostdeps_cdap
+ - type: cloudify.relationships.depends_on
+ target: sharedsshkey_cdap
+ fixedip_cdap06:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_cdap06:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_cdap06:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, 'cdap06.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_cdap06, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cdap06
+ host_cdap06:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, 'cdap06' ] }
+ userdata:
+ concat:
+ - |-
+ #!/bin/sh
+ mkdir /root/.sshkey
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, public ] }
+ - |-
+ ' >/root/.sshkey/id_rsa.pub
+ echo '
+ - { get_attribute: [ sharedsshkey_cdap, base64private ] }
+ - |-
+ ' | base64 -d >/root/.sshkey/id_rsa
+ chmod 700 /root/.sshkey
+ chmod 600 /root/.sshkey/*
+ set -x
+ CLUSTER_INDEX=06
+ CLUSTER_SIZE=7
+ CLUSTER_FQDNS=
+ - { get_property: [ dns_cdap00, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap01, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap02, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap03, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap04, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap05, fqdn ] }
+ - ','
+ - { get_property: [ dns_cdap06, fqdn ] }
+ - "\nCLUSTER_FLOATING_IPS="
+ - { get_attribute: [ floatingip_cdap00, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap01, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap02, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap03, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap04, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap05, floating_ip_address ] }
+ - ','
+ - { get_attribute: [ floatingip_cdap06, floating_ip_address ] }
+ - "\nCLUSTER_LOCAL_IPS="
+ - { get_attribute: [ fixedip_cdap00, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap01, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap02, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap03, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap04, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap05, fixed_ip_address ] }
+ - ','
+ - { get_attribute: [ fixedip_cdap06, fixed_ip_address ] }
+ - "\nCODE_SOURCE="
+ - { get_input: codesource_url }
+ - "\nCODE_VERSION="
+ - { get_input: codesource_version }
+ - "\n"
+ - "DATACENTER="
+ - { get_input: location_id }
+ - "\n"
+ - { get_input: vm_init_cdap }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_cdap06
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_cdap06
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: hostdeps_cdap
+ - type: cloudify.relationships.depends_on
+ target: sharedsshkey_cdap
diff --git a/reference_templates/centos_vm.yaml-template b/reference_templates/centos_vm.yaml-template
new file mode 100644
index 0000000..aa3bdb4
--- /dev/null
+++ b/reference_templates/centos_vm.yaml-template
@@ -0,0 +1,243 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START==========================================
+# org.onap.dcae
+# ===================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ===================================================================
+# 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.
+# ============LICENSE_END============================================
+#
+# ECOMP and OpenECOMP are trademarks
+# and service marks of AT&T Intellectual Property.
+#
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - http://www.getcloudify.org/spec/openstack-plugin/1.4/plugin.yaml
+ - http://www.getcloudify.org/spec/fabric-plugin/1.4.1/plugin.yaml
+ - types/dns_types.yaml
+ - types/sshkey_types.yaml
+
+inputs:
+ centos7image_id:
+ type: string
+ ubuntu1604image_id:
+ type: string
+ flavor_id:
+ type: string
+ security_group:
+ type: string
+ public_net:
+ type: string
+ private_net:
+ type: string
+ openstack: {}
+ keypair:
+ type: string
+ location_prefix:
+ type: string
+ location_domain:
+ type: string
+ key_filename:
+ type: string
+ codesource_url:
+ type: string
+ codesource_version:
+ type: string
+ cname:
+ type: string
+ default: dcae-orcl
+ datacenter:
+ type: string
+ vm_init_clmg_00:
+ type: string
+ default: |-
+ #!/bin/sh
+ set -x
+ DATACENTER=
+ vm_init_clmg_01:
+ type: string
+ default: |
+ CONSULVER=0.8.3
+ CONSULNAME=consul_${CONSULVER}_linux_amd64
+ MYIP=`curl -Ss http://169.254.169.254/2009-04-04/meta-data/local-ipv4`
+ MYNAME=`hostname`
+ if [ ! -z "$(echo $MYNAME |grep '.')" ]; then MYNAME="$(echo $MYNAME | cut -f1 -d '.')"; fi
+ echo >>/etc/hosts
+ echo $MYIP $MYNAME >>/etc/hosts
+ mkdir -p /opt/consul/config /opt/consul/data /opt/consul/bin
+ yum install -y unzip
+ # Download Consul
+ curl -Ss https://releases.hashicorp.com/consul/${CONSULVER}/${CONSULNAME}.zip > ${CONSULNAME}.zip
+ unzip -d /opt/consul/bin ${CONSULNAME}.zip
+ rm ${CONSULNAME}.zip
+ chmod +x /opt/consul/bin/consul
+ cat <<EOF > /opt/consul/config/consul.json
+ {
+ "bind_addr" : "0.0.0.0",
+ "client_addr" : "0.0.0.0",
+ "data_dir" : "/opt/consul/data",
+ "datacenter": "$DATACENTER",
+ "rejoin_after_leave": true,
+ "http_api_response_headers": {
+ "Access-Control-Allow-Origin" : "*"
+ },
+ "server": false,
+ "ui": false,
+ "enable_syslog": true,
+ "log_level": "info"
+ }
+ EOF
+ cat <<EOF > /lib/systemd/system/consul.service
+ [Unit]
+ Description=Consul
+ Requires=network-online.target
+ After=network.target
+ [Service]
+ Type=simple
+ ExecStart=/opt/consul/bin/consul agent -config-dir=/opt/consul/config
+ ExecReload=/bin/kill -HUP \$MAINPID
+ [Install]
+ WantedBy=multi-user.target
+ EOF
+ systemctl enable consul
+ systemctl start consul
+ yum install -y python-psycopg2
+
+node_templates:
+ key_pair:
+ type: cloudify.openstack.nodes.KeyPair
+ properties:
+ private_key_path: { get_input: key_filename }
+ use_external_resource: True
+ resource_id: { get_input: keypair }
+ openstack_config: &open_conf
+ get_input: openstack
+ private_net:
+ type: cloudify.openstack.nodes.Network
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: private_net }
+ openstack_config: *open_conf
+ security_group:
+ type: cloudify.openstack.nodes.SecurityGroup
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: security_group }
+ openstack_config: *open_conf
+ fixedip_vm00:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_vm00:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_vm00:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, 'orcl00.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_vm00, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_vm00
+ dns_cm:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ 'cloudify-manager-', { get_input: datacenter}, '.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_vm00, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_vm00
+ dns_cname:
+ type: ccsdk.nodes.dns.cnamerecord
+ properties:
+ fqdn: { concat: [ { get_input: cname }, '.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ cname: { get_property: [ dns_vm00, fqdn ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: dns_vm00
+ host_vm00:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: centos7image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, 'orcl00' ] }
+ userdata:
+ concat:
+ - { get_input: vm_init_clmg_00 }
+ - { get_input: datacenter }
+ - |+
+
+ - { get_input: vm_init_clmg_01 }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_vm00
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_vm00
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: dns_vm00
+ - type: cloudify.relationships.depends_on
+ target: dns_cm
+
+outputs:
+ public_ip:
+ value: { get_attribute: [floatingip_vm00, floating_ip_address] }
diff --git a/reference_templates/config_binding_service.yaml-template b/reference_templates/config_binding_service.yaml-template
new file mode 100644
index 0000000..28dfb43
--- /dev/null
+++ b/reference_templates/config_binding_service.yaml-template
@@ -0,0 +1,62 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# =============================================================================
+# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: >
+ This blueprint installs the config binding service
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml
+inputs:
+ location_id:
+ type: string
+ default: ""
+
+ docker_host_override:
+ description: Target docker host to deploy applications to
+ default: 'platform_dockerhost'
+
+node_templates:
+ # Config binding service
+ service-config-binding:
+ type: dcae.nodes.DockerContainerForPlatforms
+ properties:
+ name: 'config_binding_service'
+ host_port: 10000
+ container_port: 10000
+ image: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.platform.configbinding:2.1.5"
+ docker_config:
+ healthcheck:
+ type: "http"
+ endpoint: "/healthcheck"
+
+ relationships:
+ - type: dcae.relationships.component_contained_in
+ target: docker_host
+
+ docker_host:
+ type: dcae.nodes.SelectedDockerHost
+ properties:
+ location_id:
+ { get_input: location_id }
+ docker_host_override:
+ { get_input: docker_host_override }
diff --git a/reference_templates/consul_cluster.yaml-template b/reference_templates/consul_cluster.yaml-template
new file mode 100644
index 0000000..a4ae89e
--- /dev/null
+++ b/reference_templates/consul_cluster.yaml-template
@@ -0,0 +1,384 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START==========================================
+# org.onap.dcae
+# ===================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ===================================================================
+# 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.
+# ============LICENSE_END============================================
+#
+# ECOMP and OpenECOMP are trademarks
+# and service marks of AT&T Intellectual Property.
+#
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - http://www.getcloudify.org/spec/openstack-plugin/1.4/plugin.yaml
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/sshkeyshare/sshkey_types.yaml"
+
+inputs:
+ centos7image_id:
+ type: string
+ ubuntu1604image_id:
+ type: string
+ flavor_id:
+ type: string
+ security_group:
+ type: string
+ public_net:
+ type: string
+ private_net:
+ type: string
+ openstack: {}
+ keypair:
+ type: string
+ location_prefix:
+ type: string
+ location_domain:
+ type: string
+ key_filename:
+ type: string
+ codesource_url:
+ type: string
+ codesource_version:
+ type: string
+ datacenter:
+ type: string
+ vm_init_cnsl_00:
+ type: string
+ default: |-
+ #!/bin/sh
+ set -x
+ DATACENTER=
+ vm_init_cnsl_01:
+ type: string
+ default: |
+ CONSULVER=0.8.3
+ CONSULNAME=consul_${CONSULVER}_linux_amd64
+ MYIP=`wget -qO- http://169.254.169.254/2009-04-04/meta-data/local-ipv4`
+ MYNAME=`hostname`
+ echo >>/etc/hosts
+ echo $MYIP $MYNAME >>/etc/hosts
+ mkdir -p /opt/consul/config /opt/consul/data /opt/consul/bin
+
+ # Download Consul
+ apt-get update
+ apt-get install unzip
+ wget https://releases.hashicorp.com/consul/${CONSULVER}/${CONSULNAME}.zip
+ unzip -d /opt/consul/bin ${CONSULNAME}.zip
+ rm ${CONSULNAME}.zip
+ chmod +x /opt/consul/bin/consul
+
+ # NOTE: Not using port 80 for http to avoid port collision of user facing services
+ # particularly for more large scale deployments of Consul.
+ cat <<EOF > /opt/consul/config/consul.json
+ {
+ "bind_addr" : "$MYIP",
+ "client_addr" : "0.0.0.0",
+ "bootstrap_expect" : 3,
+ "data_dir" : "/opt/consul/data",
+ "datacenter": "$DATACENTER",
+ "http_api_response_headers": {
+ "Access-Control-Allow-Origin" : "*"
+ },
+ "server": true,
+ "ui": true,
+ "enable_syslog": true,
+ "log_level": "info",
+ "ports": {
+ "dns": 53
+ }
+ }
+ EOF
+ cat <<EOF > /lib/systemd/system/consul.service
+ [Unit]
+ Description=Consul
+ Requires=network-online.target
+ After=network.target
+ [Service]
+ Type=simple
+ ExecStart=/opt/consul/bin/consul agent -config-dir=/opt/consul/config
+ ExecReload=/bin/kill -HUP \$MAINPID
+ [Install]
+ WantedBy=multi-user.target
+ EOF
+ systemctl enable consul
+ systemctl start consul
+node_templates:
+ key_pair:
+ type: cloudify.openstack.nodes.KeyPair
+ properties:
+ private_key_path: { get_input: key_filename }
+ use_external_resource: True
+ resource_id: { get_input: keypair }
+ openstack_config: &open_conf
+ get_input: openstack
+ private_net:
+ type: cloudify.openstack.nodes.Network
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: private_net }
+ openstack_config: *open_conf
+ security_group:
+ type: cloudify.openstack.nodes.SecurityGroup
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: security_group }
+ openstack_config: *open_conf
+ fixedip_cnsl00:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_cnsl00:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_cnsl00:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, 'cnsl00.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_cnsl00, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cnsl00
+ host_cnsl00:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, 'cnsl00' ] }
+ userdata:
+ concat:
+ - { get_input: vm_init_cnsl_00 }
+ - { get_input: datacenter }
+ - |+
+
+ - { get_input: vm_init_cnsl_01 }
+ - concat:
+ - 'until /opt/consul/bin/consul join '
+ - { get_attribute: [host_cnsl01, ip] }
+ - '; do sleep 5; done; '
+ - concat:
+ - 'until /opt/consul/bin/consul join '
+ - { get_attribute: [host_cnsl02, ip]}
+ - '; do sleep 5; done'
+
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_cnsl00
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_cnsl00
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: dns_cnsl00
+ - type: cloudify.relationships.depends_on
+ target: host_cnsl01
+ - type: cloudify.relationships.depends_on
+ target: host_cnsl02
+ fixedip_cnsl01:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_cnsl01:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_cnsl01:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, 'cnsl01.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_cnsl01, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cnsl01
+ host_cnsl01:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, 'cnsl01' ] }
+ userdata:
+ concat:
+ - { get_input: vm_init_cnsl_00 }
+ - { get_input: datacenter }
+ - |+
+
+ - { get_input: vm_init_cnsl_01 }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_cnsl01
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_cnsl01
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: dns_cnsl01
+ fixedip_cnsl02:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_cnsl02:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_cnsl02:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, 'cnsl02.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_cnsl02, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cnsl02
+ dns_cluster:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ 'dcae-cnsl.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_cnsl00, floating_ip_address ] }
+ - { get_attribute: [ floatingip_cnsl01, floating_ip_address ] }
+ - { get_attribute: [ floatingip_cnsl02, floating_ip_address ] }
+
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cnsl00
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cnsl01
+ - type: cloudify.relationships.depends_on
+ target: floatingip_cnsl02
+ host_cnsl02:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, 'cnsl02' ] }
+ userdata:
+ concat:
+ - { get_input: vm_init_cnsl_00 }
+ - { get_input: datacenter }
+ - |+
+
+ - { get_input: vm_init_cnsl_01 }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_cnsl02
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_cnsl02
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: dns_cnsl02
+
+outputs:
+ public_ip:
+ value: { get_attribute: [floatingip_cnsl00, floating_ip_address] }
diff --git a/reference_templates/heartbeat-service.yaml-template b/reference_templates/heartbeat-service.yaml-template
new file mode 100644
index 0000000..2654c71
--- /dev/null
+++ b/reference_templates/heartbeat-service.yaml-template
@@ -0,0 +1,61 @@
+tosca_definitions_version: cloudify_dsl_1_3
+imports:
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml"
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
+inputs:
+ dcae_CL_publish_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.DCAE_CL_OUTPUT"
+ ves_heartbeat_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT"
+ docker_host_override:
+ type: string
+ default: "component_dockerhost"
+ dh_location_id:
+ type: string
+ default: "zone1"
+ tag_version:
+ type: string
+ default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.heartbeat:2.0"
+
+node_templates:
+ docker_service_host:
+ type: dcae.nodes.SelectedDockerHost
+ properties:
+ docker_host_override:
+ get_input: docker_host_override
+ location_id:
+ get_input: dh_location_id
+ heartbeatService:
+ type: dcae.nodes.DockerContainerForComponentsUsingDmaap
+ properties:
+ application_config:
+ heartbeat_config: '{"vnfs":[{"heartbeatcountmissed":3, "heartbeatinterval": 60, "closedLoopControlName":"ControlLoopEvent1"},{"heartbeatcountmissed":3, "heartbeatinterval": 60, "closedLoopControlName":"ControlLoopEvent1"},{"heartbeatcountmissed":3, "heartbeatinterval": 60, "closedLoopControlName":"ControlLoopEvent1"}]}'
+ streams_publishes:
+ dcae_cl_out:
+ dmaap_info:
+ topic_url:
+ get_input: dcae_CL_publish_url
+ type: message_router
+ streams_subscribes:
+ heartbeat_input:
+ dmaap_info:
+ topic_url:
+ get_input: ves_heartbeat_url
+ type: message_router
+ docker_config:
+ healthcheck:
+ script: /app/bin/check_health.py
+ interval: 18s
+ timeout: 30s
+ type: docker
+ image:
+ get_input: tag_version
+ location_id:
+ get_input: dh_location_id
+ service_component_type: dcaegen2-services-heartbeat
+ relationships:
+ - target: docker_service_host
+ type: dcae.relationships.component_contained_in
+
diff --git a/reference_templates/holmes-engine.yaml-template b/reference_templates/holmes-engine.yaml-template
new file mode 100644
index 0000000..4661299
--- /dev/null
+++ b/reference_templates/holmes-engine.yaml-template
@@ -0,0 +1,98 @@
+tosca_definitions_version: cloudify_dsl_1_3
+imports:
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml"
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dcaepolicyplugin/1/dcaepolicyplugin_types.yaml"
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
+inputs:
+ dcae_CL_publish_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.DCAE_CL_OUTPUT"
+ ves_fault_publish_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.SEC_FAULT_OUTPUT"
+ docker_host_override:
+ type: string
+ default: "component_dockerhost"
+ dh_location_id:
+ type: string
+ default: "zone1"
+ msb_hostname:
+ type: string
+ default: ""
+ location_domain:
+ type: string
+ location_prefix:
+ type: string
+ pgaas_cluster_name:
+ type: string
+ # use the single-VM PG instance
+ default: pgvm
+ database_name:
+ type: string
+ default: holmes
+node_templates:
+ pgaasvm:
+ type: dcae.nodes.pgaas.database
+ properties:
+ writerfqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '-write.', { get_input: location_domain } ] }
+ name: { get_input: database_name }
+ use_existing: true
+ docker_holmes_host:
+ type: dcae.nodes.SelectedDockerHost
+ properties:
+ docker_host_override:
+ get_input: docker_host_override
+ location_id:
+ get_input: dh_location_id
+ holmesengine:
+ type: dcae.nodes.DockerContainerForComponentsUsingDmaap
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ URL_JDBC:
+ { get_attribute: [ pgaasvm, admin, host ] }
+ JDBC_PASSWORD:
+ { get_attribute: [ pgaasvm, admin, password ] }
+ JDBC_USERNAME:
+ { get_attribute: [ pgaasvm, admin, user ] }
+ MSB_ADDR:
+ get_input: msb_hostname
+ properties:
+ application_config:
+ msb.hostname:
+ get_input: msb_hostname
+ msb.uri: /api/microservices/v1/services
+ services_calls: {}
+ streams_publishes:
+ dcae_cl_out:
+ dmaap_info:
+ topic_url:
+ get_input: dcae_CL_publish_url
+ type: message_router
+ streams_subscribes:
+ ves_fault:
+ dmaap_info:
+ topic_url:
+ get_input: ves_fault_publish_url
+ type: message_router
+ docker_config:
+ healthcheck:
+ endpoint: /api/holmes-engine-mgmt/v1/healthcheck
+ interval: 15s
+ timeout: 1s
+ type: http
+ ports:
+ - 9102:9102
+ image: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/holmes/engine-management:v1.0.0"
+ location_id:
+ get_input: dh_location_id
+ service_component_type: dcae-analytics-holmes-engine-management
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: pgaasvm
+ - target: docker_holmes_host
+ type: dcae.relationships.component_contained_in
+
diff --git a/reference_templates/holmes-rules.yaml-template b/reference_templates/holmes-rules.yaml-template
new file mode 100644
index 0000000..dc0ab7d
--- /dev/null
+++ b/reference_templates/holmes-rules.yaml-template
@@ -0,0 +1,81 @@
+tosca_definitions_version: cloudify_dsl_1_3
+imports:
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml"
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dcaepolicyplugin/1/dcaepolicyplugin_types.yaml"
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
+inputs:
+ docker_host_override:
+ type: string
+ default: "component_dockerhost"
+ dh_location_id:
+ type: string
+ default: "zone1"
+ msb_hostname:
+ type: string
+ default: ""
+ location_domain:
+ type: string
+ location_prefix:
+ type: string
+ pgaas_cluster_name:
+ type: string
+ # use the single-VM PG instance
+ default: pgvm
+ database_name:
+ type: string
+ default: holmes
+node_templates:
+ pgaasvm:
+ type: dcae.nodes.pgaas.database
+ properties:
+ writerfqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '-write.', { get_input: location_domain } ] }
+ name: { get_input: database_name }
+ docker_holmes_host:
+ type: dcae.nodes.SelectedDockerHost
+ properties:
+ docker_host_override:
+ get_input: docker_host_override
+ location_id:
+ get_input: dh_location_id
+ holmesrules:
+ type: dcae.nodes.DockerContainerForComponentsUsingDmaap
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ URL_JDBC:
+ { get_attribute: [ pgaasvm, admin, host ] }
+ JDBC_PASSWORD:
+ { get_attribute: [ pgaasvm, admin, password ] }
+ JDBC_USERNAME:
+ { get_attribute: [ pgaasvm, admin, user ] }
+ MSB_ADDR:
+ get_input: msb_hostname
+ properties:
+ application_config:
+ holmes.default.rule.volte.scenario1: "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b$$$package org.onap.holmes.droolsRule;\n\nimport org.onap.holmes.common.dmaap.DmaapService;\nimport org.onap.holmes.common.api.stat.VesAlarm;\nimport org.onap.holmes.common.aai.CorrelationUtil;\nimport org.onap.holmes.common.dmaap.entity.PolicyMsg;\nimport org.onap.holmes.common.dropwizard.ioc.utils.ServiceLocatorHolder;\nimport org.onap.holmes.common.utils.DroolsLog;\n \n\nrule \"Relation_analysis_Rule\"\nsalience 200\nno-loop true\n when\n $root : VesAlarm(alarmIsCleared == 0,\n $sourceId: sourceId, sourceId != null && !sourceId.equals(\"\"),\n\t\t\t$sourceName: sourceName, sourceName != null && !sourceName.equals(\"\"),\n\t\t\t$startEpochMicrosec: startEpochMicrosec,\n eventName in (\"Fault_MultiCloud_VMFailure\"),\n $eventId: eventId)\n $child : VesAlarm( eventId != $eventId, parentId == null,\n CorrelationUtil.getInstance().isTopologicallyRelated(sourceId, $sourceId, $sourceName),\n eventName in (\"Fault_MME_eNodeB out of service alarm\"),\n startEpochMicrosec < $startEpochMicrosec + 60000 && startEpochMicrosec > $startEpochMicrosec - 60000 )\n then\n\t\tDroolsLog.printInfo(\"===========================================================\");\n\t\tDroolsLog.printInfo(\"Relation_analysis_Rule: rootId=\" + $root.getEventId() + \", childId=\" + $child.getEventId());\n\t\t$child.setParentId($root.getEventId());\n\t\tupdate($child);\n\t\t\nend\n\nrule \"root_has_child_handle_Rule\"\nsalience 150\nno-loop true\n\twhen\n\t\t$root : VesAlarm(alarmIsCleared == 0, rootFlag == 0, $eventId: eventId)\n\t\t$child : VesAlarm(eventId != $eventId, parentId == $eventId)\n\tthen\n\t\tDroolsLog.printInfo(\"===========================================================\");\n\t\tDroolsLog.printInfo(\"root_has_child_handle_Rule: rootId=\" + $root.getEventId() + \", childId=\" + $child.getEventId());\n\t\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\n\t\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, $child, \"org.onap.holmes.droolsRule\");\n dmaapService.publishPolicyMsg(policyMsg, \"unauthenticated.DCAE_CL_OUTPUT\");\n\t\t$root.setRootFlag(1);\n\t\tupdate($root);\nend\n\nrule \"root_no_child_handle_Rule\"\nsalience 100\nno-loop true\n when\n $root : VesAlarm(alarmIsCleared == 0, rootFlag == 0,\n sourceId != null && !sourceId.equals(\"\"),\n\t\t\tsourceName != null && !sourceName.equals(\"\"),\n eventName in (\"Fault_MultiCloud_VMFailure\"))\n then\n\t\tDroolsLog.printInfo(\"===========================================================\");\n\t\tDroolsLog.printInfo(\"root_no_child_handle_Rule: rootId=\" + $root.getEventId());\n\t\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\n\t\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, null, \"org.onap.holmes.droolsRule\");\n dmaapService.publishPolicyMsg(policyMsg, \"unauthenticated.DCAE_CL_OUTPUT\");\n\t\t$root.setRootFlag(1);\n\t\tupdate($root);\nend\n\nrule \"root_cleared_handle_Rule\"\nsalience 100\nno-loop true\n when\n $root : VesAlarm(alarmIsCleared == 1, rootFlag == 1)\n then\n\t\tDroolsLog.printInfo(\"===========================================================\");\n\t\tDroolsLog.printInfo(\"root_cleared_handle_Rule: rootId=\" + $root.getEventId());\n\t\tDmaapService dmaapService = ServiceLocatorHolder.getLocator().getService(DmaapService.class);\n\t\tPolicyMsg policyMsg = dmaapService.getPolicyMsg($root, null, \"org.onap.holmes.droolsRule\");\n dmaapService.publishPolicyMsg(policyMsg, \"unauthenticated.DCAE_CL_OUTPUT\");\n\t\tretract($root);\nend\n\nrule \"child_handle_Rule\"\nsalience 100\nno-loop true\n when\n $child : VesAlarm(alarmIsCleared == 1, rootFlag == 0)\n then\n\t\tDroolsLog.printInfo(\"===========================================================\");\n\t\tDroolsLog.printInfo(\"child_handle_Rule: childId=\" + $child.getEventId());\n\t\tretract($child);\nend"
+ msb.hostname:
+ get_input: msb_hostname
+ msb.uri: /api/microservices/v1/services
+ services_calls: {}
+ streams_publishes: {}
+ streams_subscribes: {}
+ docker_config:
+ healthcheck:
+ endpoint: /api/holmes-rule-mgmt/v1/healthcheck
+ interval: 15s
+ timeout: 1s
+ type: http
+ ports:
+ - 9101:9101
+ image: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/holmes/rule-management:v1.0.0"
+ location_id:
+ get_input: dh_location_id
+ service_component_type: dcae-analytics-holmes-rule-management
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: pgaasvm
+ - target: docker_holmes_host
+ type: dcae.relationships.component_contained_in
diff --git a/reference_templates/inventory.yaml-template b/reference_templates/inventory.yaml-template
new file mode 100644
index 0000000..c427f8c
--- /dev/null
+++ b/reference_templates/inventory.yaml-template
@@ -0,0 +1,196 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: >
+ This blueprint is used to install and to uninstall DCAE inventory and DCAE service change
+ handler which are platform services. These applications are Docker containers. This blueprint
+ depends upon the deployment of a Docker host and the deployment of a central postgres that is
+ registered with Consul.
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml
+
+inputs:
+
+ location_id:
+ description: Location of where to deploy to
+
+ docker_host_override:
+ description: Target docker host to deploy applications to
+ sdc_address:
+ description: SDC host
+ sdc_uri:
+ description: SDC url
+ sdc_msg_bus_address:
+ description: Message router hostname that SDC will send distribution events through
+ sdc_user:
+ description: SDC username
+ sdc_password:
+ description: SDC password
+ sdc_environment_name:
+ description: SDC environment name
+ sdc_use_secure_https:
+ description: Boolean to toggle whether to do certificate validation for https calls to SDC API
+ type: boolean
+ default: false
+ sdc_use_https_dmaap:
+ description: Boolean to toggle whether to use https for calls to message router API
+ type: boolean
+ default: false
+
+ postgres_user_inventory:
+ description: Postgres user for inventory
+ postgres_password_inventory:
+ description: Postgres password for inventory
+
+ service_change_handler_image:
+ description: Full uri to service change handler Docker image
+ inventory_image:
+ description: Full uri to inventory Docker image
+
+node_templates:
+
+ service-change-handler:
+ type: dcae.nodes.DockerContainerForPlatforms
+ properties:
+ name:
+ "service-change-handler"
+ application_config:
+ asdcDistributionClient:
+ asdcAddress: { get_input: sdc_address }
+ asdcUri: { get_input: sdc_uri }
+ msgBusAddress: { get_input: sdc_msg_bus_address }
+ user: { get_input: sdc_user }
+ password: { get_input: sdc_password }
+ pollingInterval: 20
+ pollingTimeout: 20
+ consumerGroup: dcae
+ consumerId: dcae-sch
+ environmentName: { get_input: sdc_environment_name }
+ keyStorePath:
+ keyStorePassword:
+ activateServerTLSAuth: { get_input: sdc_use_secure_https }
+ useHttpsWithDmaap: { get_input: sdc_use_https_dmaap }
+ isFilterInEmptyResources: false
+ dcaeInventoryClient:
+ uri: http://inventory:8080
+ docker_config:
+ healthcheck:
+ type: "docker"
+ interval: "30s"
+ timeout: "3s"
+ script: "/opt/health.sh"
+ image:
+ { get_input: service_change_handler_image }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: inventory
+ - type: dcae.relationships.component_contained_in
+ target: docker_host
+
+ inventory:
+ type: dcae.nodes.DockerContainerForPlatforms
+ properties:
+ name:
+ "inventory"
+ application_config:
+ database:
+ driverClass: org.postgresql.Driver
+ user: { get_input: postgres_user_inventory }
+ password: { get_input: postgres_password_inventory }
+ # NOTE: The database name here has been changed to the default "postgres" database
+ # to use the private postgres instance and not the central postgres database.
+ url: jdbc:postgresql://pstg-write:5432/postgres
+ properties:
+ charSet: UTF-8
+ maxWaitForConnection: 1s
+ validationQuery: "/* MyService Health Check */ SELECT 1"
+ minSize: 2
+ maxSize: 8
+ initialSize: 2
+ checkConnectionWhileIdle: false
+ evictionInterval: 10s
+ minIdleTime: 1 minute
+ databusControllerConnection:
+ host: databus-controller-hostname
+ port: 8443
+ mechId:
+ password:
+ required: false
+ httpClient:
+ minThreads: 1
+ maxThreads: 128
+ gzipEnabled: false
+ gzipEnabledForRequests: false
+ timeout: 5000milliseconds
+ connectionTimeout: 5000milliseconds
+ docker_config:
+ healthcheck:
+ type: "http"
+ interval: "30s"
+ timeout: "3s"
+ endpoint: "/dcae-service-types"
+ image:
+ { get_input: inventory_image }
+ host_port:
+ 8080
+ container_port:
+ 8080
+ relationships:
+ - type: dcae.relationships.component_contained_in
+ target: docker_host
+ - type: cloudify.relationships.depends_on
+ target: postgres
+
+ postgres:
+ type: dcae.nodes.DockerContainer
+ properties:
+ name:
+ "pstg-write"
+ image:
+ "postgres:9.5.2"
+ relationships:
+ - type: dcae.relationships.component_contained_in
+ target: docker_host
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ PGDATA:
+ "/var/lib/postgresql/data/pgdata"
+ POSTGRES_PASSWORD:
+ { get_input: postgres_password_inventory }
+ SERVICE_NAME:
+ "pstg-write"
+ ports:
+ - "5432:5432"
+
+ docker_host:
+ type: dcae.nodes.SelectedDockerHost
+ properties:
+ location_id:
+ { get_input: location_id }
+ docker_host_override:
+ { get_input: docker_host_override }
diff --git a/reference_templates/k8s-dashboard.yaml-template b/reference_templates/k8s-dashboard.yaml-template
new file mode 100644
index 0000000..1d0fa10
--- /dev/null
+++ b/reference_templates/k8s-dashboard.yaml-template
@@ -0,0 +1,119 @@
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.13/k8splugin_types.yaml"
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
+
+inputs:
+ database_cluster_name:
+ type: string
+ default: 'dcae-pg-primary.onap'
+ database_cluster_fqdn:
+ type: string
+ default: 'dcae-pg-primary.onap.svc.cluster.local'
+ database_name:
+ type: string
+ default: 'dashboard_pg'
+ postgres_port:
+ description: 'Postgres port for dashboard'
+ default: '5432'
+ dashboard_docker_image:
+ description: 'Docker image for dashboard'
+ default: 'nexus3.onap.org:10001/onap/org.onap.ccsdk.dashboard.ccsdk-app-os:1.1.0-SNAPSHOT-latest'
+ cloudify_ip:
+ type: string
+ default: 'dcae-cloudify-manager'
+ cloudify_user:
+ type: string
+ default: 'admin'
+ cloudify_password:
+ type: string
+ default: 'admin'
+ consul_url:
+ type: string
+ default: 'consul-server-ui'
+ external_port:
+ type: string
+ description: Kubernetes node port for standard http
+ default: "30418"
+ external_tls_port:
+ type: string
+ description: Kubernetes node port for standard https
+ default: "30419"
+ replicas:
+ type: integer
+ description: number of instances
+ default: 1
+node_templates:
+ pgaasdb:
+ type: dcae.nodes.pgaas.database
+ properties:
+ writerfqdn: { get_input: database_cluster_name }
+ name: { get_input: database_name }
+ dashboard_deployment:
+ type: dcae.nodes.ContainerizedPlatformComponent
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ postgres_ip:
+ { get_input: database_cluster_fqdn }
+ postgres_db_name:
+ { get_input: database_name }
+ postgres_password_dashboard:
+ { get_attribute: [ pgaasdb, admin, password ] }
+ postgres_user_dashboard:
+ { get_attribute: [ pgaasdb, admin, user ] }
+ postgres_port: { get_input: postgres_port }
+ cloudify_user: { get_input: cloudify_user }
+ cloudify_password: { get_input: cloudify_password }
+ #consul_url: http://consul-server.onap.svc.cluster.local
+ consul_url:
+ concat: ["http://", { get_input: consul_url },":8500"]
+ #cfy_url: http://dcae-cloudify-manager:8080
+ cfy_url:
+ concat: ["http://", { get_input: cloudify_ip },"/api/v3.1"]
+ inventory_url: http://inventory:8080
+ dhandler_url: https://deployment-handler:8443
+ ports:
+ - concat: ["8080:", { get_input: external_port }]
+ - concat: ["8443:", { get_input: external_tls_port }]
+ properties:
+ name:
+ "dcae-dashboard"
+ image:
+ { get_input: dashboard_docker_image }
+ replicas: {get_input: replicas}
+ dns_name: 'dcae-dashboard'
+ tls_info:
+ cert_directory: '/usr/local/share/ca-certificates/'
+ use_tls: true
+ docker_config:
+ healthcheck:
+ endpoint: /ccsdk-app/health
+ interval: 15s
+ timeout: 1s
+ type: http
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: pgaasdb
+
diff --git a/reference_templates/k8s-datafile-collector.yaml-template b/reference_templates/k8s-datafile-collector.yaml-template
new file mode 100644
index 0000000..2de0a24
--- /dev/null
+++ b/reference_templates/k8s-datafile-collector.yaml-template
@@ -0,0 +1,124 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# =============================================================================
+# Copyright (c) 2018-2019 AT&T Intellectual Property, 2019 Nordix Foundation. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - "http://www.getcloudify.org/spec/cloudify/3.4/types.yaml"
+ - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.13/k8splugin_types.yaml"
+ - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/dmaap/dmaap.yaml"
+
+inputs:
+ dmaap_mr_host:
+ type: string
+ description: dmaap messagerouter host
+ default: message-router.onap.svc.cluster.local
+ dmaap_mr_port:
+ type: integer
+ description: dmaap messagerouter port
+ default: 3904
+ dmaap_mr_protocol:
+ type: string
+ description: dmaap messagerouter protocol
+ default: "http"
+ tag_version:
+ type: string
+ description: DFC image tag/version
+ default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.2.0"
+ replicas:
+ type: integer
+ description: number of instances
+ default: 1
+ secureEnableCert:
+ type: boolean
+ description: enable certificate base connection with PNF and DMaap
+ default: false
+ feedName:
+ type: string
+ description: feed name for dmaap producerconfiguration
+ default: "bulk_pm_feed"
+ feedDescription:
+ type: string
+ default: "Feed for Bulk PM files"
+
+node_templates:
+ bulk_pm_feed:
+ type: ccsdk.nodes.Feed
+ properties:
+ feed_name: { get_input: feedName }
+ feed_description: { get_input: feedDescription }
+
+ datafile-collector:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+
+ relationships:
+ - type: ccsdk.relationships.publish_files
+ target: bulk_pm_feed
+
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ ports:
+ - concat: ["8100:0"]
+ - concat: ["8433:0"]
+
+ properties:
+ service_component_type: 'dcae-datafile'
+ application_config:
+ dmaap.ftpesConfig.keyCert: "/opt/app/datafile/config/dfc.jks"
+ dmaap.ftpesConfig.keyPassword: "secret"
+ dmaap.ftpesConfig.trustedCa: "/opt/app/datafile/config/ftp.jks"
+ dmaap.ftpesConfig.trustedCaPassword: "secret"
+ dmaap.security.trustStorePath: "/opt/app/datafile/etc/cert/trust.jks"
+ dmaap.security.trustStorePasswordPath: "/opt/app/datafile/etc/cert/trust.pass"
+ dmaap.security.keyStorePath: "/opt/app/datafile/etc/cert/key.p12"
+ dmaap.security.keyStorePasswordPath: "/opt/app/datafile/etc/cert/key.pass"
+ dmaap.security.enableDmaapCertAuth: { get_input: secureEnableCert }
+ streams_publishes:
+ PM_MEAS_FILES:
+ dmaap_info: <<bulk_pm_feed>>
+ type: data_router
+ streams_subscribes:
+ dmaap_subscriber:
+ type:
+ "message_router"
+ dmaap_info:
+ topic_url:
+ { concat: [{ get_input: dmaap_mr_protocol },"://",{ get_input: dmaap_mr_host },
+ ":",{ get_input: dmaap_mr_port },"/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"]}
+ streams_publishes:
+ - name: bulk_pm_feed
+ type: data_router
+ location: "loc00"
+ docker_config:
+ healthcheck:
+ endpoint: /heartbeat
+ interval: 15s
+ timeout: 1s
+ type: http
+ image:
+ get_input: tag_version
+ replicas: {get_input: replicas}
+ log_info:
+ log_directory: "/var/log/ONAP"
+ tls_info:
+ cert_directory: '/opt/app/datafile/etc/cert/'
+ use_tls: true
+
diff --git a/reference_templates/k8s-pgaas-database.yaml-template b/reference_templates/k8s-pgaas-database.yaml-template
new file mode 100644
index 0000000..309c962
--- /dev/null
+++ b/reference_templates/k8s-pgaas-database.yaml-template
@@ -0,0 +1,57 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: |-
+ This blueprint is used to install and to uninstall a persistent database into the central postgres as a platform service.
+ This blueprint depends upon the deployment of the pgaas_plugin and the PGaaS service.
+ This blueprint is part of a suite of three blueprints:
+ k8s-pgaas-initdb takes control of the postgres server instance.
+ k8s-pgaas-database creates a database, roles and credentials associated with the database.
+ k8s-pgaas-getdbinfo shows how an application can access a database (including its roles and credentials) that was already created with k8s-pgaas-database.
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
+
+inputs:
+ blueprint_version:
+ type: string
+ default: '2018-03-29T14:28:59+0000'
+
+ # pgaas-specific info
+ k8s_pgaas_instance_fqdn:
+ type: string
+
+ database_description:
+ type: string
+ default: 'This is a sample database'
+
+ database_name:
+ type: string
+ default: sample
+
+node_templates:
+ pgaasdbtest:
+ type: dcae.nodes.pgaas.database
+ properties:
+ writerfqdn: { get_input: k8s_pgaas_instance_fqdn }
+ name: { get_input: database_name }
diff --git a/reference_templates/k8s-pgaas-getdbinfo.yaml-template b/reference_templates/k8s-pgaas-getdbinfo.yaml-template
new file mode 100644
index 0000000..6869f2c
--- /dev/null
+++ b/reference_templates/k8s-pgaas-getdbinfo.yaml-template
@@ -0,0 +1,99 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: |-
+ This blueprint is an example of how an application can access the needed information about
+ a persistent database created as part of a PGaaS cluster.
+
+ For a given database "dbname" on a given PGaaS cluster "PGCLUSTERNAME",
+ there are three roles created:
+ admin role: has complete administrative control over that database
+ user role: has complete read and write access on that database
+ viewer role: only has read access on that database
+ The various attributes will return the appropriate information
+ that can be used with that role: host fqdn, role name and password.
+
+ This blueprint is part of a suite of three blueprints:
+ k8s-pgaas-initdb takes control of the postgres server instance.
+ k8s-pgaas-database creates a database, roles and credentials associated with the database.
+ k8s-pgaas-getdbinfo shows how an application can access a database (including its roles and credentials) that was already created with k8s-pgaas-database.
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
+
+inputs:
+ k8s_pgaas_instance_fqdn:
+ type: string
+ database_name:
+ type: string
+
+node_templates:
+ pgclustername_dbname:
+ type: dcae.nodes.pgaas.database
+ properties:
+ writerfqdn: { get_input: k8s_pgaas_instance_fqdn }
+ name: { get_input: database_name }
+ use_existing: true
+
+outputs:
+ # admin role has control over table/index/view creation/dropping
+ pgclustername_dbname_admin_host:
+ description: Hostname for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, admin, host ] }
+ pgclustername_dbname_admin_port:
+ description: Portname for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, admin, port ] }
+ pgclustername_dbname_admin_user:
+ description: Admin Username for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, admin, user ] }
+ pgclustername_dbname_admin_password:
+ description: Admin Password for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, admin, password ] }
+
+ # user role can read and write the tables
+ pgclustername_dbname_user_host:
+ description: Hostname for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, user, host ] }
+ pgclustername_dbname_user_port:
+ description: Portname for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, user, port ] }
+ pgclustername_dbname_user_user:
+ description: User Username for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, user, user ] }
+ pgclustername_dbname_user_password:
+ description: User Password for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, user, password ] }
+
+ # viewer role can only read from the tables
+ pgclustername_dbname_viewer_host:
+ description: Hostname for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, viewer, host ] }
+ pgclustername_dbname_viewer_port:
+ description: Portname for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, viewer, port ] }
+ pgclustername_dbname_viewer_user:
+ description: Viewer Username for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, viewer, user ] }
+ pgclustername_dbname_viewer_password:
+ description: Viewer Password for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, viewer, password ] }
diff --git a/reference_templates/pgaas-cluster.yaml-template b/reference_templates/pgaas-cluster.yaml-template
new file mode 100644
index 0000000..d7b0cd0
--- /dev/null
+++ b/reference_templates/pgaas-cluster.yaml-template
@@ -0,0 +1,435 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: |-
+ This blueprint is used to install and to uninstall a central postgres as a platform service.
+ This blueprint depends upon the deployment of the pgaas_plugin, the PGaaS Cinder volume, and Consul.
+ This blueprint is part of a suite of three blueprints that allow a PGaaS
+ cluster to be created that has persistent databases stored in Cinder.
+ pgaas-disk allocates the cinder volumes. It must be run first.
+ pgaas-cluster creates the PG service and attaches the cinder volumes. It must be run second.
+ pgaas-database creates a database. It must be run third, for each persistent database.
+ If the cluster is uninstalled, the persistent databases are unaffected.
+ If a database blueprint is uninstalled, the persistent database goes away.
+ If the disk blueprint is uninstalled, all persistent databases go away, along with the server instance.
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - http://www.getcloudify.org/spec/openstack-plugin/1.4/plugin.yaml
+ - http://www.getcloudify.org/spec/fabric-plugin/1.4.1/plugin.yaml
+
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
+
+inputs:
+ blueprint_version:
+ type: string
+ default: '2018-04-27T00:31:38+0000'
+
+ # pgaas-specific info
+ pgaas_cluster_name:
+ type: string
+ default: pgcl
+
+{{ ONAPTEMPLATE_STANDARD_INPUTS_TYPES }}
+
+ vm_init_pgrs:
+ type: string
+ default: |
+ #!/bin/sh
+ echo All output will be found in /tmp/ins.out and /tmp/ins.err
+ exec > /tmp/ins.out 2> /tmp/ins.err
+ set -x
+ if [ "$(dnsdomainname 2>/dev/null)" = "" ]
+ then
+ echo WARNING WARNING WARNING
+ echo The DNS DHCP settings did not work properly.
+ for i in $(seq 20)
+ do
+ echo Sleeping...
+ sleep 10
+ if [ "$(dnsdomainname 2>/dev/null)" != "" ]
+ then break
+ fi
+ echo The DNS DHCP settings still did not work properly.
+ done
+ if [ "$(dnsdomainname 2>/dev/null)" = "" ]
+ then
+ echo Exiting
+ exit 1
+ fi
+ fi
+
+ CONFDIR=/var/config/DCAE/chef/
+ mkdir -p $CONFDIR
+
+ CONF=$CONFDIR/pgaas-postgres.conf
+ cat <<EOF > $CONF
+ master: ${MASTER%%.*}
+ secondmaster: notused
+ DRTR_NODE_KSTOREFILE: /opt/app/dcae-certificate/keystore.jks
+ DRTR_NODE_KSTOREPASS: "No Certificate"
+ DRTR_NODE_PVTKEYPASS: "No Certificate"
+ PG_NODES: $PG_NODES
+ PG_JAVA_HOME : /opt/app/java/jdk/jdk170
+ PG_CLUSTER: central
+ EOF
+
+ apt-get update
+
+ # invoking apt-get separately allows a failure to be ignored
+ for i in openjdk-7-jdk openjdk-8-jdk python-pip python3-pip curl gawk; do apt-get install -y $i;done
+ pip install pyyaml
+
+ # prevent servers from starting
+ echo "exit 101" > /usr/sbin/policy-rc.d; chmod a+x /usr/sbin/policy-rc.d
+
+ # invoking apt-get separately allows a failure to be ignored
+ for i in postgresql libpq5 repmgr python-psycopg2 python3-psycopg2 libgetopt-java; do apt-get install -y $i; done
+
+ # allow servers to autostart again
+ rm -f /usr/sbin/policy-rc.d
+
+ ( umask 077; sed 's/^/*:*:*:postgres:/' < /root/.pgrspw > ~postgres/.pgpass; chown postgres:postgres ~postgres/.pgpass )
+
+ if [ ! -f $CONF ]
+ then echo "$CONF does not exist" 1>&2; exit 1
+ fi
+
+ echo Look in /tmp/pgaas.out for output from installing PGaaS
+ NEXUS={{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_storage_pgaas_debs_releases }}/debs
+ for pkg in cdf.deb-1.0.0 pgaas.deb-1.0.0
+ do
+ OUT=/tmp/$pkg
+ curl -s -k -f -o $OUT $NEXUS/$pkg
+ dpkg --install $OUT
+ done
+
+ case $(hostname) in
+ *00 ) WRITE=-write ;;
+ *01 ) WRITE= ;;
+ esac
+ curl -v -X PUT -H "Content-Type: application/json" "http://${LOCATION_PREFIX}cnsl00.${LOCATION_DOMAIN}:8500/v1/agent/service/register" -d "{\"name\" : \"${CLUSTER_NAME}${WRITE}\", \"Address\" : \"${LOCAL_IP}\", \"Port\" : 5432}"
+
+ echo ALL DONE
+
+node_templates:
+ key_pair:
+ type: cloudify.openstack.nodes.KeyPair
+ properties:
+ private_key_path: { get_input: key_filename }
+ use_external_resource: True
+ resource_id: { get_input: keypair }
+ openstack_config: &open_conf
+ get_input: openstack
+ private_net:
+ type: cloudify.openstack.nodes.Network
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: private_net }
+ openstack_config: *open_conf
+ security_group:
+ type: cloudify.openstack.nodes.SecurityGroup
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: security_group }
+ openstack_config: *open_conf
+
+ fixedip_pgrs00:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_pgrs00:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_pgrs00:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_pgrs00, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_pgrs00
+ host_pgrs00:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00' ] }
+ userdata:
+ concat:
+ - |-
+ #!/bin/sh
+ mkdir /root/.sshkey
+ echo '
+ - { get_attribute: [ pgaas_cluster, public ] }
+ - |-
+ ' >/root/.sshkey/id_rsa.pub
+ echo '
+ - { get_attribute: [ pgaas_cluster, base64private ] }
+ - |-
+ ' | base64 -d >/root/.sshkey/id_rsa
+ chmod 700 /root/.sshkey
+ chmod 600 /root/.sshkey/*
+ ( umask 077; echo -n postgres | cat - /root/.sshkey/id_rsa | md5sum | awk '{ print $1 }' > /root/.pgrspw )
+ set -x
+ - "\n"
+ - "CLUSTER_NAME='"
+ - { get_input: pgaas_cluster_name }
+ - "'\n"
+ - "LOCATION_PREFIX='"
+ - { get_input: location_prefix }
+ - "'\n"
+ - "LOCATION_DOMAIN='"
+ - { get_input: location_domain }
+ - "'\n"
+ - "MASTER='"
+ - { get_property: [ dns_pgrs00, fqdn ] }
+ - "'\n"
+ - "LOCAL_IP='"
+ - { get_attribute: [ floatingip_pgrs00, floating_ip_address ] }
+ - "'\n"
+ - "PG_NODES='"
+ - { get_property: [ dns_pgrs00, fqdn ] }
+ - '|'
+ - { get_property: [ dns_pgrs01, fqdn ] }
+ - "'\n"
+ - { get_input: vm_init_pgrs }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_pgrs00
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_pgrs00
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: dns_pgrs00
+ - type: cloudify.relationships.depends_on
+ target: pgaas_cluster
+ fixedip_pgrs01:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_pgrs01:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_pgrs01:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '01.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_pgrs01, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_pgrs01
+ host_pgrs01:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '01' ] }
+ userdata:
+ concat:
+ - |-
+ #!/bin/sh
+ mkdir /root/.sshkey
+ echo '
+ - { get_attribute: [ pgaas_cluster, public ] }
+ - |-
+ ' >/root/.sshkey/id_rsa.pub
+ echo '
+ - { get_attribute: [ pgaas_cluster, base64private ] }
+ - |-
+ ' | base64 -d >/root/.sshkey/id_rsa
+ chmod 700 /root/.sshkey
+ chmod 600 /root/.sshkey/*
+ ( umask 077; echo -n postgres | cat - /root/.sshkey/id_rsa | md5sum | awk '{ print $1 }' > /root/.pgrspw )
+ set -x
+ - "\n"
+ - "CLUSTER_NAME='"
+ - { get_input: pgaas_cluster_name }
+ - "'\n"
+ - "LOCATION_PREFIX='"
+ - { get_input: location_prefix }
+ - "'\n"
+ - "LOCATION_DOMAIN='"
+ - { get_input: location_domain }
+ - "'\n"
+ - "MASTER='"
+ - { get_property: [ dns_pgrs00, fqdn ] }
+ - "'\n"
+ - "LOCAL_IP='"
+ - { get_attribute: [ floatingip_pgrs01, floating_ip_address ] }
+ - "'\n"
+ - "PG_NODES='"
+ - { get_property: [ dns_pgrs00, fqdn ] }
+ - '|'
+ - { get_property: [ dns_pgrs01, fqdn ] }
+ - "'\n"
+ - { get_input: vm_init_pgrs }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_pgrs01
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_pgrs01
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: dns_pgrs01
+ - type: cloudify.relationships.depends_on
+ target: pgaas_cluster
+
+ # cinder connections
+ volume_pgrs00:
+ type: cloudify.openstack.nodes.Volume
+ properties:
+ resource_id: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00' ] }
+ openstack_config: *open_conf
+ use_external_resource: True
+ relationships:
+ - type: cloudify.openstack.volume_attached_to_server
+ target: host_pgrs00
+
+ volume_pgrs01:
+ type: cloudify.openstack.nodes.Volume
+ properties:
+ resource_id: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '01' ] }
+ openstack_config: *open_conf
+ use_external_resource: True
+ relationships:
+ - type: cloudify.openstack.volume_attached_to_server
+ target: host_pgrs01
+
+ # CNAME records
+ dns_pgrs_rw:
+ type: ccsdk.nodes.dns.cnamerecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '-write.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ cname: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00.', { get_input: location_domain } ] }
+
+ dns_pgrs_ro:
+ type: ccsdk.nodes.dns.cnamerecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ cname: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00.', { get_input: location_domain } ] }
+
+ # tie to pgaas_plugin database
+ pgaas_cluster:
+ type: dcae.nodes.pgaas.cluster
+ properties:
+ writerfqdn: { get_property: [ dns_pgrs_rw, fqdn ] }
+ use_existing: true
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: dns_pgrs_rw
+ - type: cloudify.relationships.depends_on
+ target: dns_pgrs_ro
+
+outputs:
+ public_ip00:
+ value: { get_attribute: [host_pgrs00, ip] }
+ public_ip01:
+ value: { get_attribute: [host_pgrs01, ip] }
+ writerfqdn:
+ value: { get_property: [ dns_pgrs_rw, fqdn ] }
+ readerfqdn:
+ value: { get_property: [ dns_pgrs_ro, fqdn ] }
+ dns_pgrs00:
+ value: { get_property: [ dns_pgrs00, fqdn ] }
+ dns_pgrs01:
+ value: { get_property: [ dns_pgrs01, fqdn ] }
+ blueprint_version:
+ value: { get_input: blueprint_version }
diff --git a/reference_templates/pgaas-database.yaml-template b/reference_templates/pgaas-database.yaml-template
new file mode 100644
index 0000000..a89d638
--- /dev/null
+++ b/reference_templates/pgaas-database.yaml-template
@@ -0,0 +1,63 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: |-
+ This blueprint is used to install and to uninstall a persistent database into the central postgres as a platform service.
+ This blueprint depends upon the deployment of the pgaas_plugin, the PGaaS Cinder volume, the PGaaS service, and Consul.
+ This blueprint is part of a suite of three blueprints that allow a PGaaS
+ cluster to be created that has persistent databases stored in Cinder.
+ pgaas-disk allocates the cinder volumes. It must be run first.
+ pgaas-cluster creates the PG service and attaches the cinder volumes. It must be run second.
+ pgaas-database creates a database. It must be run third, for each persistent database.
+ If the cluster is uninstalled, the persistent databases are unaffected.
+ If a database blueprint is uninstalled, the persistent database goes away.
+ If the disk blueprint is uninstalled, all persistent databases go away, along with the server instance.
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
+
+inputs:
+ blueprint_version:
+ type: string
+ default: '2018-03-29T14:28:59+0000'
+
+ # pgaas-specific info
+ pgaas_cluster_name:
+ type: string
+ default: pgcl
+ database_description:
+ type: string
+ default: 'This is a sample database'
+ database_name:
+ type: string
+ default: sample
+
+{{ ONAPTEMPLATE_STANDARD_INPUTS_TYPES }}
+
+node_templates:
+ pgaasdbtest:
+ type: dcae.nodes.pgaas.database
+ properties:
+ writerfqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '-write.', { get_input: location_domain } ] }
+ name: { get_input: database_name }
diff --git a/reference_templates/pgaas-disk.yaml-template b/reference_templates/pgaas-disk.yaml-template
new file mode 100644
index 0000000..3f96bae
--- /dev/null
+++ b/reference_templates/pgaas-disk.yaml-template
@@ -0,0 +1,123 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: |-
+ This blueprint is used to install and to uninstall the cinder volumes for
+ a central postgres as a platform service.
+ This blueprint depends upon the deployment of Consul and the pgaas_plugin.
+ This blueprint is part of a suite of three blueprints that allow a PGaaS
+ cluster to be created that has persistent databases stored in Cinder.
+ pgaas-disk allocates the cinder volumes. It must be run first.
+ pgaas-cluster creates the PG service and attaches the cinder volumes. It must be run second.
+ pgaas-database creates a database. It must be run third, for each persistent database.
+ If the cluster is uninstalled, the persistent databases are unaffected.
+ If a database blueprint is uninstalled, the persistent database goes away.
+ If the disk blueprint is uninstalled, all persistent databases go away, along with the server instance.
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - http://www.getcloudify.org/spec/openstack-plugin/1.4/plugin.yaml
+ - http://www.getcloudify.org/spec/fabric-plugin/1.4.1/plugin.yaml
+
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/sshkeyshare/sshkey_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
+
+inputs:
+ blueprint_version:
+ type: string
+ default: '2018-04-27T00:31:38+0000'
+
+ # pgaas-specific info
+ pgaas_cluster_name:
+ type: string
+ default: pgcl
+ cinder_volume_size:
+ type: string
+ default: 300
+
+{{ ONAPTEMPLATE_STANDARD_INPUTS_TYPES }}
+
+node_templates:
+ key_pair:
+ type: cloudify.openstack.nodes.KeyPair
+ properties:
+ private_key_path: { get_input: key_filename }
+ use_external_resource: True
+ resource_id: { get_input: keypair }
+ openstack_config: &open_conf
+ get_input: openstack
+
+ sharedsshkey_pgrs:
+ type: ccsdk.nodes.ssh.keypair
+
+ private_net:
+ type: cloudify.openstack.nodes.Network
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: private_net }
+ openstack_config: *open_conf
+
+ security_group:
+ type: cloudify.openstack.nodes.SecurityGroup
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: security_group }
+ openstack_config: *open_conf
+
+ volume_pgrs00:
+ type: cloudify.openstack.nodes.Volume
+ properties:
+ resource_id: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00' ] }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ size: { get_input: cinder_volume_size }
+
+ volume_pgrs01:
+ type: cloudify.openstack.nodes.Volume
+ properties:
+ resource_id: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '01' ] }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ size: { get_input: cinder_volume_size }
+
+ pgaas_cluster:
+ type: dcae.nodes.pgaas.cluster
+ properties:
+ writerfqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '-write.', { get_input: location_domain } ] }
+ readerfqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '.', { get_input: location_domain } ] }
+ relationships:
+ - type: dcae.relationships.pgaas_cluster_uses_sshkeypair
+ target: sharedsshkey_pgrs
+
+outputs:
+ blueprint_version:
+ value: { get_input: blueprint_version }
diff --git a/reference_templates/pgaas-getdbinfo.yaml-template b/reference_templates/pgaas-getdbinfo.yaml-template
new file mode 100644
index 0000000..8672f04
--- /dev/null
+++ b/reference_templates/pgaas-getdbinfo.yaml-template
@@ -0,0 +1,92 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: |-
+ This blueprint is an example of how an application can access the needed information about
+ a persistent database created as part of a PGaaS cluster.
+
+ For a given database "dbname" on a given PGaaS cluster "PGCLUSTERNAME",
+ there are three roles created:
+ admin role: has complete administrative control over that database
+ user role: has complete read and write access on that database
+ viewer role: only has read access on that database
+ The various attributes will return the appropriate information
+ that can be used with that role: host fqdn, role name and password.
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
+
+inputs:
+ location_domain:
+ type: string
+ location_prefix:
+ type: string
+ pgaas_cluster_name:
+ type: string
+ default: pgcl
+ database_name:
+ type: string
+ default: sample
+
+node_templates:
+ pgclustername_dbname:
+ type: dcae.nodes.pgaas.database
+ properties:
+ writerfqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '-write.', { get_input: location_domain } ] }
+ name: { get_input: database_name }
+ use_existing: true
+
+outputs:
+ # admin role has control over table/index/view creation/dropping
+ pgclustername_dbname_admin_host:
+ description: Hostname for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, admin, host ] }
+ pgclustername_dbname_admin_user:
+ description: Admin Username for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, admin, user ] }
+ pgclustername_dbname_admin_password:
+ description: Admin Password for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, admin, password ] }
+
+ # user role can read and write the tables
+ pgclustername_dbname_user_host:
+ description: Hostname for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, user, host ] }
+ pgclustername_dbname_user_user:
+ description: User Username for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, user, user ] }
+ pgclustername_dbname_user_password:
+ description: User Password for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, user, password ] }
+
+ # viewer role can only read from the tables
+ pgclustername_dbname_viewer_host:
+ description: Hostname for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, viewer, host ] }
+ pgclustername_dbname_viewer_user:
+ description: Viewer Username for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, viewer, user ] }
+ pgclustername_dbname_viewer_password:
+ description: Viewer Password for PGCLUSTERNAME dbname database
+ value: { get_attribute: [ pgclustername_dbname, viewer, password ] }
diff --git a/reference_templates/pgaas-onevm.yaml-template b/reference_templates/pgaas-onevm.yaml-template
new file mode 100644
index 0000000..be2d044
--- /dev/null
+++ b/reference_templates/pgaas-onevm.yaml-template
@@ -0,0 +1,300 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: |-
+ This blueprint is used to install and to uninstall a single-VM central postgres as a platform service.
+ This blueprint depends upon the deployment of the pgaas_plugin and Consul.
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - http://www.getcloudify.org/spec/openstack-plugin/1.4/plugin.yaml
+ - http://www.getcloudify.org/spec/fabric-plugin/1.4.1/plugin.yaml
+
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/sshkeyshare/sshkey_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
+
+inputs:
+ blueprint_version:
+ type: string
+ default: '2018-04-27T00:31:38+0000'
+
+ # pgaas-specific info
+ pgaas_cluster_name:
+ type: string
+ default: pgvm
+
+{{ ONAPTEMPLATE_STANDARD_INPUTS_TYPES }}
+
+ vm_init_pgrs:
+ type: string
+ default: |
+ #!/bin/sh
+ echo All output will be found in /tmp/ins.out and /tmp/ins.err
+ exec > /tmp/ins.out 2> /tmp/ins.err
+ set -x
+ if [ "$(dnsdomainname 2>/dev/null)" = "" ]
+ then
+ echo WARNING WARNING WARNING
+ echo The DNS DHCP settings did not work properly.
+ for i in $(seq 20)
+ do
+ echo Sleeping...
+ sleep 10
+ if [ "$(dnsdomainname 2>/dev/null)" != "" ]
+ then break
+ fi
+ echo The DNS DHCP settings still did not work properly.
+ done
+ if [ "$(dnsdomainname 2>/dev/null)" = "" ]
+ then
+ echo Exiting
+ exit 1
+ fi
+ fi
+
+ CONFDIR=/var/config/DCAE/chef/
+ mkdir -p $CONFDIR
+
+ CONF=$CONFDIR/pgaas-postgres.conf
+ cat <<EOF > $CONF
+ master: ${MASTER%%.*}
+ secondmaster: notused
+ DRTR_NODE_KSTOREFILE: /opt/app/dcae-certificate/keystore.jks
+ DRTR_NODE_KSTOREPASS: "No Certificate"
+ DRTR_NODE_PVTKEYPASS: "No Certificate"
+ PG_NODES: $PG_NODES
+ PG_JAVA_HOME : /opt/app/java/jdk/jdk170
+ PG_CLUSTER: central
+ EOF
+
+ apt-get update
+
+ # invoking apt-get separately allows a failure to be ignored
+ for i in openjdk-7-jdk openjdk-8-jdk python-pip python3-pip curl gawk; do apt-get install -y $i;done
+ pip install pyyaml
+
+ # prevent servers from starting
+ echo "exit 101" > /usr/sbin/policy-rc.d; chmod a+x /usr/sbin/policy-rc.d
+
+ # invoking apt-get separately allows a failure to be ignored
+ for i in postgresql libpq5 repmgr python-psycopg2 python3-psycopg2 libgetopt-java; do apt-get install -y $i; done
+
+ # allow servers to autostart again
+ rm -f /usr/sbin/policy-rc.d
+
+ ( umask 077; sed 's/^/*:*:*:postgres:/' < /root/.pgrspw > ~postgres/.pgpass; chown postgres:postgres ~postgres/.pgpass )
+
+ if [ ! -f $CONF ]
+ then echo "$CONF does not exist" 1>&2; exit 1
+ fi
+
+ echo Look in /tmp/pgaas.out for output from installing PGaaS
+ NEXUS={{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_storage_pgaas_debs_releases }}/debs
+ for pkg in cdf.deb-1.0.0 pgaas.deb-1.0.0
+ do
+ OUT=/tmp/$pkg
+ curl -s -k -f -o $OUT $NEXUS/$pkg
+ dpkg --install $OUT
+ done
+
+ curl -v -X PUT -H "Content-Type: application/json" "http://${LOCATION_PREFIX}cnsl00.${LOCATION_DOMAIN}:8500/v1/agent/service/register" -d "{\"name\" : \"${CLUSTER_NAME}-write\", \"Address\" : \"${LOCAL_IP}\", \"Port\" : 5432}\""
+ curl -v -X PUT -H "Content-Type: application/json" "http://${LOCATION_PREFIX}cnsl00.${LOCATION_DOMAIN}:8500/v1/agent/service/register" -d "{\"name\" : \"${CLUSTER_NAME}\", \"Address\" : \"${LOCAL_IP}\", \"Port\" : 5432}"
+
+ echo ALL DONE
+
+node_templates:
+ key_pair:
+ type: cloudify.openstack.nodes.KeyPair
+ properties:
+ private_key_path: { get_input: key_filename }
+ use_external_resource: True
+ resource_id: { get_input: keypair }
+ openstack_config: &open_conf
+ get_input: openstack
+ private_net:
+ type: cloudify.openstack.nodes.Network
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: private_net }
+ openstack_config: *open_conf
+ security_group:
+ type: cloudify.openstack.nodes.SecurityGroup
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: security_group }
+ openstack_config: *open_conf
+
+ sharedsshkey_pgrs:
+ type: ccsdk.nodes.ssh.keypair
+
+ fixedip_pgrs00:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_pgrs00:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_pgrs00:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_pgrs00, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_pgrs00
+ host_pgrs00:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00' ] }
+ userdata:
+ concat:
+ - |-
+ #!/bin/sh
+ mkdir /root/.sshkey
+ echo '
+ - { get_attribute: [ sharedsshkey_pgrs, public ] }
+ - |-
+ ' >/root/.sshkey/id_rsa.pub
+ echo '
+ - { get_attribute: [ sharedsshkey_pgrs, base64private ] }
+ - |-
+ ' | base64 -d >/root/.sshkey/id_rsa
+ chmod 700 /root/.sshkey
+ chmod 600 /root/.sshkey/*
+ ( umask 077; echo -n postgres | cat - /root/.sshkey/id_rsa | md5sum | awk '{ print $1 }' > /root/.pgrspw )
+ set -x
+ - "\n"
+ - "CLUSTER_NAME='"
+ - { get_input: pgaas_cluster_name }
+ - "'\n"
+ - "LOCATION_PREFIX='"
+ - { get_input: location_prefix }
+ - "'\n"
+ - "LOCATION_DOMAIN='"
+ - { get_input: location_domain }
+ - "'\n"
+ - "MASTER='"
+ - { get_property: [ dns_pgrs00, fqdn ] }
+ - "'\n"
+ - "LOCAL_IP='"
+ - { get_attribute: [ floatingip_pgrs00, floating_ip_address ] }
+ - "'\n"
+ - "PG_NODES='"
+ - { get_property: [ dns_pgrs00, fqdn ] }
+ - "'\n"
+ - { get_input: vm_init_pgrs }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_pgrs00
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_pgrs00
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: dns_pgrs00
+ - type: cloudify.relationships.depends_on
+ target: sharedsshkey_pgrs
+ # CNAME records
+ dns_pgrs_rw:
+ type: ccsdk.nodes.dns.cnamerecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '-write.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ cname: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00.', { get_input: location_domain } ] }
+
+ dns_pgrs_ro:
+ type: ccsdk.nodes.dns.cnamerecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ cname: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00.', { get_input: location_domain } ] }
+
+ # tie to pgaas_plugin database
+ pgaas_cluster:
+ type: dcae.nodes.pgaas.cluster
+ properties:
+ writerfqdn: { get_property: [ dns_pgrs_rw, fqdn ] }
+ readerfqdn: { get_property: [ dns_pgrs_ro, fqdn ] }
+ relationships:
+ - type: dcae.relationships.pgaas_cluster_uses_sshkeypair
+ target: sharedsshkey_pgrs
+ - type: cloudify.relationships.depends_on
+ target: dns_pgrs_rw
+ - type: cloudify.relationships.depends_on
+ target: dns_pgrs_ro
+
+outputs:
+ public_ip00:
+ value: { get_attribute: [host_pgrs00, ip] }
+ writerfqdn:
+ value: { get_property: [ dns_pgrs_rw, fqdn ] }
+ readerfqdn:
+ value: { get_property: [ dns_pgrs_ro, fqdn ] }
+ dns_pgrs00:
+ value: { get_property: [ dns_pgrs00, fqdn ] }
+ blueprint_version:
+ value: { get_input: blueprint_version }
diff --git a/reference_templates/pgaas.yaml-template b/reference_templates/pgaas.yaml-template
new file mode 100644
index 0000000..4a7e16a
--- /dev/null
+++ b/reference_templates/pgaas.yaml-template
@@ -0,0 +1,412 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: |-
+ This blueprint is used to install and to uninstall a two-VM central postgres as a platform service.
+ This blueprint depends upon the deployment of the pgaas_plugin and Consul.
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - http://www.getcloudify.org/spec/openstack-plugin/1.4/plugin.yaml
+ - http://www.getcloudify.org/spec/fabric-plugin/1.4.1/plugin.yaml
+
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dnsdesig/dns_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/sshkeyshare/sshkey_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/pgaas/1.1.0/pgaas_types.yaml"
+
+inputs:
+ blueprint_version:
+ type: string
+ default: '2018-04-27T00:31:38+0000'
+
+ # pgaas-specific info
+ pgaas_cluster_name:
+ type: string
+ default: pstg
+
+{{ ONAPTEMPLATE_STANDARD_INPUTS_TYPES }}
+
+ vm_init_pgrs:
+ type: string
+ default: |
+ #!/bin/sh
+ echo All output will be found in /tmp/ins.out and /tmp/ins.err
+ exec > /tmp/ins.out 2> /tmp/ins.err
+ set -x
+ if [ "$(dnsdomainname 2>/dev/null)" = "" ]
+ then
+ echo WARNING WARNING WARNING
+ echo The DNS DHCP settings did not work properly.
+ for i in $(seq 20)
+ do
+ echo Sleeping...
+ sleep 10
+ if [ "$(dnsdomainname 2>/dev/null)" != "" ]
+ then break
+ fi
+ echo The DNS DHCP settings still did not work properly.
+ done
+ if [ "$(dnsdomainname 2>/dev/null)" = "" ]
+ then
+ echo Exiting
+ exit 1
+ fi
+ fi
+
+ CONFDIR=/var/config/DCAE/chef/
+ mkdir -p $CONFDIR
+
+ CONF=$CONFDIR/pgaas-postgres.conf
+ cat <<EOF > $CONF
+ master: ${MASTER%%.*}
+ secondmaster: notused
+ DRTR_NODE_KSTOREFILE: /opt/app/dcae-certificate/keystore.jks
+ DRTR_NODE_KSTOREPASS: "No Certificate"
+ DRTR_NODE_PVTKEYPASS: "No Certificate"
+ PG_NODES: $PG_NODES
+ PG_JAVA_HOME : /opt/app/java/jdk/jdk170
+ PG_CLUSTER: central
+ EOF
+
+ apt-get update
+
+ # invoking apt-get separately allows a failure to be ignored
+ for i in openjdk-7-jdk openjdk-8-jdk python-pip python3-pip curl gawk; do apt-get install -y $i;done
+ pip install pyyaml
+
+ # prevent servers from starting
+ echo "exit 101" > /usr/sbin/policy-rc.d; chmod a+x /usr/sbin/policy-rc.d
+
+ # invoking apt-get separately allows a failure to be ignored
+ for i in postgresql libpq5 repmgr python-psycopg2 python3-psycopg2 libgetopt-java; do apt-get install -y $i; done
+
+ # allow servers to autostart again
+ rm -f /usr/sbin/policy-rc.d
+
+ ( umask 077; sed 's/^/*:*:*:postgres:/' < /root/.pgrspw > ~postgres/.pgpass; chown postgres:postgres ~postgres/.pgpass )
+
+ if [ ! -f $CONF ]
+ then echo "$CONF does not exist" 1>&2; exit 1
+ fi
+
+ echo Look in /tmp/pgaas.out for output from installing PGaaS
+ NEXUS={{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_storage_pgaas_debs_releases }}/debs
+ for pkg in cdf.deb-1.0.0 pgaas.deb-1.0.0
+ do
+ OUT=/tmp/$pkg
+ curl -s -k -f -o $OUT $NEXUS/$pkg
+ dpkg --install $OUT
+ done
+
+ case $(hostname) in
+ *00 ) WRITE=-write ;;
+ *01 ) WRITE= ;;
+ esac
+ curl -v -X PUT -H "Content-Type: application/json" "http://${LOCATION_PREFIX}cnsl00.${LOCATION_DOMAIN}:8500/v1/agent/service/register" -d "{\"name\" : \"${CLUSTER_NAME}${WRITE}\", \"Address\" : \"${LOCAL_IP}\", \"Port\" : 5432}"
+
+ echo ALL DONE
+
+node_templates:
+ key_pair:
+ type: cloudify.openstack.nodes.KeyPair
+ properties:
+ private_key_path: { get_input: key_filename }
+ use_external_resource: True
+ resource_id: { get_input: keypair }
+ openstack_config: &open_conf
+ get_input: openstack
+ private_net:
+ type: cloudify.openstack.nodes.Network
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: private_net }
+ openstack_config: *open_conf
+ security_group:
+ type: cloudify.openstack.nodes.SecurityGroup
+ properties:
+ use_external_resource: True
+ resource_id: { get_input: security_group }
+ openstack_config: *open_conf
+
+ sharedsshkey_pgrs:
+ type: ccsdk.nodes.ssh.keypair
+
+ fixedip_pgrs00:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_pgrs00:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_pgrs00:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_pgrs00, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_pgrs00
+ host_pgrs00:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00' ] }
+ userdata:
+ concat:
+ - |-
+ #!/bin/sh
+ mkdir /root/.sshkey
+ echo '
+ - { get_attribute: [ sharedsshkey_pgrs, public ] }
+ - |-
+ ' >/root/.sshkey/id_rsa.pub
+ echo '
+ - { get_attribute: [ sharedsshkey_pgrs, base64private ] }
+ - |-
+ ' | base64 -d >/root/.sshkey/id_rsa
+ chmod 700 /root/.sshkey
+ chmod 600 /root/.sshkey/*
+ ( umask 077; echo -n postgres | cat - /root/.sshkey/id_rsa | md5sum | awk '{ print $1 }' > /root/.pgrspw )
+ set -x
+ - "\n"
+ - "CLUSTER_NAME='"
+ - { get_input: pgaas_cluster_name }
+ - "'\n"
+ - "LOCATION_PREFIX='"
+ - { get_input: location_prefix }
+ - "'\n"
+ - "LOCATION_DOMAIN='"
+ - { get_input: location_domain }
+ - "'\n"
+ - "MASTER='"
+ - { get_property: [ dns_pgrs00, fqdn ] }
+ - "'\n"
+ - "LOCAL_IP='"
+ - { get_attribute: [ floatingip_pgrs00, floating_ip_address ] }
+ - "'\n"
+ - "PG_NODES='"
+ - { get_property: [ dns_pgrs00, fqdn ] }
+ - '|'
+ - { get_property: [ dns_pgrs01, fqdn ] }
+ - "'\n"
+ - { get_input: vm_init_pgrs }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_pgrs00
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_pgrs00
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: dns_pgrs00
+ - type: cloudify.relationships.depends_on
+ target: sharedsshkey_pgrs
+ fixedip_pgrs01:
+ type: cloudify.openstack.nodes.Port
+ properties:
+ port:
+ extra_dhcp_opts:
+ - opt_name: 'domain-name'
+ opt_value: { get_input: location_domain }
+ openstack_config: *open_conf
+ relationships:
+ - type: cloudify.relationships.contained_in
+ target: private_net
+ floatingip_pgrs01:
+ type: cloudify.openstack.nodes.FloatingIP
+ properties:
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ floating_network_name: { get_input: public_net }
+ dns_pgrs01:
+ type: ccsdk.nodes.dns.arecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '01.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ ip_addresses:
+ - { get_attribute: [ floatingip_pgrs01, floating_ip_address ] }
+ relationships:
+ - type: cloudify.relationships.depends_on
+ target: floatingip_pgrs01
+ host_pgrs01:
+ type: cloudify.openstack.nodes.Server
+ properties:
+ install_agent: false
+ image: { get_input: ubuntu1604image_id }
+ flavor: { get_input: flavor_id }
+ management_network_name: { get_input: private_net }
+ openstack_config: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ name: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '01' ] }
+ userdata:
+ concat:
+ - |-
+ #!/bin/sh
+ mkdir /root/.sshkey
+ echo '
+ - { get_attribute: [ sharedsshkey_pgrs, public ] }
+ - |-
+ ' >/root/.sshkey/id_rsa.pub
+ echo '
+ - { get_attribute: [ sharedsshkey_pgrs, base64private ] }
+ - |-
+ ' | base64 -d >/root/.sshkey/id_rsa
+ chmod 700 /root/.sshkey
+ chmod 600 /root/.sshkey/*
+ ( umask 077; echo -n postgres | cat - /root/.sshkey/id_rsa | md5sum | awk '{ print $1 }' > /root/.pgrspw )
+ set -x
+ - "\n"
+ - "CLUSTER_NAME='"
+ - { get_input: pgaas_cluster_name }
+ - "'\n"
+ - "LOCATION_PREFIX='"
+ - { get_input: location_prefix }
+ - "'\n"
+ - "LOCATION_DOMAIN='"
+ - { get_input: location_domain }
+ - "'\n"
+ - "MASTER='"
+ - { get_property: [ dns_pgrs00, fqdn ] }
+ - "'\n"
+ - "LOCAL_IP='"
+ - { get_attribute: [ floatingip_pgrs01, floating_ip_address ] }
+ - "'\n"
+ - "PG_NODES='"
+ - { get_property: [ dns_pgrs00, fqdn ] }
+ - '|'
+ - { get_property: [ dns_pgrs01, fqdn ] }
+ - "'\n"
+ - { get_input: vm_init_pgrs }
+ relationships:
+ - type: cloudify.openstack.server_connected_to_port
+ target: fixedip_pgrs01
+ - type: cloudify.openstack.server_connected_to_security_group
+ target: security_group
+ - type: cloudify.openstack.server_connected_to_floating_ip
+ target: floatingip_pgrs01
+ - type: cloudify.openstack.server_connected_to_keypair
+ target: key_pair
+ - type: cloudify.relationships.depends_on
+ target: dns_pgrs01
+ - type: cloudify.relationships.depends_on
+ target: sharedsshkey_pgrs
+
+ # CNAME records
+ dns_pgrs_rw:
+ type: ccsdk.nodes.dns.cnamerecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '-write.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ cname: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00.', { get_input: location_domain } ] }
+
+ dns_pgrs_ro:
+ type: ccsdk.nodes.dns.cnamerecord
+ properties:
+ fqdn: { concat: [ { get_input: location_prefix }, '-', { get_input: pgaas_cluster_name }, '.', { get_input: location_domain } ] }
+ openstack: *open_conf
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ args:
+ cname: { concat: [ { get_input: location_prefix }, { get_input: pgaas_cluster_name }, '00.', { get_input: location_domain } ] }
+
+ # tie to pgaas_plugin database
+ pgaas_cluster:
+ type: dcae.nodes.pgaas.cluster
+ properties:
+ writerfqdn: { get_property: [ dns_pgrs_rw, fqdn ] }
+ readerfqdn: { get_property: [ dns_pgrs_ro, fqdn ] }
+ relationships:
+ - type: dcae.relationships.pgaas_cluster_uses_sshkeypair
+ target: sharedsshkey_pgrs
+ - type: cloudify.relationships.depends_on
+ target: dns_pgrs_rw
+ - type: cloudify.relationships.depends_on
+ target: dns_pgrs_ro
+
+outputs:
+ public_ip00:
+ value: { get_attribute: [host_pgrs00, ip] }
+ public_ip01:
+ value: { get_attribute: [host_pgrs01, ip] }
+ writerfqdn:
+ value: { get_property: [ dns_pgrs_rw, fqdn ] }
+ readerfqdn:
+ value: { get_property: [ dns_pgrs_ro, fqdn ] }
+ dns_pgrs00:
+ value: { get_property: [ dns_pgrs00, fqdn ] }
+ dns_pgrs01:
+ value: { get_property: [ dns_pgrs01, fqdn ] }
+ blueprint_version:
+ value: { get_input: blueprint_version }
diff --git a/reference_templates/policy_handler.yaml-template b/reference_templates/policy_handler.yaml-template
new file mode 100644
index 0000000..29e66e6
--- /dev/null
+++ b/reference_templates/policy_handler.yaml-template
@@ -0,0 +1,70 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START=======================================================
+# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: >
+ This blueprint deploys/manages the DCAE policy-handler as a Docker container
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/3/dockerplugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml
+
+inputs:
+
+ location_id:
+ description: Deployment location
+
+ docker_host_override:
+ description: Target docker host
+ default: 'platform_dockerhost'
+
+ policy_handler_image:
+ description: Docker image for policy_handler
+ default: '{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.platform.policy-handler:5.0.0'
+
+ application_config:
+ description: policy handler application configuration - requires info on policy-engine
+ default: {}
+
+node_templates:
+ policy_handler:
+ type: dcae.nodes.DockerContainerForPlatforms
+ properties:
+ name: 'policy_handler'
+ image: { get_input: policy_handler_image }
+ application_config: { get_input: application_config }
+ docker_config:
+ healthcheck:
+ type: 'http'
+ interval: '300s'
+ timeout: '25s'
+ endpoint: '/healthcheck'
+ relationships:
+ - type: dcae.relationships.component_contained_in
+ target: docker_host
+
+ # Docker host
+ docker_host:
+ type: dcae.nodes.SelectedDockerHost
+ properties:
+ location_id: { get_input: location_id }
+ docker_host_override: { get_input: docker_host_override }
diff --git a/reference_templates/prh-service.yaml-template b/reference_templates/prh-service.yaml-template
new file mode 100644
index 0000000..77d681b
--- /dev/null
+++ b/reference_templates/prh-service.yaml-template
@@ -0,0 +1,61 @@
+tosca_definitions_version: cloudify_dsl_1_3
+imports:
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml"
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
+inputs:
+ prh_publish_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.SO_OUTPUT"
+ prh_subscribe_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.SEC_OTHER_OUTPUT"
+ docker_host_override:
+ type: string
+ default: "component_dockerhost"
+ dh_location_id:
+ type: string
+ default: "zone1"
+ tag_version:
+ type: string
+ default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh:1.2.2"
+
+
+node_templates:
+ docker_service_host:
+ type: dcae.nodes.SelectedDockerHost
+ properties:
+ docker_host_override:
+ get_input: docker_host_override
+ location_id:
+ get_input: dh_location_id
+ heartbeatService:
+ type: dcae.nodes.DockerContainerForComponentsUsingDmaap
+ properties:
+ application_config:
+ streams_publishes:
+ dcae_cl_out:
+ dmaap_info:
+ topic_url:
+ get_input: prh_publish_url
+ type: message_router
+ streams_subscribes:
+ heartbeat_fault:
+ dmaap_info:
+ topic_url:
+ get_input: prh_subcribe_url
+ type: message_router
+ docker_config:
+ healthcheck:
+ script: /app/bin/check_health.py
+ interval: 18s
+ timeout: 30s
+ type: docker
+ image:
+ get_input: tag_version
+ location_id:
+ get_input: dh_location_id
+ service_component_type: dcaegen2-services-prh
+ relationships:
+ - target: docker_service_host
+ type: dcae.relationships.component_contained_in
+
diff --git a/reference_templates/snmptrap-collector.yaml-template b/reference_templates/snmptrap-collector.yaml-template
new file mode 100644
index 0000000..694fde5
--- /dev/null
+++ b/reference_templates/snmptrap-collector.yaml-template
@@ -0,0 +1,95 @@
+tosca_definitions_version: cloudify_dsl_1_3
+imports:
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml"
+- "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
+inputs:
+ snmp_publish_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.ONAP-COLLECTOR-SNMPTRAP"
+ docker_host_override:
+ type: string
+ default: "component_dockerhost"
+ dh_location_id:
+ type: string
+ default: "zone1"
+ tag_version:
+ type: string
+ default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.snmptrap:1.3"
+
+node_templates:
+ docker_service_host:
+ type: dcae.nodes.SelectedDockerHost
+ properties:
+ docker_host_override:
+ get_input: docker_host_override
+ location_id:
+ get_input: dh_location_id
+ heartbeatService:
+ type: dcae.nodes.DockerContainerForComponentsUsingDmaap
+ properties:
+ application_config:
+ streams_publishes:
+ dcae_cl_out:
+ dmaap_info:
+ topic_url:
+ get_input: snmp_publish_url
+ type: message_router
+ snmptrap.version: "1.3.0"
+ snmptrap.title: "ONAP SNMP Trap Receiver"
+ protocols.transport: "udp"
+ protocols.ipv4_interface: "0.0.0.0"
+ protocols.ipv4_port: 162
+ protocols.ipv6_interface: "::1"
+ protocols.ipv6_port: 162
+ cache.dns_cache_ttl_seconds: 60
+ publisher.http_timeout_milliseconds: 1500
+ publisher.http_retries: 3
+ publisher.http_milliseconds_between_retries: 750
+ publisher.http_primary_publisher: "true"
+ publisher.http_peer_publisher: "unavailable"
+ publisher.max_traps_between_publishes: 10
+ publisher.max_milliseconds_between_publishes: 10000
+ files.runtime_base_dir: "/opt/app/snmptrap"
+ files.log_dir: "logs"
+ files.data_dir: "data"
+ files.pid_dir: "tmp"
+ files.arriving_traps_log: "snmptrapd_arriving_traps.log"
+ files.snmptrapd_diag: "snmptrapd_prog_diag.log"
+ files.traps_stats_log: "snmptrapd_stats.csv"
+ files.perm_status_file: "snmptrapd_status.log"
+ files.eelf_base_dir: "/opt/app/snmptrap/logs"
+ files.eelf_error: "error.log"
+ files.eelf_debug: "debug.log"
+ files.eelf_audit: "audit.log"
+ files.eelf_metrics: "metrics.log"
+ files.roll_frequency: "hour"
+ files.minimum_severity_to_log: 2
+ trap_def.1.trap_oid" : ".1.3.6.1.4.1.74.2.46.12.1.1"
+ trap_def.1.trap_category: "DCAE-SNMP-TRAPS"
+ trap_def.2.trap_oid" : "*"
+ trap_def.2.trap_category: "DCAE-SNMP-TRAPS"
+ stormwatch.1.stormwatch_oid" : ".1.3.6.1.4.1.74.2.46.12.1.1"
+ stormwatch.1.low_water_rearm_per_minute" : "5"
+ stormwatch.1.high_water_arm_per_minute" : "100"
+ stormwatch.2.stormwatch_oid" : ".1.3.6.1.4.1.74.2.46.12.1.2"
+ stormwatch.2.low_water_rearm_per_minute" : "2"
+ stormwatch.2.high_water_arm_per_minute" : "200"
+ stormwatch.3.stormwatch_oid" : ".1.3.6.1.4.1.74.2.46.12.1.2"
+ stormwatch.3.low_water_rearm_per_minute" : "2"
+ stormwatch.3.high_water_arm_per_minute" : "200"
+ docker_config:
+ healthcheck:
+ script: /app/bin/check_health.py
+ interval: 18s
+ timeout: 30s
+ type: docker
+ image:
+ get_input: tag_version
+
+ location_id:
+ get_input: dh_location_id
+ service_component_type: dcaegen2-collectors-snmptrap
+ relationships:
+ - target: docker_service_host
+ type: dcae.relationships.component_contained_in
+
diff --git a/reference_templates/tca.yaml-template b/reference_templates/tca.yaml-template
new file mode 100644
index 0000000..9699456
--- /dev/null
+++ b/reference_templates/tca.yaml-template
@@ -0,0 +1,92 @@
+tosca_definitions_version: cloudify_dsl_1_3
+imports:
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/cdapcloudify/14/cdapcloudify_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dcaepolicyplugin/1/dcaepolicyplugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml
+
+inputs:
+ connected_broker_dns_name:
+ type: string
+ default: cdap_broker
+ aaiEnrichmentHost:
+ type: string
+ enableAAIEnrichment:
+ type: string
+ default: false
+ subscriberHostName:
+ type: string
+ publisherHostName:
+ type: string
+node_templates:
+ tca_tca:
+ type: dcae.nodes.MicroService.cdap
+ properties:
+ app_config:
+ appDescription: DCAE Analytics Threshold Crossing Alert Application
+ appName: dcae-tca
+ tcaAlertsAbatementTableName: TCAAlertsAbatementTable
+ tcaAlertsAbatementTableTTLSeconds: '1728000'
+ tcaSubscriberOutputStreamName: TCASubscriberOutputStream
+ tcaVESAlertsTableName: TCAVESAlertsTable
+ tcaVESAlertsTableTTLSeconds: '1728000'
+ tcaVESMessageStatusTableName: TCAVESMessageStatusTable
+ tcaVESMessageStatusTableTTLSeconds: '86400'
+ thresholdCalculatorFlowletInstances: '2'
+ app_preferences:
+ aaiEnrichmentHost:
+ get_input: aaiEnrichmentHost
+ aaiEnrichmentIgnoreSSLCertificateErrors: 'true'
+ aaiEnrichmentPortNumber: '8443'
+ aaiEnrichmentProtocol: https
+ aaiEnrichmentUserName: DCAE
+ aaiEnrichmentUserPassword: DCAE
+ aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query
+ aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf
+ enableAAIEnrichment:
+ get_input: enableAAIEnrichment
+ enableAlertCEFFormat: 'false'
+ publisherContentType: application/json
+ publisherHostName:
+ get_input: publisherHostName
+ publisherHostPort: '3904'
+ publisherMaxBatchSize: '1'
+ publisherMaxRecoveryQueueSize: '100000'
+ publisherPollingInterval: '20000'
+ publisherProtocol: http
+ publisherTopicName: unauthenticated.DCAE_CL_OUTPUT
+ subscriberConsumerGroup: OpenDCAE-c12
+ subscriberConsumerId: c12
+ subscriberContentType: application/json
+ subscriberHostName:
+ get_input: subscriberHostName
+ subscriberHostPort: '3904'
+ subscriberMessageLimit: '-1'
+ subscriberPollingInterval: '30000'
+ subscriberProtocol: http
+ subscriberTimeoutMS: '-1'
+ subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT
+ tca_policy: '{"domain":"measurementsForVfScaling","metricsPerEventName":[{"eventName":"vFirewallBroadcastPackets","controlLoopSchemaType":"VNF","policyScope":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta","thresholdValue":300,"direction":"LESS_OR_EQUAL","severity":"MAJOR","closedLoopEventStatus":"ONSET"},{"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta","thresholdValue":700,"direction":"GREATER_OR_EQUAL","severity":"CRITICAL","closedLoopEventStatus":"ONSET"}]},{"eventName":"vLoadBalancer","controlLoopSchemaType":"VM","policyScope":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta","thresholdValue":300,"direction":"GREATER_OR_EQUAL","severity":"CRITICAL","closedLoopEventStatus":"ONSET"}]},{"eventName":"Measurement_vGMUX","controlLoopSchemaType":"VNF","policyScope":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value","thresholdValue":0,"direction":"EQUAL","severity":"MAJOR","closedLoopEventStatus":"ABATED"},{"closedLoopControlName":"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value","thresholdValue":0,"direction":"GREATER","severity":"CRITICAL","closedLoopEventStatus":"ONSET"}]}]}'
+ artifact_name: dcae-analytics-cdap-tca
+ artifact_version: 2.0.0
+ connections:
+ streams_publishes: []
+ streams_subscribes: []
+ jar_url: https://nexus.onap.org/service/local/repositories/releases/content/org/onap/dcaegen2/analytics/tca/dcae-analytics-cdap-tca/2.0.0/dcae-analytics-cdap-tca-2.0.0.jar
+ namespace: cdap_tca_hi_lo
+ programs:
+ - program_id: TCAVESCollectorFlow
+ program_type: flows
+ - program_id: TCADMaaPMRSubscriberWorker
+ program_type: workers
+ - program_id: TCADMaaPMRPublisherWorker
+ program_type: workers
+ service_component_type: cdap_app_tca
+ streamname: TCASubscriberOutputStream
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ connected_broker_dns_name:
+ get_input: connected_broker_dns_name
+
diff --git a/reference_templates/tcadocker-service.yaml-template b/reference_templates/tcadocker-service.yaml-template
new file mode 100644
index 0000000..92deaa4
--- /dev/null
+++ b/reference_templates/tcadocker-service.yaml-template
@@ -0,0 +1,192 @@
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+
+imports:
+ - "http://www.getcloudify.org/spec/cloudify/3.4/types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/dockerplugin/3.2.1/dockerplugin_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml"
+inputs:
+ aaiEnrichmentHost:
+ default: none
+ type: string
+ aaiEnrichmentPort:
+ default: 8443
+ type: string
+ cbs_host:
+ default: config-binding-service.dcae
+ type: string
+ cbs_port:
+ default: "10000"
+ type: string
+ consul_host:
+ default: consul-server.onap-consul
+ type: string
+ consul_port:
+ default: "8500"
+ type: string
+ dh_location_id:
+ default: zone1
+ type: string
+ dh_override:
+ default: component_dockerhost
+ type: string
+ dmaap_host:
+ default: dmaap.onap-message-router
+ type: string
+ dmaap_port:
+ default: 3904
+ type: string
+ enableAAIEnrichment:
+ default: false
+ type: string
+ enableRedisCaching:
+ default: false
+ type: string
+ external_port:
+ default: "32016"
+ description: "Port for CDAPgui to be exposed"
+ type: string
+ policy_id:
+ default: none
+ type: string
+ redisHosts:
+ type: string
+ tag_version:
+ default: "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.0.0"
+ type: string
+node_templates:
+ docker_service_host:
+ properties:
+ docker_host_override:
+ get_input: dh_override
+ location_id:
+ get_input: dh_location_id
+ type: dcae.nodes.SelectedDockerHost
+ tca_docker:
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ AAIHOST:
+ get_input: aaiEnrichmentHost
+ AAIPORT:
+ get_input: aaiEnrichmentPort
+ CBS_HOST:
+ get_input: cbs_host
+ CBS_PORT:
+ get_input: cbs_port
+ CONFIG_BINDING_SERVICE: config_binding_service
+ CONSUL_HOST:
+ get_input: consul_host
+ CONSUL_PORT:
+ get_input: consul_port
+ DMAAPHOST:
+ get_input: dmaap_host
+ DMAAPPORT:
+ get_input: dmaap_port
+ DMAAPPUBTOPIC: unauthenticated.DCAE_CL_OUTPUT
+ DMAAPSUBTOPIC: unauthenticated.VES_MEASUREMENT_OUTPUT
+# SERVICE_11011_IGNORE: "true"
+ SERVICE_11015_IGNORE: "true"
+ ports:
+ - concat: ["11011:", { get_input: external_port }]
+ stop:
+ inputs:
+ cleanup_image: true
+ properties:
+ application_config:
+ app_config:
+ appDescription: "DCAE Analytics Threshold Crossing Alert Application"
+ appName: dcae-tca
+ tcaAlertsAbatementTableName: TCAAlertsAbatementTable
+ tcaAlertsAbatementTableTTLSeconds: "1728000"
+ tcaSubscriberOutputStreamName: TCASubscriberOutputStream
+ tcaVESAlertsTableName: TCAVESAlertsTable
+ tcaVESAlertsTableTTLSeconds: "1728000"
+ tcaVESMessageStatusTableName: TCAVESMessageStatusTable
+ tcaVESMessageStatusTableTTLSeconds: "86400"
+ thresholdCalculatorFlowletInstances: "2"
+ app_preferences:
+ aaiEnrichmentHost:
+ get_input: aaiEnrichmentHost
+ aaiEnrichmentIgnoreSSLCertificateErrors: "true"
+ aaiEnrichmentPortNumber: "8443"
+ aaiEnrichmentProtocol: https
+ aaiEnrichmentUserName: DCAE
+ aaiEnrichmentUserPassword: DCAE
+ aaiVMEnrichmentAPIPath: /aai/v11/search/nodes-query
+ aaiVNFEnrichmentAPIPath: /aai/v11/network/generic-vnfs/generic-vnf
+ enableAAIEnrichment:
+ get_input: enableAAIEnrichment
+ enableAlertCEFFormat: "false"
+ enableRedisCaching:
+ get_input: enableRedisCaching
+ publisherContentType: application/json
+ publisherHostName:
+ get_input: dmaap_host
+ publisherHostPort:
+ get_input: dmaap_port
+ publisherMaxBatchSize: "1"
+ publisherMaxRecoveryQueueSize: "100000"
+ publisherPollingInterval: "20000"
+ publisherProtocol: http
+ publisherTopicName: unauthenticated.DCAE_CL_OUTPUT
+ redisHosts:
+ get_input: redisHosts
+ subscriberConsumerGroup: OpenDCAE-c12
+ subscriberConsumerId: c12
+ subscriberContentType: application/json
+ subscriberHostName:
+ get_input: dmaap_host
+ subscriberHostPort:
+ get_input: dmaap_port
+ subscriberMessageLimit: "-1"
+ subscriberPollingInterval: "30000"
+ subscriberProtocol: http
+ subscriberTimeoutMS: "-1"
+ subscriberTopicName: unauthenticated.VES_MEASUREMENT_OUTPUT
+ tca_policy: "{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ONSET\"},{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":700,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"Measurement_vGMUX\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ABATED\"},{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"GREATER\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]}]}"
+ docker_config:
+ healthcheck:
+ endpoint: /
+ interval: 15s
+ timeout: 1s
+ type: http
+ image:
+ get_input: tag_version
+ service_component_type: dcaegen2-analytics_tca
+ relationships:
+ -
+ target: docker_service_host
+ type: dcae.relationships.component_contained_in
+ -
+ target: tca_policy
+ type: cloudify.relationships.depends_on
+ type: dcae.nodes.DockerContainerForComponentsUsingDmaap
+ tca_policy:
+ properties:
+ policy_id:
+ get_input: policy_id
+ type: dcae.nodes.policy
+
diff --git a/reference_templates/test_dr_mr.yaml-template b/reference_templates/test_dr_mr.yaml-template
new file mode 100644
index 0000000..4667186
--- /dev/null
+++ b/reference_templates/test_dr_mr.yaml-template
@@ -0,0 +1,121 @@
+# ================================================================================
+# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.13/k8splugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dmaap/dmaap.yaml
+
+inputs:
+ topic00_name:
+ type: string
+ default: "topic00"
+ feed00_name:
+ type: string
+ default: "feed00"
+ feed00_desc:
+ type: string
+ default: "Test feed from orchestrator"
+ location:
+ type: string
+ default: "san-francisco"
+ username:
+ type: string
+ default: "drdeliver"
+ password:
+ type: string
+ default: "1loveDataR0uter"
+ delivery_url:
+ type: string
+ default: "https://example.com/whatever"
+
+node_templates:
+
+ feed00:
+ type: ccsdk.nodes.Feed
+ properties:
+ feed_name: { get_input: feed00_name }
+ feed_description: { get_input: feed00_desc }
+ feed_version: 7.0.19
+ aspr_classification: "unclassified"
+
+ topic00:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic00_name }
+
+
+ client00:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+
+ properties:
+ service_component_type: 'nginx-web'
+ image: nginx
+ docker_config:
+ healthcheck:
+ type: "http"
+ endpoint: "/"
+ streams_publishes:
+ - name: feed00
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: data_router
+ username: { get_input: username }
+ password: { get_input: password }
+ delivery_url: { get_input: delivery_url }
+ streams_subscribes:
+ - name: topic00
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfSubscriber
+ type: message_router
+
+ relationships:
+ - type: ccsdk.relationships.publish_files
+ target: feed00
+ - type: ccsdk.relationships.subscribe_to_events
+ target: topic00
+
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ ports:
+ - '80:0'
+
+outputs:
+
+ feed00_publish_url:
+ description: "Feed 00 publish URL"
+ value: { get_attribute: [feed00, publish_url]}
+
+ feed00_logurl:
+ description: "Feed 00 logging URL"
+ value: { get_attribute: [feed00, log_url]}
+
+ feed00_feed_id:
+ description: "Feed 00 feed id"
+ value: { get_attribute: [feed00, feed_id]}
+
+ client00_feed00:
+ description: "Feed 00 data on client00"
+ value: { get_attribute: [client00, feed00]}
+
+ client00_topic00:
+ description: "Topic 00 data on client00"
+ value: { get_attribute: [client00, topic00]}
+
diff --git a/reference_templates/test_dr_pubsub.yaml-template b/reference_templates/test_dr_pubsub.yaml-template
new file mode 100644
index 0000000..dfde13a
--- /dev/null
+++ b/reference_templates/test_dr_pubsub.yaml-template
@@ -0,0 +1,145 @@
+# ================================================================================
+# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.13/k8splugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dmaap/dmaap.yaml
+
+inputs:
+ feed00_name:
+ type: string
+ default: "feed00"
+ feed00_desc:
+ type: string
+ default: "Test feed from orchestrator"
+ location:
+ type: string
+ default: "san-francisco"
+ username:
+ type: string
+ default: "drdeliver"
+ password:
+ type: string
+ default: "1loveDataR0uter"
+ delivery_url:
+ type: string
+ default: "https://example.com/whatever"
+
+node_templates:
+
+ feed00:
+ type: ccsdk.nodes.Feed
+ properties:
+ feed_name: { get_input: feed00_name }
+ feed_description: { get_input: feed00_desc }
+ feed_version: 1.0.9
+ aspr_classification: "unclassified"
+
+ client00:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+
+ properties:
+ service_component_type: 'nginx-web'
+ image: nginx
+ docker_config:
+ healthcheck:
+ type: "http"
+ endpoint: "/"
+ streams_publishes:
+ - name: feed00
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: data_router
+ username: { get_input: username }
+ password: { get_input: password }
+ delivery_url: { get_input: delivery_url }
+
+ relationships:
+ - type: ccsdk.relationships.publish_files
+ target: feed00
+
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ ports:
+ - '80:0'
+
+ client01:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+
+ properties:
+ service_component_type: 'nginx-web'
+ image: nginx
+ docker_config:
+ healthcheck:
+ type: "http"
+ endpoint: "/"
+ application_config:
+ isSelfServeComponent: false
+ services_calls: {}
+ streams_subscribes:
+ ONAP-TEST-SUB-DR:
+ dmaap_info: <<feed00>>
+ type: data_router
+ streams_subscribes:
+ - name: feed00
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfSubscriber
+ type: data_router
+ route: ONAP-TEST-SUB-DR
+ username: { get_input: username }
+ password: { get_input: password }
+ delivery_url: { get_input: delivery_url }
+
+ relationships:
+ - type: ccsdk.relationships.subscribe_to_files
+ target: feed00
+
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ ports:
+ - '80:0'
+
+
+outputs:
+
+ feed00_publish_url:
+ description: "Feed 00 publish URL"
+ value: { get_attribute: [feed00, publish_url]}
+
+ feed00_logurl:
+ description: "Feed 00 logging URL"
+ value: { get_attribute: [feed00, log_url]}
+
+ feed00_feed_id:
+ description: "Feed 00 feed id"
+ value: { get_attribute: [feed00, feed_id]}
+
+ client00_feed00:
+ description: "Feed 00 data on client00"
+ value: { get_attribute: [client00, feed00]}
+
+ client01_feed00:
+ description: "Feed 00 data on client01"
+ value: { get_attribute: [client01, feed00]}
+
+
diff --git a/reference_templates/test_mr_multipub.yaml-template b/reference_templates/test_mr_multipub.yaml-template
new file mode 100644
index 0000000..84ae247
--- /dev/null
+++ b/reference_templates/test_mr_multipub.yaml-template
@@ -0,0 +1,178 @@
+# ================================================================================
+# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.13/k8splugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dmaap/dmaap.yaml
+
+inputs:
+ topic00_name:
+ type: string
+ default: "topic00"
+ topic01_name:
+ type: string
+ default: "topic01"
+ topic02_name:
+ type: string
+ default: "topic02"
+ topic03_name:
+ type: string
+ default: "topic03"
+ topic04_name:
+ type: string
+ default: "topic04"
+ topic05_name:
+ type: string
+ default: "topic05"
+ topic06_name:
+ type: string
+ default: "topic06"
+ location:
+ type: string
+ default: "san-francisco"
+
+node_templates:
+
+ topic00:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic00_name }
+
+ topic01:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic01_name }
+
+ topic02:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic02_name }
+
+ topic03:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic03_name }
+
+ topic04:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic04_name }
+
+ topic05:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic05_name }
+
+ topic06:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic06_name }
+
+ client00:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+
+ properties:
+ service_component_type: 'nginx-web'
+ image: nginx
+ docker_config:
+ healthcheck:
+ type: "http"
+ endpoint: "/"
+ streams_publishes:
+ - name: topic00
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ - name: topic01
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ - name: topic02
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ - name: topic03
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ - name: topic04
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ - name: topic05
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ - name: topic06
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+
+ relationships:
+ - type: ccsdk.relationships.publish_events
+ target: topic00
+ - type: ccsdk.relationships.publish_events
+ target: topic01
+ - type: ccsdk.relationships.publish_events
+ target: topic02
+ - type: ccsdk.relationships.publish_events
+ target: topic03
+ - type: ccsdk.relationships.publish_events
+ target: topic04
+ - type: ccsdk.relationships.publish_events
+ target: topic05
+ - type: ccsdk.relationships.publish_events
+ target: topic06
+
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ ports:
+ - '80:0'
+
+outputs:
+ topic00_data:
+ description: "Topic 00 data on client00"
+ value: { get_attribute: [client00, topic00]}
+
+ topic01_data:
+ description: "Topic 01 data on client00"
+ value: { get_attribute: [client00, topic01]}
+
+ topic02_data:
+ description: "Topic 02 data on client00"
+ value: { get_attribute: [client00, topic02]}
+
+ topic03_data:
+ description: "Topic 03 data on client00"
+ value: { get_attribute: [client00, topic03]}
+
+ topic04_data:
+ description: "Topic 04 data on client00"
+ value: { get_attribute: [client00, topic04]}
+
+ topic05_data:
+ description: "Topic 05 data on client00"
+ value: { get_attribute: [client00, topic05]}
+
+ topic06_data:
+ description: "Topic 06 data on client00"
+ value: { get_attribute: [client00, topic06]}
+
diff --git a/reference_templates/test_mr_multisub.yaml-template b/reference_templates/test_mr_multisub.yaml-template
new file mode 100644
index 0000000..ad84a9c
--- /dev/null
+++ b/reference_templates/test_mr_multisub.yaml-template
@@ -0,0 +1,186 @@
+# ================================================================================
+# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.13/k8splugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dmaap/dmaap.yaml
+
+inputs:
+ topic00_name:
+ type: string
+ default: "topic00"
+ topic01_name:
+ type: string
+ default: "topic01"
+ topic02_name:
+inputs:
+ topic00_name:
+ type: string
+ default: "topic00"
+ topic01_name:
+ type: string
+ default: "topic01"
+ topic02_name:
+ type: string
+ default: "topic02"
+ topic03_name:
+ type: string
+ default: "topic03"
+ topic04_name:
+ type: string
+ default: "topic04"
+ topic05_name:
+ type: string
+ default: "topic05"
+ topic06_name:
+ type: string
+ default: "topic06"
+ location:
+ type: string
+ default: "san-francisco"
+
+node_templates:
+
+ topic00:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic00_name }
+
+ topic01:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic01_name }
+
+ topic02:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic02_name }
+
+ topic03:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic03_name }
+
+ topic04:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic04_name }
+
+ topic05:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic05_name }
+
+ topic06:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic06_name }
+
+ client00:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+
+ properties:
+ service_component_type: 'nginx-web'
+ image: nginx
+ docker_config:
+ healthcheck:
+ type: "http"
+ endpoint: "/"
+ streams_subscribes:
+ - name: topic00
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ - name: topic01
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ - name: topic02
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ - name: topic03
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ - name: topic04
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ - name: topic05
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ - name: topic06
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+
+ relationships:
+ - type: ccsdk.relationships.subscribe_to_events
+ target: topic00
+ - type: ccsdk.relationships.subscribe_to_events
+ target: topic01
+ - type: ccsdk.relationships.subscribe_to_events
+ target: topic02
+ - type: ccsdk.relationships.subscribe_to_events
+ target: topic03
+ - type: ccsdk.relationships.subscribe_to_events
+ target: topic04
+ - type: ccsdk.relationships.subscribe_to_events
+ target: topic05
+ - type: ccsdk.relationships.subscribe_to_events
+ target: topic06
+
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ ports:
+ - '80:0'
+
+outputs:
+ topic00_data:
+ description: "Topic 00 data on client00"
+ value: { get_attribute: [client00, topic00]}
+
+ topic01_data:
+ description: "Topic 01 data on client00"
+ value: { get_attribute: [client00, topic01]}
+
+ topic02_data:
+ description: "Topic 02 data on client00"
+ value: { get_attribute: [client00, topic02]}
+
+ topic03_data:
+ description: "Topic 03 data on client00"
+ value: { get_attribute: [client00, topic03]}
+
+ topic04_data:
+ description: "Topic 04 data on client00"
+ value: { get_attribute: [client00, topic04]}
+
+ topic05_data:
+ description: "Topic 05 data on client00"
+ value: { get_attribute: [client00, topic05]}
+
+ topic06_data:
+ description: "Topic 06 data on client00"
+ value: { get_attribute: [client00, topic06]}
+
diff --git a/reference_templates/test_mr_pubsub.yaml-template b/reference_templates/test_mr_pubsub.yaml-template
new file mode 100644
index 0000000..0d09216
--- /dev/null
+++ b/reference_templates/test_mr_pubsub.yaml-template
@@ -0,0 +1,89 @@
+# ================================================================================
+# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.13/k8splugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dmaap/dmaap.yaml
+
+inputs:
+ topic00_name:
+ type: string
+ default: "topic00"
+ topic01_name:
+ type: string
+ default: "topic01"
+ location:
+ type: string
+ default: "san-francisco"
+
+node_templates:
+
+ topic00:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic00_name }
+
+ topic01:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic01_name }
+
+ web_server:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+
+ properties:
+ service_component_type: 'nginx-web'
+ image: nginx
+ docker_config:
+ healthcheck:
+ type: "http"
+ endpoint: "/"
+ streams_publishes:
+ - name: topic00
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ streams_subscribes:
+ - name: topic01
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfSubscriber
+ type: message_router
+
+ relationships:
+ - type: ccsdk.relationships.publish_events
+ target: topic00
+ - type: ccsdk.relationships.subscribe_to_events
+ target: topic01
+
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ ports:
+ - '80:0'
+outputs:
+
+ topic00_data:
+ description: "Topic 00 data on client00"
+ value: { get_attribute: [web_server, topic00]}
+
+ topic01_data:
+ description: "Topic 01 data on client00"
+ value: { get_attribute: [web_server, topic01]}
+
diff --git a/reference_templates/test_mr_pubsub_extra.yaml-template b/reference_templates/test_mr_pubsub_extra.yaml-template
new file mode 100644
index 0000000..f034e6c
--- /dev/null
+++ b/reference_templates/test_mr_pubsub_extra.yaml-template
@@ -0,0 +1,93 @@
+# ================================================================================
+# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/k8splugin/1.4.13/k8splugin_types.yaml
+ - {{ ONAPTEMPLATE_RAWREPOURL_org_onap_ccsdk_platform_plugins_releases }}/type_files/dmaap/dmaap.yaml
+
+inputs:
+ topic00_name:
+ type: string
+ default: "topic00"
+ topic01_name:
+ type: string
+ default: "topic01"
+ location:
+ type: string
+ default: "san-francisco"
+
+node_templates:
+
+ topic00:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic00_name }
+ replication_case: REPLICATION_EDGE_TO_CENTRAL_TO_GLOBAL
+ global_mr_url: message-router
+
+ topic01:
+ type: ccsdk.nodes.Topic
+ properties:
+ topic_name: { get_input: topic01_name }
+ replication_case: REPLICATION_EDGE_TO_CENTRAL
+
+ client00:
+ type: dcae.nodes.ContainerizedServiceComponentUsingDmaap
+
+ properties:
+ service_component_type: 'nginx-web'
+ image: nginx
+ docker_config:
+ healthcheck:
+ type: "http"
+ endpoint: "/"
+ streams_publishes:
+ - name: topic00
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfPublisher
+ type: message_router
+ streams_subscribes:
+ - name: topic01
+ location: { get_input: location }
+ client_role: org.onap.dcae.pnfSubscriber
+ type: message_router
+
+ relationships:
+ - type: ccsdk.relationships.publish_events
+ target: topic00
+ - type: ccsdk.relationships.subscribe_to_events
+ target: topic01
+
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ ports:
+ - '80:0'
+
+outputs:
+
+ topic00_data:
+ description: "Topic 00 data on client00"
+ value: { get_attribute: [client00, topic00]}
+
+ topic01_data:
+ description: "Topic 01 data on client00"
+ value: { get_attribute: [client00, topic01]}
+
diff --git a/reference_templates/ves.yaml-template b/reference_templates/ves.yaml-template
new file mode 100644
index 0000000..0653e3d
--- /dev/null
+++ b/reference_templates/ves.yaml-template
@@ -0,0 +1,135 @@
+# -*- indent-tabs-mode: nil -*- # vi: set expandtab:
+#
+# ============LICENSE_START====================================================
+# org.onap.dcae
+# =============================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# 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.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+
+imports:
+ - "http://www.getcloudify.org/spec/cloudify/3.4/types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/type_files/dockerplugin/2/dockerplugin_types.yaml"
+ - "{{ ONAPTEMPLATE_RAWREPOURL_org_onap_dcaegen2_platform_plugins_releases }}/relationshipplugin/1.0.0/relationshipplugin_types.yaml"
+
+inputs:
+ ves_other_publish_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.SEC_OTHER_OUTPUT"
+ ves_heartbeat_publish_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT"
+ ves_fault_publish_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.SEC_FAULT_OUTPUT"
+ ves_measurement_publish_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT"
+ ves_notification_publish_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
+ ves_pnfRegistration_publish_url:
+ type: string
+ default: "http://10.0.11.1:3904/events/unauthenticated.VES_PNFREG_OUTPUT"
+ dh_override:
+ type: string
+ default: "component_dockerhost"
+ dh_location_id:
+ type: string
+ default: "zone1"
+ tag_version:
+ type: string
+ default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.3.1"
+
+node_templates:
+ docker_collector_host:
+ properties:
+ docker_host_override:
+ get_input: dh_override
+ location_id:
+ get_input: dh_location_id
+ type: dcae.nodes.SelectedDockerHost
+ ves:
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ stop:
+ inputs:
+ cleanup_image: true
+ start:
+ inputs:
+ ports:
+ - '8080:8080'
+ properties:
+ application_config:
+ collector.dmaap.streamid: fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration
+ collector.inputQueue.maxPending: "8096"
+ collector.keystore.alias: "dynamically generated"
+ collector.keystore.file.location: /opt/app/VESCollector/etc/keystore
+ collector.keystore.passwordfile: /opt/app/VESCollector/etc/passwordfile
+ collector.schema.checkflag: "1"
+ collector.schema.file: "{\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.json\",\"v7\":\"./etc/CommonEventFormat_30.0.1.json\"}
+ collector.service.port: "8080"
+ collector.service.secure.port: "8443"
+ event.transform.flag: "0"
+ header.authflag: "0"
+ header.authlist: "userid1,base64encodepwd1|userid2,base64encodepwd2"
+ services_calls: []
+ streams_publishes:
+ ves-fault:
+ dmaap_info:
+ topic_url:
+ get_input: ves_fault_publish_url
+ type: message_router
+ ves-measurement:
+ dmaap_info:
+ topic_url:
+ get_input: ves_measurement_publish_url
+ type: message_router
+ ves-notification:
+ dmaap_info:
+ topic_url:
+ get_input: ves_notification_publish_url
+ type: message_router
+ ves-pnfRegistration:
+ dmaap_info:
+ topic_url:
+ get_input: ves_pnfRegistration_publish_url
+ type: message_router
+ ves-heartbeat:
+ dmaap_info:
+ topic_url:
+ get_input: ves_heartbeat_publish_url
+ type: message_router
+ ves-other:
+ dmaap_info:
+ topic_url:
+ get_input: ves_other_publish_url
+ type: message_router
+ collector.dynamic.config.update.frequency: "5"
+ docker_config:
+ healthcheck:
+ endpoint: /healthcheck
+ interval: 15s
+ timeout: 1s
+ type: http
+ image:
+ get_input: tag_version
+ service_component_type: dcaegen2-collectors-ves
+ relationships:
+ - type: dcae.relationships.component_contained_in
+ target: docker_collector_host
+ type: dcae.nodes.DockerContainerForComponentsUsingDmaap