使用准备好的centos7.5.1804的版本镜像搭建两台主机,大致配置如下
安装好centos后先关闭防火墙:
systemctl disable firewalld --now
vi /etc/sysconfig/selinux
SELINUX=permissive
[root@controller ~]# setenforce 0
[root@controller ~]# getenforce
Permissive
配置本地hosts配置:
[root@controller ~]# cat /etc/hosts
10.83.233.200 controller
10.83.233.201 compute
然后分别把centos7.5的镜像和iaas2.4的镜像挂载上传到/opt/目录下,并配置好yum源:
文章来源:https://www.toymoban.com/news/detail-621245.html
controller:
[centos]
name=centos
baseurl=file:///opt/centos
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=file:///opt/openstack/iaas-repo
gpgcheck=0
enabled=1
然后安装ftp
yum install vsftpd -y
echo anon_root=/opt/ >> /etc/vsftpd/vsftpdconf
systemctl enable vsftpd --now
并配置好compute结点的yum:
[root@compute yum.repos.d]# cat yum.repo
[centos]
name=centos
baseurl=ftp://10.83.233.200/centos
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=ftp://10.83.233.200/openstack/iaas-repo
gpgcheck=0
enabled=1
controller和compute安装先电的包:
yum install iaas-xiandian -y
vi /etc/xiandian/openrc.sh
HOST_IP=192.168.100.10(10.83.233.X,controller的IP)
HOST_PASS=000000
HOST_NAME=controller(改成自己的控制节点的主机名)
HOST_IP_NODE=192.168.100.20(10.83.233.X,compute的IP)
HOST_PASS_NODE=000000
HOST_NAME_NODE=compute(改成自己的计算节点的主机名)
network_segment_IP=192.168.100.0/24(10.83.233.0/24)
RABBIT_USER=openstack
RABBIT_PASS=000000
DB_PASS=000000
DOMAIN_NAME=demo(自定义域名,此处可以不更改)
ADMIN_PASS=000000
DEMO_PASS=000000
KEYSTONE_DBPASS=000000
GLANCE_DBPASS=000000
GLANCE_PASS=000000
NOVA_DBPASS=000000
NOVA_PASS=000000
NEUTRON_DBPASS=000000
NEUTRON_PASS=000000
METADATA_SECRET=000000
INTERFACE_IP=192.168.100.10/192.168.100.20(controllerIP/computeIP,只填一个对应的IP)
INTERFACE_NAME=enp9s0 (ens192,外部网络网卡名称)
Physical_NAME=provider (外部网络适配器名称)
minvlan=101 (1,vlan网络范围的第一个vlanID)
maxvlan=200 (300,vlan网络范围的最后一个vlanID)
CINDER_DBPASS=000000
CINDER_PASS=000000
BLOCK_DISK=md126p4 (sdb1)
SWIFT_PASS=000000
OBJECT_DISK=md126p5 (sdb2)
STORAGE_LOCAL_NET_IP=192.168.100.20(10.83.233.X,compute的IP)
HEAT_DBPASS=000000
HEAT_PASS=000000
ZUN_DBPASS=000000
ZUN_PASS=000000
KURYR_DBPASS=000000
KURYR_PASS=000000
CEILOMETER_DBPASS=000000
CEILOMETER_PASS=000000
AODH_DBPASS=000000
AODH_PASS=000000
然后开始跑脚本安装:文章来源地址https://www.toymoban.com/news/detail-621245.html
controller:
iaas-pre-host.sh
iaas-install-mysql.sh
iaas-install-keystone.sh
iaas-install-glance.sh
iaas-install-nova-controller.sh
iaas-install-neutron-controller.sh
iaas-install-dashboard.s
compute:
iaas-pre-host.sh
yum install MySQL-python -y
iaas-install-nova-compute.sh
iaas-install-neutron-compute.sh
到了这里,关于搭建openstack前期准备的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!