1 # ============LICENSE_START==========================================
2 # ===================================================================
3 # Copyright (c) 2017 AT&T
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #============LICENSE_END============================================
18 ###########################################################
19 # This Blueprint installs ONAP appc on Openstack
20 ###########################################################
22 tosca_definitions_version: cloudify_dsl_1_3
25 This blueprint creates a ONAP APP-C
28 - http://www.getcloudify.org/spec/cloudify/4.1/types.yaml
29 - http://cloudify.co/spec/openstack-plugin/2.2.0/plugin.yaml
30 - http://cloudify.co/spec/fabric-plugin/1.5/plugin.yaml
31 - http://www.getcloudify.org/spec/diamond-plugin/1.3.3/plugin.yaml
36 default: https://nexus.onap.org/content/sites/raw
40 default: nexus3.onap.org:10001
52 default: 1.1.0-SNAPSHOT
78 default: http://gerrit.onap.org/r/appc/deployment.git
85 A Ubuntu 14.04 image, along with the usual
87 default: Ubuntu 14.04 LTS Generic
91 A machine type with more than 2 CPUs, 4096 GB RAM, and 8 GB of disk space.
92 You might want to use 4 CPUs, 8192 MB RAM for the master.
98 User for connecting to agent VM
103 description: openstack security_group
108 OpenStack keypair name
123 description: username to authenticate to OpenStack
127 description: OpenStack tenant password for openstack_username user
129 openstack_tenant_name:
131 description: OpenStack tenant for VM deploy
135 description: Authentication URL for OpenStack
139 description: OpenStack region
146 openstack_credentials: &openstack_credentials
147 username: { get_input: openstack_username }
148 password: { get_input: openstack_password }
149 tenant_name: { get_input: openstack_tenant_name }
150 auth_url: { get_input: openstack_auth_url }
151 region: { get_input: openstack_region }
156 type: cloudify.openstack.nodes.KeyPair
158 private_key_path: { get_input: key_filename }
159 use_external_resource: true
160 resource_id: { get_input: keypair_name }
161 openstack_config: *openstack_credentials
164 type: cloudify.openstack.nodes.Network
166 use_external_resource: true
167 resource_id: { get_input: app_subnet }
168 openstack_config: *openstack_credentials
171 type: cloudify.openstack.nodes.Network
173 openstack_config: *openstack_credentials
174 use_external_resource: true
175 resource_id: { get_input: external_network}
178 type: cloudify.openstack.nodes.SecurityGroup
180 openstack_config: *openstack_credentials
181 use_external_resource: true
182 resource_id: { get_input: security_group }
185 type: cloudify.openstack.nodes.Port
187 openstack_config: *openstack_credentials
189 - type: cloudify.relationships.contained_in
191 - type: cloudify.openstack.port_connected_to_security_group
192 target: app_security_group
195 type: cloudify.openstack.nodes.FloatingIP
197 openstack_config: *openstack_credentials
199 cloudify.interfaces.lifecycle:
203 floating_network_name: { get_input: external_network }
206 type: cloudify.openstack.nodes.Server
208 openstack_config: *openstack_credentials
210 image: { get_input: image }
211 flavor: { get_input: flavor }
212 resource_id: { get_input: vm_instancename }
213 management_network_name: { get_input: app_subnet }
214 ip: { get_attribute: [VM_001_floating_ip, floating_ip_address] }
216 - type: cloudify.openstack.server_connected_to_floating_ip
217 target: VM_001_floating_ip
218 - type: cloudify.openstack.server_connected_to_keypair
220 - type: cloudify.openstack.server_connected_to_port
221 target: VM_001_fixed_ip
225 type: cloudify.nodes.SoftwareComponent
228 cloudify.interfaces.lifecycle:
230 implementation: fabric.fabric_plugin.tasks.run_script
232 script_path: scripts/appc.sh
236 [{ get_attribute: [VM_001_floating_ip, floating_ip_address]},
237 { get_attribute: [VM_001_fixed_ip, fixed_ip_address]},
238 { get_input: nexus_repo },
239 { get_input: docker_repo},
240 { get_input: nexus_username },
241 { get_input: nexus_password },
242 { get_input: artifacts_version },
243 { get_input: dns_ip},
244 { get_input: gerrit_branch },
246 { get_input: external_dns},
247 { get_input: dmaap_topic},
248 { get_input: openstack_username},
249 { get_input: openstack_tenant_name},
250 { get_input: openstack_password},
251 { get_input: openstack_region},
252 { get_input: openstack_auth_url},
253 { get_input: appc_repo},
254 { get_input: docker_version },
255 { get_input: dgbuilder_docker}]
257 host_string: { get_attribute: [VM_001_floating_ip, floating_ip_address]}
258 user: { get_input: ssh_user }
259 key_filename: { get_input: key_filename }
261 - type: cloudify.relationships.contained_in
263 - type: cloudify.relationships.depends_on
264 target: VM_001_floating_ip
268 description: informations about app-c
270 ip: { get_attribute: [VM_001_floating_ip, floating_ip_address] }