blob: 49067be461b3186162389c7124f024bd2590c6f9 [file] [log] [blame]
Oleh Hryhorov207137d2021-04-13 12:03:39 +03001resource_registry:
2 "MCP2::CentralSite": ../fragments/multirack/CentralSite.yaml
3 "MCP2::Rack": ../fragments/multirack/Rack.yaml
4 "MCP2::RackRouterRoutes": ../fragments/multirack/RackRouterRoutes.yaml
5
6parameters:
7 image: bionic-server-cloudimg-amd64-20190612
8 public_net_id: public
9 main_worker_size: 5
10 rack01_cmp_size: 1
11 rack02_cmp_size: 1
12 cluster_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCp0evjOaK8c8SKYK4r2+0BN7g+8YSvQ2n8nFgOURCyvkJqOHi1qPGZmuN0CclYVdVuZiXbWw3VxRbSW3EH736VzgY1U0JmoTiSamzLHaWsXvEIW8VCi7boli539QJP0ikJiBaNAgZILyCrVPN+A6mfqtacs1KXdZ0zlMq1BPtFciR1JTCRcVs5vP2Wwz5QtY2jMIh3aiwkePjMTQPcfmh1TkOlxYu5IbQyZ3G1ahA0mNKI9a0dtF282av/F6pwB/N1R1nEZ/9VtcN2I1mf1NW/tTHEEcTzXYo1R/8K9vlqAN8QvvGLZtZduGviNVNoNWvoxaXxDt8CPv2B2NCdQFZp
13 tunnel_interface: 'ens3'
14 main_worker_metadata: {"labels": {"openstack-control-plane":"enabled","openvswitch":"enabled","openstack-gateway": "enabled","role":"ceph-osd-node","local-volume-provisioner": "enabled"}}
15 rack01_cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled"}}
16 rack02_cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled"}}
17 # hardware_metadata which is used for Ceph requires flavor with
18 # ephemeral storage because it is used for Ceph bluestore.
19 main_worker_flavor: 'system.compact.openstack.control.ephemeral'
20 rack01_cmp_flavor: 'system.compact.openstack.control.ephemeral'
21 docker_ucp_image: docker-dev-kaas-local.docker.mirantis.net/lcm/docker/ucp:3.3.3
Oleksandr Kononenkobf4ecf82024-02-01 11:02:53 +020022 docker_ee_url: https://repos.mirantis.com/ubuntu
Oleh Hryhorov207137d2021-04-13 12:03:39 +030023 docker_ee_release: stable-19.03
24 private_floating_interface: 'ens4'
Oleh Hryhorovf4677af2021-04-26 18:00:15 +030025 default_interface: 'ens3'
Oleh Hryhorov207137d2021-04-13 12:03:39 +030026 rack_private_floating_interface: 'veth-phy'
Oleh Hryhorovf4677af2021-04-26 18:00:15 +030027 lmas_size: 0
28 lmas_metadata: {"labels": {"role": "stacklight", "stacklight": "enabled", "local-volume-provisioner": "enabled"}}
29 lmas_flavor: system.compact.stacklight.server
30 # qos_max_burst_kbps_egress: 1536
31 # qos_max_kbps_egress: 1433
Oleh Hryhorov207137d2021-04-13 12:03:39 +030032 main_worker_hardware_metadata: |
33 '00:00:00:00:00:00':
34 write_files:
35 - path: /usr/share/metadata/ceph.yaml
36 content: |
37 storageDevices:
38 - name: vdb
39 role: hdd
40 sizeGb: 20
41 ramGb: 8
42 cores: 2
43 # The roles will be assigned based on node labels.
44 # roles:
45 # - mon
46 # - mgr
47 ips:
48 - 192.168.122.101
49 crushPath: {}
50
51 rack_functions_override: |
52
53 function network_config {
54 PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
55 PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
56
57 local public_interface=${1:-${PUBLIC_INTERFACE}}
58 local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
59 local match_ip_line
60
61 DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
62
63 cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
64 [NetDev]
65 Name=veth-phy
66 Kind=veth
67 [Peer]
68 Name=veth-br
69 EOF
70
71 sed -i 's/.*ethernets:.*/&\n veth-phy: {}/' ${cloud_netplan_cfg}
72 sed -i 's/.*ethernets:.*/&\n veth-br: {}/' ${cloud_netplan_cfg}
73
74 public_address_match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
75 sed -i "$((${public_address_match_ip_line}-1)),$((${public_address_match_ip_line}))d" ${cloud_netplan_cfg}
76
77 cat << EOF >> ${cloud_netplan_cfg}
78 bridges:
79 br-public:
80 dhcp4: false
81 EOF
82
83 # Remove Tunnel interface from netplan
84 if [[ $TUNNEL_INTERFACE_NETPLAN_MANAGE == false ]]; then
85 sed -i "/ ${TUNNEL_INTERFACE}/,/ set-name: ${TUNNEL_INTERFACE}/d" ${cloud_netplan_cfg}
86 fi
87
88 netplan --debug apply
89
90 # NOTE(vsaienko): give some time to apply changes
91 sleep 15
92
93 # Remove Tunnel interface from netplan
94 if [[ $TUNNEL_INTERFACE_NETPLAN_MANAGE == false ]]; then
95 ip addr flush ${TUNNEL_INTERFACE}
96 ip link set ${TUNNEL_INTERFACE} up
97 fi
98
99 }