1 ###########################################################
2 # This Blueprint installs ONAP policy on Openstack
3 ###########################################################
5 tosca_definitions_version: cloudify_dsl_1_3
8 This blueprint creates a ONAP policy
11 - http://www.getcloudify.org/spec/cloudify/4.1/types.yaml
12 - http://cloudify.co/spec/openstack-plugin/2.2.0/plugin.yaml
13 - http://cloudify.co/spec/fabric-plugin/1.5/plugin.yaml
14 - http://www.getcloudify.org/spec/diamond-plugin/1.3.3/plugin.yaml
19 default: https://nexus.onap.org/content/sites/raw
23 default: nexus3.onap.org:10001
35 default: 1.1.0-SNAPSHOT
57 default: http://gerrit.onap.org/r/policy/docker.git
64 A Ubuntu 14.04 image, along with the usual
66 default: Ubuntu 16.04 LTS Generic
70 A machine type with more than 2 CPUs, 4096 GB RAM, and 8 GB of disk space.
71 You might want to use 4 CPUs, 8192 MB RAM for the master.
77 User for connecting to agent VM
82 description: openstack security_group
87 OpenStack keypair name
102 description: username to authenticate to OpenStack
106 description: OpenStack tenant password for openstack_username user
108 openstack_tenant_name:
110 description: OpenStack tenant for VM deploy
114 description: Authentication URL for OpenStack
118 description: OpenStack region
121 openstack_credentials: &openstack_credentials
122 username: { get_input: openstack_username }
123 password: { get_input: openstack_password }
124 tenant_name: { get_input: openstack_tenant_name }
125 auth_url: { get_input: openstack_auth_url }
126 region: { get_input: openstack_region }
131 type: cloudify.openstack.nodes.KeyPair
133 private_key_path: { get_input: key_filename }
134 use_external_resource: true
135 resource_id: { get_input: keypair_name }
136 openstack_config: *openstack_credentials
139 type: cloudify.openstack.nodes.Network
141 use_external_resource: true
142 resource_id: { get_input: app_subnet }
143 openstack_config: *openstack_credentials
146 type: cloudify.openstack.nodes.Network
148 openstack_config: *openstack_credentials
149 use_external_resource: true
150 resource_id: { get_input: external_network}
153 type: cloudify.openstack.nodes.SecurityGroup
155 openstack_config: *openstack_credentials
156 use_external_resource: true
157 resource_id: { get_input: security_group }
160 type: cloudify.openstack.nodes.Port
162 openstack_config: *openstack_credentials
164 - type: cloudify.relationships.contained_in
166 - type: cloudify.openstack.port_connected_to_security_group
167 target: app_security_group
170 type: cloudify.openstack.nodes.FloatingIP
172 openstack_config: *openstack_credentials
174 cloudify.interfaces.lifecycle:
178 floating_network_name: { get_input: external_network }
181 type: cloudify.openstack.nodes.Server
183 openstack_config: *openstack_credentials
185 image: { get_input: image }
186 flavor: { get_input: flavor }
187 resource_id: { get_input: vm_instancename }
188 management_network_name: { get_input: app_subnet }
189 ip: { get_attribute: [VM_001_floating_ip, floating_ip_address] }
191 - type: cloudify.openstack.server_connected_to_floating_ip
192 target: VM_001_floating_ip
193 - type: cloudify.openstack.server_connected_to_keypair
195 - type: cloudify.openstack.server_connected_to_port
196 target: VM_001_fixed_ip
200 type: cloudify.nodes.SoftwareComponent
203 cloudify.interfaces.lifecycle:
205 implementation: fabric.fabric_plugin.tasks.run_script
207 script_path: scripts/policy.sh
211 [{ get_attribute: [VM_001_floating_ip, floating_ip_address]},
212 { get_attribute: [VM_001_fixed_ip, fixed_ip_address]},
213 { get_input: nexus_repo },
214 { get_input: docker_repo},
215 { get_input: nexus_username },
216 { get_input: nexus_password },
217 { get_input: artifacts_version },
218 { get_input: dns_ip},
219 { get_input: docker_version },
220 { get_input: gerrit_branch },
222 { get_input: external_dns},
223 { get_input: policy_repo}]
225 host_string: { get_attribute: [VM_001_floating_ip, floating_ip_address]}
226 user: { get_input: ssh_user }
227 key_filename: { get_input: key_filename }
229 - type: cloudify.relationships.contained_in
231 - type: cloudify.relationships.depends_on
232 target: VM_001_floating_ip
236 description: informations about Policy
238 ip: { get_attribute: [VM_001_floating_ip, floating_ip_address] }