文章目录
- Host networking
- a. 配置网络接口
- b. 验证连通性
- Network Time Protocol (NTP)
- a. 安装并配置组件
- b. 验证操作
- OpenStack packages
- a. 下载Victoria云存储仓库
- b. 安装示例
- c. 安装客户端
- 沉浸版指令及内容:
Host networking
a. 配置网络接口
- 切换至超级用户模式:
执行指令:
sudo su
- 将第二个接口配置为 provider interface:
执行指令:
vim /etc/network/interfaces
添加或修改为以下内容:
# The provider network interface
auto INTERFACE_NAME
iface INTERFACE_NAME inet manual
up ip link set dev $IFACE up
down ip link set dev $IFACE down
提示:用实际接口名称替换 INTERFACE_NAME。即:
ens34
- 配置主机名解析:
执行指令:
vim /etc/hosts
添加或修改为以下内容:
127.0.0.1 localhost
192.168.10.10 controller
192.168.10.20 compute
b. 验证连通性
执行指令:
ping -c 4 openstack.org
ping -c 4 controller
输出示例:
# ping -c 4 openstack.org
PING openstack.org (174.143.194.225) 56(84) bytes of data.
64 bytes from 174.143.194.225: icmp_seq=1 ttl=54 time=18.3 ms
64 bytes from 174.143.194.225: icmp_seq=2 ttl=54 time=17.5 ms
64 bytes from 174.143.194.225: icmp_seq=3 ttl=54 time=17.5 ms
64 bytes from 174.143.194.225: icmp_seq=4 ttl=54 time=17.4 ms
--- openstack.org ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3022ms
rtt min/avg/max/mdev = 17.489/17.715/18.346/0.364 ms
# ping -c 4 openstack.org
PING openstack.org (174.143.194.225) 56(84) bytes of data.
64 bytes from 174.143.194.225: icmp_seq=1 ttl=54 time=18.3 ms
64 bytes from 174.143.194.225: icmp_seq=2 ttl=54 time=17.5 ms
64 bytes from 174.143.194.225: icmp_seq=3 ttl=54 time=17.5 ms
64 bytes from 174.143.194.225: icmp_seq=4 ttl=54 time=17.4 ms
--- openstack.org ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3022ms
rtt min/avg/max/mdev = 17.489/17.715/18.346/0.364 ms
Network Time Protocol (NTP)
安装 Chrony以在节点间正确同步服务。
a. 安装并配置组件
-
- 安装软件包:
执行指令:
apt install chrony
-
- 修改 chrony.conf 的配置为引用 controller node
执行指令:
vim /etc/chrony/chrony.conf
添加以下内容:
server controller iburst
注释掉以下内容:
pool 2.debian.pool.ntp.org offline iburst
提示:
pool 2.debian.pool.ntp.org offline iburst
修改为# pool 2.debian.pool.ntp.org offline iburst
可能内容不全一样,pool 2.debian.pool.***
-
- 重启 NTP 服务
执行指令:
service chrony restart
b. 验证操作
执行指令:
chronyc sources
输出示例:
# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* controller 3 9 377 421 +15us[ -87us] +/- 15ms
OpenStack packages
a. 下载Victoria云存储仓库
执行指令:
add-apt-repository cloud-archive:victoria
b. 安装示例
执行指令:
apt install nova-compute
c. 安装客户端
执行指令:
apt install python3-openstackclient
下面的内容跟上面的是一样的,但少了说明,更专注于有用内容的执行。
沉浸版指令及内容:
指令:
sudo su
指令:
vim /etc/network/interfaces
内容:
# The provider network interface
auto INTERFACE_NAME
iface INTERFACE_NAME inet manual
up ip link set dev $IFACE up
down ip link set dev $IFACE down
指令:
vim /etc/hosts
内容:
127.0.0.1 localhost
192.168.10.10 controller
192.168.10.20 compute
指令:
ping -c 4 openstack.org
ping -c 4 controller
指令:
apt install chrony -y
vim /etc/chrony/chrony.conf
内容:
server controller iburst
#pool 2.debian.pool.ntp.org offline iburst
指令:
service chrony restart
chronyc sources
add-apt-repository cloud-archive:victoria
apt install nova-compute -y
apt install python3-openstackclient -y