Advertisement
alvise72

Esercitazione Heat: esempio avanzato

Oct 1st, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.04 KB | None | 0 0
  1. heat_template_version: 2013-05-23
  2.  
  3. description: Template basilare per creare una macchina virtuale connessa ad una LAN di progetto, con un floating IP e con un volume cinder collegato.
  4.  
  5. resources:
  6.   my_volume:
  7.     type: OS::Cinder::Volume
  8.     properties:
  9.       name: "myVolume"
  10.       size: 3
  11.      
  12.   my_instance:
  13.     type: OS::Nova::Server
  14.     properties:
  15.       name: "myVM"
  16.       key_name: KeyStudenteXY
  17.       image: Ubuntu x86_64
  18.       flavor: m1.small
  19.       security_groups: [SSH-Ping]
  20.       admin_pass: heattest
  21.       networks: [{"network": NetStudenteXY, "fixed_ip": XYZ.XYZ.XYZ.XYZ}]
  22.      
  23.   my_volume_attachment:
  24.     type: OS::Cinder::VolumeAttachment
  25.     properties:
  26.       volume_id: { get_resource: my_volume }
  27.       instance_uuid: { get_resource: my_instance }
  28.  
  29.   my_fip:
  30.     type: OS::Nova::FloatingIP
  31.     properties:
  32.       pool: External
  33.      
  34.   my_fip_association:
  35.     type: OS::Nova::FloatingIPAssociation
  36.     properties:
  37.       floating_ip: { get_resource: my_fip }
  38.       server_id: { get_resource: my_instance }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement