-
Notifications
You must be signed in to change notification settings - Fork 4
/
common.sh
53 lines (36 loc) · 1.14 KB
/
common.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# load common variable
. ./common-config
# configure management network interface ------------------------------------------
cat > /etc/netplan/01-netcfg.yaml << EOF
network:
version: 2
renderer: networkd
ethernets:
$MANAGEMENT_INTERFACE_NAME:
addresses: [$MY_IP/24]
gateway4: $MANAGEMENT_NETWORK_GATEWAY
dhcp4: no
nameservers:
addresses: [8.8.8.8,8.8.4.4]
EOF
netplan apply
# configure provider network interface ------------------------------------------
sudo apt install ifupdown -y
cat > /etc/network/interfaces << EOF
# The provider network interface
auto $PROVIDER_INTERFACE_NAME
iface $PROVIDER_INTERFACE_NAME inet manual
up ip link set dev \$IFACE up
down ip link set dev \$IFACE down
EOF
service networking restart
# add domains ------------------------------------------
echo $CONTROLLER_M_IP controller >> /etc/hosts
echo $COMPUTE_M_IP compute >> /etc/hosts
# pakages update & install openstack client ------------------------------------------
apt-get \
-o Dpkg::Options::="--force-confnew" \
--force-yes \
-fuy \
dist-upgrade
apt install python-openstackclient -y