blob: 09a968a6900a05766e2ed5201829c74d2e16946f [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
Vladimir Khlyunevd485ad12024-09-10 15:15:39 +030023 default: 172.16.181.252
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +040024 seed_subnet_pool_end:
25 type: string
Vladimir Khlyunevd485ad12024-09-10 15:15:39 +030026 default: 172.16.181.254
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +040027 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 }
Vladimir Khlyunevd485ad12024-09-10 15:15:39 +030074 allocation_pools:
75 - start: { get_param: seed_subnet_pool_start }
76 end: { get_param: seed_subnet_pool_end }
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +040077 dns_nameservers: { get_param: nameservers }
78
79 seed_port01:
80 type: OS::Neutron::Port
81 properties:
82 port_security_enabled: false
83 network_id: { get_param: seed_net }
84 fixed_ips:
85 - ip_address: { get_param: seed_subnet_cfg01_ip }
86
87 seed_instance:
88 type: OS::Nova::Server
89 depends_on: seed_subnet
90 properties:
91 image_update_policy: REBUILD
92 flavor: { get_param: flavor }
93 image: 'focal-server-cloudimg-amd64-20220419'
94 key_name: { get_param: key_pair }
95 availability_zone: { get_param: availability_zone }
96 name:
97 list_join:
98 - '.'
99 - [ { get_param: seed_instance_name }, { get_param: seed_instance_domain } ]
100 networks:
101 - port: { get_resource: seed_port01 }
102 user_data_format: RAW
103 user_data:
104 str_replace:
105 template: { get_file: mcc_seed_2401_userdata.yaml }
106 params:
107 $wait_condition_notify: { get_attr: [ instance_wait_handle, curl_cli ] }
108 $os_az: { get_param: availability_zone }
109 $nameservers: { get_param: nameservers }
Vladimir Khlyuneve03b04f2024-04-26 02:57:02 +0400110
111outputs:
112 seed_ext_ip:
113 description: IP for ssh access
114 value: { get_param: seed_subnet_cfg01_ip }