Skip to content

OpenStack: Add possibility to boot from volumes #46

@Sidiox

Description

@Sidiox

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions