blob: 68f8d5437b5fdefb616261d5b921c7d4ce563b80 [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
18 seed_net_dhcp:
19 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
33 seed_seed_instance_name:
34 type: string
35 default: kaas_test
36 key_pair:
37 type: string
38 default: system-key-8133
39 seed_instance_domain:
40 type: string
41 default: msust
42 net_public:
43 type: string
44 default: public
45 availability_zone:
46 type: string
47 default: nova
48 instance_boot_timeout:
49 type: number
50 default: 600
51
52resources:
53 instance_wait_handle:
54 type: OS::Heat::WaitConditionHandle
55
56 instance_wait_condition:
57 type: OS::Heat::WaitCondition
58 depends_on: kaas_instance
59 properties:
60 handle: { get_resource: instance_wait_handle }
61 timeout: { get_param: instance_boot_timeout }
62
63 seed_subnet:
64 type: OS::Neutron::Subnet
65 properties:
66 name: { list_join: ['-', [ { get_param: seed_net }, 'subnet', { get_param: env_name } ]] }
67 network: { get_param: seed_net }
68 gateway_ip: { get_param: seed_subnet_gateway_ip }
69 cidr: { get_param: seed_subnet_cidr }
70 enable_dhcp: { get_param: seed_subnet_dhcp }
71 dns_nameservers: { get_param: nameservers }
72
73 seed_port01:
74 type: OS::Neutron::Port
75 properties:
76 port_security_enabled: false
77 network_id: { get_param: seed_net }
78 fixed_ips:
79 - ip_address: { get_param: seed_subnet_cfg01_ip }
80
81 seed_instance:
82 type: OS::Nova::Server
83 depends_on: seed_subnet
84 properties:
85 image_update_policy: REBUILD
86 flavor: { get_param: flavor }
87 image: 'focal-server-cloudimg-amd64-20220419'
88 key_name: { get_param: key_pair }
89 availability_zone: { get_param: availability_zone }
90 name:
91 list_join:
92 - '.'
93 - [ { get_param: seed_instance_name }, { get_param: seed_instance_domain } ]
94 networks:
95 - port: { get_resource: seed_port01 }
96 user_data_format: RAW
97 user_data:
98 str_replace:
99 template: { get_file: mcc_seed_2401_userdata.yaml }
100 params:
101 $wait_condition_notify: { get_attr: [ instance_wait_handle, curl_cli ] }
102 $os_az: { get_param: availability_zone }
103 $nameservers: { get_param: nameservers }