Juniper / wistar

Wistar is a tool to help create and share network topologies of virtual machines. It is designed to be light weight enough to run on a laptop or a small dedicated server.
http://wistar.readthedocs.io/en/latest/
Apache License 2.0
156 stars 41 forks source link

OpenStack: Add possibility to boot from volumes #46

Open Sidiox opened 6 years ago

Sidiox commented 6 years ago

Currently the HOT template used for instances in OpenStack simply boots from an image, which takes up ephemeral storage on compute nodes. This should also make the use of thin allocated storage possible. This is especially useful for the control plane, since it's virtual size is 30GB

I propose to add the option to boot from volume as well via configuration.

The template would go from:

heat_template_version: '2013-05-23'
resources:
  t8_volumeTesti1:
    properties:
      flavor: m1.large
      image: cirros3
      name: t8_volumeTesti1
      networks:
      - port: {get_resource: t8_volumeTesti1_port0}
    type: OS::Nova::Server
  t8_volumeTesti1_port0:
    properties:
      fixed_ips:
      - {ip_address: 192.168.122.36}
      network_id: wistar_mgmt
    type: OS::Neutron::Port

to:

heat_template_version: '2013-05-23'
resources:
  t8_volumeTesti1:
    depends_on: t8_volumeTesti1_vol0
    properties:
      flavor: m1.large
      name: t8_volumeTesti1
      networks:
      - port: {get_resource: t8_volumeTesti1_port0}
      block_device_mapping: [{ device_name: "vda", volume_id  : { get_resource : t8_volumeTesti1_vol0}, delete_on_termination : "true" }]
    type: OS::Nova::Server
  t8_volumeTesti1_vol0:
    type: OS::Cinder::Volume
    properties:
      size: 10
      image: cirros3
  t8_volumeTesti1_port0:
    properties:
      fixed_ips:
      - {ip_address: 192.168.122.36}
      network_id: wistar_mgmt
    type: OS::Neutron::Port