blob: fa01aaa5beac0918a5605fbd92ce9d62922d6aff [file] [log] [blame]
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +04001heat_template_version: queens
2
3description: Single server instance fragment
4
5parameters:
6 seed_net:
7 type: string
8 default: 'system-phys-2401'
9 seed_subnet_cfg01_ip:
10 type: string
11 default: "172.16.180.2"
12 seed_subnet_gateway_ip:
13 type: string
14 default: 172.16.180.1
15 seed_subnet_cidr:
16 type: string
17 default: 172.16.180.0/23
Vladimir Khlyuneve03b04f2024-04-26 02:57:02 +040018 seed_subnet_dhcp:
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +040019 type: boolean
20 default: false
21 seed_subnet_pool_start:
22 type: string
23 default: 172.16.180.3
24 seed_subnet_pool_end:
25 type: string
26 default: 172.16.180.61
27 nameservers:
28 type: comma_delimited_list
29 default: '172.18.176.6,172.16.180.1,8.8.8.8'
30 flavor:
31 type: string
32 default: kaas.medium
Vladimir Khlyuneve03b04f2024-04-26 02:57:02 +040033 seed_instance_name:
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +040034 type: string
Vladimir Khlyuneve03b04f2024-04-26 02:57:02 +040035 default: mcc-mosk
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +040036 key_pair:
37 type: string
Vladimir Khlyuneve03b04f2024-04-26 02:57:02 +040038# default: vkhlyunev
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +040039 default: system-key-8133
40 seed_instance_domain:
41 type: string
42 default: msust
43 net_public:
44 type: string
45 default: public
46 availability_zone:
47 type: string
48 default: nova
49 instance_boot_timeout:
50 type: number
51 default: 600
Vladimir Khlyuneve03b04f2024-04-26 02:57:02 +040052 env_name:
53 type: string
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +040054
55resources:
56 instance_wait_handle:
57 type: OS::Heat::WaitConditionHandle
58
59 instance_wait_condition:
60 type: OS::Heat::WaitCondition
Vladimir Khlyuneve03b04f2024-04-26 02:57:02 +040061 depends_on: seed_instance
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +040062 properties:
63 handle: { get_resource: instance_wait_handle }
64 timeout: { get_param: instance_boot_timeout }
65
66 seed_subnet:
67 type: OS::Neutron::Subnet
68 properties:
69 name: { list_join: ['-', [ { get_param: seed_net }, 'subnet', { get_param: env_name } ]] }
70 network: { get_param: seed_net }
71 gateway_ip: { get_param: seed_subnet_gateway_ip }
72 cidr: { get_param: seed_subnet_cidr }
73 enable_dhcp: { get_param: seed_subnet_dhcp }
74 dns_nameservers: { get_param: nameservers }
75
76 seed_port01:
77 type: OS::Neutron::Port
78 properties:
79 port_security_enabled: false
80 network_id: { get_param: seed_net }
81 fixed_ips:
82 - ip_address: { get_param: seed_subnet_cfg01_ip }
83
84 seed_instance:
85 type: OS::Nova::Server
86 depends_on: seed_subnet
87 properties:
88 image_update_policy: REBUILD
89 flavor: { get_param: flavor }
90 image: 'focal-server-cloudimg-amd64-20220419'
91 key_name: { get_param: key_pair }
92 availability_zone: { get_param: availability_zone }
93 name:
94 list_join:
95 - '.'
96 - [ { get_param: seed_instance_name }, { get_param: seed_instance_domain } ]
97 networks:
98 - port: { get_resource: seed_port01 }
99 user_data_format: RAW
100 user_data:
101 str_replace:
102 template: { get_file: mcc_seed_2401_userdata.yaml }
103 params:
104 $wait_condition_notify: { get_attr: [ instance_wait_handle, curl_cli ] }
105 $os_az: { get_param: availability_zone }
106 $nameservers: { get_param: nameservers }
Vladimir Khlyuneve03b04f2024-04-26 02:57:02 +0400107
108outputs:
109 seed_ext_ip:
110 description: IP for ssh access
111 value: { get_param: seed_subnet_cfg01_ip }