第二章 硬件环境准备
1、硬件环境:
物理机配置:dellR420 E5 32G内存 300GSAS Raid5 双网卡
系统要求:centos7.6
硬盘要求:4块硬盘 单块300G以上
4块硬盘raid5
内存要求:32G以上
分区要求:
sda
sda1 /boot 1024M
/swap 16G
sda2 / 其余
2、系统环境
网卡配置 控制点节需要用到双网卡,其他节点单网卡即可
[root@node1 yum.repos.d]# cat /etc/sysconfig/network-scripts/ifcfg-em1
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=em1
UUID=3ef45767-6a49-4bc5-bd6e-5e79c8491ce2
DEVICE=em1
ONBOOT=yes
IPADDR=192.168.176.57
NETMASK=
GATEWAY=
DNS1=
[root@node1 yum.repos.d]# cat /etc/sysconfig/network-scripts/ifcfg-em2
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=em2
UUID=fc106a44-9af7-46f2-9e85-381c92d54e8f
DEVICE=em2
ONBOOT=yes
主机名修改/etc/hosts
sed -i '3a 192.168.176.57 node1\n192.168.176.58 node2\n192.168.176.59 node3\n192.168.176.60 storage01\n192.168.176.63 computer01\n' /etc/hosts
#所有节点要初始化的
#!/bin/bash
sed -i s#SELINUX=enforcing#SELINUX=disabled# /etc/selinux/config
systemctl stop firewalld && systemctl disable firewalld && iptables -F && setenforce 0 && systemctl stop NetworkManager && systemctl disable NetworkManager
systemctl restart network
yum -y install lrzsz net-tools vim epel-release wget ntpdate
cp -r /etc/yum.repos.d/* /opt
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum list &> null
yum -y install chrony
systemctl enable chronyd.service && systemctl start chronyd.service
chronyc sources
#配置openstack-setin源
echo '[centos-openstack-stein]
name=CentOS-7 - OpenStack stein
baseurl=http://mirrors.aliyun.com/centos/7/cloud/$basearch/openstack-stein/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
[centos-openstack-stein-test]
name=CentOS-7 - OpenStack stein Testing
baseurl=http://mirrors.aliyun.com/centos/7/cloud/$basearch/openstack-stein/
gpgcheck=0
enabled=0
[centos-openstack-stein-debuginfo]
name=CentOS-7 - OpenStack stein - Debug
baseurl=http://mirrors.aliyun.com/centos/7/cloud/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
[centos-openstack-stein-source]
name=CentOS-7 - OpenStack stein - Source
baseurl=http://mirrors.aliyun.com/centos/7/cloud/$basearch/openstack-stein/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
[rdo-trunk-stein-tested]
name=OpenStack stein Trunk Tested
baseurl=http://mirrors.aliyun.com/centos/7/cloud/$basearch/rdo-trunk-stein-tested/
gpgcheck=0
enabled=0' > /etc/yum.repos.d/CentOS-OpenStack-stein.repo
yum clean all && yum makecache
#配置最大文件
echo '* hard nofile 102400' >> /etc/security/limits.conf
echo '* soft nofile 102400' >> /etc/security/limits.conf
echo $?
#安装三个控制节点互信(控制节点个数为奇数个1 3 5 7 )
ssh-keygen
192.168.176.57
ssh-copy-id -i ~/.ssh/id_rsa.pub root@node2
ssh-copy-id -i ~/.ssh/id_rsa.pub root@node3
192.168.176.58
ssh-copy-id -i ~/.ssh/id_rsa.pub root@node1
ssh-copy-id -i ~/.ssh/id_rsa.pub root@node3
192.168.176.59
ssh-copy-id -i ~/.ssh/id_rsa.pub root@node1
ssh-copy-id -i ~/.ssh/id_rsa.pub root@node2
参考文档
https://blog.youkuaiyun.com/weixin_42758707/article/details/100184082#91_neutron_1554