组件 | 要求 | 说明 |
---|---|---|
OpenStack | Train | |
操作系统 | CentOS | 7 =< 版本 < 8 |
Controller Node(控制节点) | 192.168.0.11 | 网卡 > =2 |
Compute Node(计算节点) | 192.168.0.31、192.168.0.32 | 网卡 > =2 |
Block Storage Node(块存储节点) | 192.168.0.11 | 可以复用控制节点。使用lvm作为存储卷需要1个空硬盘,使用NFS不需要空硬盘。 |
Object Storage Node(对象存储节点) | 192.168.0.31、192.168.0.32 | 可以复用计算节点,空硬盘 > =2 |
注:
点击【完成】
选择【LAN区段】,点击【LAN区段】
点击【添加】,输入区段名称,名称无具体含义,尽量与后续配置网络有关系
添加结果
网卡配置(ifcfg-eno33554984为网卡名称,以实际为准)
# cat >> /etc/sysconfig/network-scripts/ifcfg-eno33554984 << EOF
TYPE=Ethernet
BOOTPROTO=static
NAME=eno33554984
DEVICE=eno33554984
ONBOOT=yes
IPADDR=172.16.0.11
NETMASK=255.255.255.0
EOF
# ifup eno33554984
Controller Node:
# hostnamectl set-hostname controller
Compute Node1:
# hostnamectl set-hostname compute1
Compute Node2:
# hostnamectl set-hostname compute2
# cat >> /etc/hosts << EOF
192.168.0.11 controller
192.168.0.31 compute1
192.168.0.32 compute2
EOF
# cat >> /etc/sysctl.conf << EOF
net.ipv4.ip_forward = 1
net.ipv4.ip_nonlocal_bind = 1
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOF
# modprobe br_netfilter
# sysctl -p
注: 命令modprobe br_netfilter
报错‘modprobe: FATAL: Module br_netfilter not found.’,原因为内核版本太低,升级内核参考章节《CentOS升级内核》。
关闭selinux:
# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
# setenforce 0
关闭防火墙并取消开机启动:
# systemctl stop firewalld
# systemctl disable firewalld
# yum install chrony -y
# vi /etc/chrony.conf
修改时间服务器以及自身接受同步的网段:
# vi /etc/chrony.conf
修改时间服务器:
# systemctl enable chronyd.service
# systemctl restart chronyd.service
# chronyc sources
注:
A)节点不多可以全部使用公网时间服务器
安装:
# yum install centos-release-openstack-train -y
# yum upgrade -y
# yum install python-openstackclient -y
# yum install openstack-selinux -y
# rpm -ivh kernel-ml-4.9.6-1.el7.elrepo.x86_64.rpm
# awk -F \' '$1=="menuentry " {print $2}' /etc/grub2.cfg |awk '{print $3 " "NR-1}'|grep 4.9.6 | awk '{print $2}'
# grub2-mkconfig -o /boot/grub2/grub.cfg
# reboot
# uname -r