blob: fa01aaa5beac0918a5605fbd92ce9d62922d6aff [file] [log] [blame]
heat_template_version: queens
description: Single server instance fragment
parameters:
seed_net:
type: string
default: 'system-phys-2401'
seed_subnet_cfg01_ip:
type: string
default: "172.16.180.2"
seed_subnet_gateway_ip:
type: string
default: 172.16.180.1
seed_subnet_cidr:
type: string
default: 172.16.180.0/23
seed_subnet_dhcp:
type: boolean
default: false
seed_subnet_pool_start:
type: string
default: 172.16.180.3
seed_subnet_pool_end:
type: string
default: 172.16.180.61
nameservers:
type: comma_delimited_list
default: '172.18.176.6,172.16.180.1,8.8.8.8'
flavor:
type: string
default: kaas.medium
seed_instance_name:
type: string
default: mcc-mosk
key_pair:
type: string
# default: vkhlyunev
default: system-key-8133
seed_instance_domain:
type: string
default: msust
net_public:
type: string
default: public
availability_zone:
type: string
default: nova
instance_boot_timeout:
type: number
default: 600
env_name:
type: string
resources:
instance_wait_handle:
type: OS::Heat::WaitConditionHandle
instance_wait_condition:
type: OS::Heat::WaitCondition
depends_on: seed_instance
properties:
handle: { get_resource: instance_wait_handle }
timeout: { get_param: instance_boot_timeout }
seed_subnet:
type: OS::Neutron::Subnet
properties:
name: { list_join: ['-', [ { get_param: seed_net }, 'subnet', { get_param: env_name } ]] }
network: { get_param: seed_net }
gateway_ip: { get_param: seed_subnet_gateway_ip }
cidr: { get_param: seed_subnet_cidr }
enable_dhcp: { get_param: seed_subnet_dhcp }
dns_nameservers: { get_param: nameservers }
seed_port01:
type: OS::Neutron::Port
properties:
port_security_enabled: false
network_id: { get_param: seed_net }
fixed_ips:
- ip_address: { get_param: seed_subnet_cfg01_ip }
seed_instance:
type: OS::Nova::Server
depends_on: seed_subnet
properties:
image_update_policy: REBUILD
flavor: { get_param: flavor }
image: 'focal-server-cloudimg-amd64-20220419'
key_name: { get_param: key_pair }
availability_zone: { get_param: availability_zone }
name:
list_join:
- '.'
- [ { get_param: seed_instance_name }, { get_param: seed_instance_domain } ]
networks:
- port: { get_resource: seed_port01 }
user_data_format: RAW
user_data:
str_replace:
template: { get_file: mcc_seed_2401_userdata.yaml }
params:
$wait_condition_notify: { get_attr: [ instance_wait_handle, curl_cli ] }
$os_az: { get_param: availability_zone }
$nameservers: { get_param: nameservers }
outputs:
seed_ext_ip:
description: IP for ssh access
value: { get_param: seed_subnet_cfg01_ip }