五:OpenStack环境准备-compute node
一:工具、环境准备-controller node
二:OpenStack环境准备-controller node
三:安装服务-controller node
四:工具、环境准备-compute node
五:OpenStack环境准备-compute node
六:安装服务-compute node
七:仪表盘安装
文章目录
- 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 ens34
iface ens34 inet manual
up ip link set dev $IFACE up
down ip link set dev $IFACE down
请使用实际接口名称替换
ens34
( 名为INTERFACE_NAME)
-
- 配置主机名解析:
执行指令:
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 -y
-
- 修改 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 sources210 Number of sources = 1MS 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
‘Press [ENTER] to continue or Ctrl-c to cancel adding it.’ 注意需要点击 回车
b. 安装示例
执行指令:
apt install nova-compute -y
c. 安装客户端
执行指令:
apt install python3-openstackclient -y