@@ -2,14 +2,17 @@ tosca_definitions_version: cloudify_dsl_1_3
22
33imports :
44 - http://www.getcloudify.org/spec/cloudify/4.5/types.yaml
5- - https://raw.githubusercontent.com/cloudify-incubator/cloudify-utilities-plugin/1.9.5 /plugin.yaml
6- - https://raw.githubusercontent.com/cloudify-incubator/cloudify-libvirt-plugin/0.7 .0/plugin.yaml
5+ - https://raw.githubusercontent.com/cloudify-incubator/cloudify-utilities-plugin/1.12.3 /plugin.yaml
6+ - https://raw.githubusercontent.com/cloudify-incubator/cloudify-libvirt-plugin/0.8 .0/plugin.yaml
77
88inputs :
99
1010 agent_password :
1111 default : passw0rd
1212
13+ agent_user :
14+ default : ubuntu
15+
1316node_templates :
1417
1518 common_network :
@@ -49,6 +52,62 @@ node_templates:
4952 expire : False
5053 ssh_pwauth : True
5154
55+ common_pool :
56+ type : cloudify.libvirt.pool
57+ interfaces :
58+ cloudify.interfaces.lifecycle :
59+ create :
60+ inputs :
61+ params :
62+ capacity : 80
63+
64+ cloudinit_volume :
65+ type : cloudify.libvirt.volume
66+ interfaces :
67+ cloudify.interfaces.lifecycle :
68+ create :
69+ inputs :
70+ params :
71+ pool : { get_attribute: [common_pool, resource_id]}
72+ capacity : 1
73+ allocation : 1
74+ relationships :
75+ - target : common_pool
76+ type : cloudify.relationships.depends_on
77+
78+ flash_volume :
79+ type : cloudify.libvirt.volume
80+ interfaces :
81+ cloudify.interfaces.lifecycle :
82+ create :
83+ inputs :
84+ params :
85+ pool : { get_attribute: [common_pool, resource_id]}
86+ capacity : 64
87+ allocation : 64
88+ relationships :
89+ - target : common_pool
90+ type : cloudify.relationships.depends_on
91+
92+ cloud_init_image :
93+ type : cloudify.libvirt.ISO9660
94+ interfaces :
95+ cloudify.interfaces.lifecycle :
96+ create :
97+ inputs :
98+ params :
99+ pool : { get_attribute: [common_pool, resource_id]}
100+ volume : { get_attribute: [cloudinit_volume, resource_id]}
101+ files :
102+ meta-data : >
103+ instance-id: localhost
104+ user-data : { get_attribute: [cloud_init, cloud_config ] }
105+ relationships :
106+ - target : cloud_init
107+ type : cloudify.relationships.depends_on
108+ - target : cloudinit_volume
109+ type : cloudify.relationships.depends_on
110+
52111 disk_clone :
53112 type : cloudify.nodes.ApplicationServer
54113 interfaces :
@@ -62,12 +121,6 @@ node_templates:
62121 configure :
63122 implementation : scripts/copy_disk.py
64123 executor : central_deployment_agent
65- start :
66- implementation : scripts/copy_disk_arm.sh
67- executor : central_deployment_agent
68- stop :
69- implementation : scripts/remove_disk_arm.sh
70- executor : central_deployment_agent
71124 delete :
72125 implementation : scripts/remove_disk.sh
73126 executor : central_deployment_agent
@@ -88,16 +141,16 @@ node_templates:
88141 inputs :
89142 params :
90143 memory_size : 524288
91- nvram : { get_attribute: [disk_clone, bios_flash ] }
144+ nvram : { get_attribute: [flash_volume, params, path ] }
92145 disks :
93146 - bus : scsi
94147 dev : sda
95148 file : { get_attribute: [disk_clone, vm_image] }
96149 type : qcow2
97150 - bus : scsi
98151 dev : sdb
99- file : { get_attribute: [disk_clone, vm_cloudinit ] }
100- type : qcow2
152+ file : { get_attribute: [cloudinit_volume, params, path ] }
153+ type : raw
101154 networks :
102155 - network : { get_attribute: [common_network, resource_id] }
103156 dev : macvtap0
@@ -110,6 +163,10 @@ node_templates:
110163 type : cloudify.libvirt.relationships.connected_to
111164 - target : disk_clone
112165 type : cloudify.relationships.contained_in
166+ - target : cloud_init_image
167+ type : cloudify.relationships.depends_on
168+ - target : flash_volume
169+ type : cloudify.relationships.depends_on
113170
114171 example_node :
115172 type : cloudify.nodes.WebServer
0 commit comments