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 policy on Openstack
20 ###########################################################
22 tosca_definitions_version: cloudify_dsl_1_3
25 This blueprint creates a ONAP policy
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
74 default: http://gerrit.onap.org/r/policy/docker.git
81 A Ubuntu 14.04 image, along with the usual
83 default: Ubuntu 16.04 LTS Generic
87 A machine type with more than 2 CPUs, 4096 GB RAM, and 8 GB of disk space.
88 You might want to use 4 CPUs, 8192 MB RAM for the master.
94 User for connecting to agent VM
99 description: openstack security_group
104 OpenStack keypair name
119 description: username to authenticate to OpenStack
123 description: OpenStack tenant password for openstack_username user
125 openstack_tenant_name:
127 description: OpenStack tenant for VM deploy
131 description: Authentication URL for OpenStack
135 description: OpenStack region
138 openstack_credentials: &openstack_credentials
139 username: { get_input: openstack_username }
140 password: { get_input: openstack_password }
141 tenant_name: { get_input: openstack_tenant_name }
142 auth_url: { get_input: openstack_auth_url }
143 region: { get_input: openstack_region }
148 type: cloudify.openstack.nodes.KeyPair
150 private_key_path: { get_input: key_filename }
151 use_external_resource: true
152 resource_id: { get_input: keypair_name }
153 openstack_config: *openstack_credentials
156 type: cloudify.openstack.nodes.Network
158 use_external_resource: true
159 resource_id: { get_input: app_subnet }
160 openstack_config: *openstack_credentials
163 type: cloudify.openstack.nodes.Network
165 openstack_config: *openstack_credentials
166 use_external_resource: true
167 resource_id: { get_input: external_network}
170 type: cloudify.openstack.nodes.SecurityGroup
172 openstack_config: *openstack_credentials
173 use_external_resource: true
174 resource_id: { get_input: security_group }
177 type: cloudify.openstack.nodes.Port
179 openstack_config: *openstack_credentials
181 - type: cloudify.relationships.contained_in
183 - type: cloudify.openstack.port_connected_to_security_group
184 target: app_security_group
187 type: cloudify.openstack.nodes.FloatingIP
189 openstack_config: *openstack_credentials
191 cloudify.interfaces.lifecycle:
195 floating_network_name: { get_input: external_network }
198 type: cloudify.openstack.nodes.Server
200 openstack_config: *openstack_credentials
202 image: { get_input: image }
203 flavor: { get_input: flavor }
204 resource_id: { get_input: vm_instancename }
205 management_network_name: { get_input: app_subnet }
206 ip: { get_attribute: [VM_001_floating_ip, floating_ip_address] }
208 - type: cloudify.openstack.server_connected_to_floating_ip
209 target: VM_001_floating_ip
210 - type: cloudify.openstack.server_connected_to_keypair
212 - type: cloudify.openstack.server_connected_to_port
213 target: VM_001_fixed_ip
217 type: cloudify.nodes.SoftwareComponent
220 cloudify.interfaces.lifecycle:
222 implementation: fabric.fabric_plugin.tasks.run_script
224 script_path: scripts/policy.sh
228 [{ get_attribute: [VM_001_floating_ip, floating_ip_address]},
229 { get_attribute: [VM_001_fixed_ip, fixed_ip_address]},
230 { get_input: nexus_repo },
231 { get_input: docker_repo},
232 { get_input: nexus_username },
233 { get_input: nexus_password },
234 { get_input: artifacts_version },
235 { get_input: dns_ip},
236 { get_input: docker_version },
237 { get_input: gerrit_branch },
239 { get_input: external_dns},
240 { get_input: policy_repo}]
242 host_string: { get_attribute: [VM_001_floating_ip, floating_ip_address]}
243 user: { get_input: ssh_user }
244 key_filename: { get_input: key_filename }
246 - type: cloudify.relationships.contained_in
248 - type: cloudify.relationships.depends_on
249 target: VM_001_floating_ip
253 description: informations about Policy
255 ip: { get_attribute: [VM_001_floating_ip, floating_ip_address] }