diff --git a/heat_templates/ussuri/simple_instance.yaml b/heat_templates/ussuri/simple_instance.yaml new file mode 100644 index 0000000..e6199f2 --- /dev/null +++ b/heat_templates/ussuri/simple_instance.yaml @@ -0,0 +1,80 @@ +heat_template_version: queens + +parameters: + + image: + type: string + #default: ubuntu-bionic + default: 78bed194-ce02-4d6f-a110-56941b2e126b + description: glance image used to boot the server + + flavor: + type: string + default: dd281ac4-2662-4b55-8d7c-c11b076ab793 + description: flavor to use when booting the server + + volume-type: + type: string + default: cinder-t3 + description: flavor to use when booting the server + + network-id: + type: string + default: c6d41cc0-0296-40e4-8dd8-4f7ff8d850ae + description: test network to use + +resources: + + volume_test: + type: OS::Cinder::Volume + properties: + name: volume_test + size: 10 + volume_type: { get_param: volume-type } + + server_init: + type: OS::Heat::CloudConfig + properties: + cloud_config: + password: ubuntu + chpasswd: {expire: False} + ssh_pwauth: True + + server_test: + type: OS::Nova::Server + properties: + name: server_test + availability_zone: az-3 + config_drive: true + flavor: { get_param: flavor } + image: { get_param: image } + user_data_format: RAW + user_data: { get_resource: server_init } + networks: + - port: + get_resource: server_eth0 + + volume-attach: + type: OS::Cinder::VolumeAttachment + properties: + instance_uuid: { get_resource: server_test } + volume_id: { get_resource: volume_test } + + secgroup_test: + type: OS::Neutron::SecurityGroup + properties: + description: Allow ssh and ping + name: secgroup_test + rules: + - remote_ip_prefix: 0.0.0.0/0 + protocol: tcp + port_range_min: 22 + port_range_max: 22 + - remote_ip_prefix: 0.0.0.0/0 + protocol: icmp + + server_eth0: + type: OS::Neutron::Port + properties: + network_id: { get_param: network-id} + security_groups: [{ get_resource: secgroup_test }] diff --git a/heat_templates/ussuri/simple_instance_vol_attach.yaml b/heat_templates/ussuri/simple_instance_vol_attach.yaml new file mode 100644 index 0000000..17a89e1 --- /dev/null +++ b/heat_templates/ussuri/simple_instance_vol_attach.yaml @@ -0,0 +1,73 @@ +heat_template_version: queens + +parameters: + + image: + type: string + default: ubuntu-bionic + description: glance image used to boot the server + + flavor: + type: string + default: natp.xp.m1.small + description: flavor to use when booting the server + + volume-type: + type: string + default: cinder-t3 + description: The volume type to use for the volume that is going to be created + + volume-data: + type: string + description: The persistent volume to attach the instance to + +resources: + + volume_test: + type: OS::Cinder::Volume + properties: + name: volume_test + size: 10 + volume_type: { get_param: volume-type } + + server_test: + type: OS::Nova::Server + properties: + name: server_test + flavor: { get_param: flavor } + image: { get_param: image } + networks: + - port: + get_resource: server_eth0 + + volume-attach: + type: OS::Cinder::VolumeAttachment + properties: + instance_uuid: { get_resource: server_test } + volume_id: { get_resource: volume_test } + + volume-data: + type: OS::Cinder::VolumeAttachment + properties: + instance_uuid: { get_resource: server_test } + volume_id: { get_param: volume-data } + + secgroup_test: + type: OS::Neutron::SecurityGroup + properties: + description: Allow ssh and ping + name: secgroup_test + rules: + - remote_ip_prefix: 0.0.0.0/0 + protocol: tcp + port_range_min: 22 + port_range_max: 22 + - remote_ip_prefix: 0.0.0.0/0 + protocol: icmp + + server_eth0: + type: OS::Neutron::Port + properties: + network_id: test + security_groups: [{ get_resource: secgroup_test }] +