81 lines
1.9 KiB
YAML
81 lines
1.9 KiB
YAML
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 }]
|