准备Xserver1,Xserver2两台服务器,控制节点controller, 第一张网卡网段为168.100.10/24,第二张网卡网段为 192.168.200.10/24。计算节点compute,添加硬盘200 GB,第一张网卡网段为 192.168.100.20/24,第二张网卡网段为 192.168.200.20/24,对200G分两个区为 sdb1 与 sdb2各90G。
修改主机名:
xserver1:
hostnamectl set-hostname controller
xserver2:
hostnamectl set-hostname compute
xserver1配置yum源,新建/opt/centos、/opt/iaas,两个目录,挂载两个镜像
mv /etc/yum.repos.d/* /media
mkdir /opt/centos/
mkdir /opt/iaas/
mount CentOS-7-x86_64-DVD-1511.iso /opt/centos/
mount /dev/cdrom /opt/iaas/
vi /etc/yum.repos.d/local.repo
//新建本地yum源文件
[centos]
name=centos
baseurl=file:///opt/centos
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=file:///opt/iaas/iaas-repo
gpgcheck=0
enabled=1
xserver2配置yum源,新建远程ftp源
mv /etc/yum.repos.d/* /media
vi /etc/yum.repos.d/local.repo
//新建本地yum源文件
[centos]
name=centos
baseurl=ftp://192.168.100.10/centos
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl= ftp://192.168.100.10/iaas/iaas-repo
gpgcheck=0
enabled=1
xserver1安装FTP,配置FTP文件
yum install vsftpd –y
vi /etc/vsftpd/vsftpd.conf
//配置ftp文件
anon_root=/opt
//在配置文件第一行插入
systemctl start vsftpd
//启动FTP服务
xserver1,xserver2关闭防火墙和策略
setenforce 0
iptables -F
iptables -Z
iptables -X
systemctl stop firewalld
xserver1,xserver2安装iaas服务
yum install iaas-xiandian –y
xserver1配置环境变量,远程复制文件到xserver2
vi /etc/xiandian/openrc.sh
HOST_IP=192.168.10.10
HOST_NAME=controller
HOST_IP_NODE=192.168.10.20
HOST_NAME_NODE=compute
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_NAME=eno33554960
##节点第二块网卡名称
CINDER_DBPASS=000000
CINDER_PASS=000000
BLOCK_DISK=sdb1
##计算节点 cinder 服务使用空分区
SWIFT_PASS=000000
OBJECT_DISK=sdb2
##计算节点 swift 服务使用空分区
STORAGE_LOCAL_NET_IP=192.168.100.20
scp /etc/xiandian/openrc.sh root@192.168.100.20:/etc/xiandian/openrc.sh
//远程复制到xserver2的配置文件,按提示输入yes和密码000000
xserver2对sdb分区sdb1和sdb2,各90G
fdisk /dev/sdb
xserver1,xserver2修改错误的脚本,最后一行enabled—>enable
vi /usr/local/bin/iaas-install-neutron-controller-gre.sh
xserver1,xserver2通过脚本安装基础服务:
iaas-pre-host.sh
xserver1要安装的openstack组件
iaas-install-mysql.sh \\安装数据库组件
iaas-install-keystone.sh \\安装认证组件
iaas-install-glance.sh \\安装镜像组件
iaas-install-nova-controller.sh \\安装计算组件
iaas-install-neutron-controller.sh
iaas-install-neutron-controller-gre.sh \\安装网络组件
iaas-install-dashboard.sh \\安装界面服务
iaas-install-cinder-controller.sh \\安装块存储组件
iaas-install-swift-controller.sh \\安装对象存储组件
xserver2要安装的openstack组件
iaas-install-nova-compute.sh \\安装计算组件
iaas-install-neutron-compute.sh
iaas-install-neutron-compute-gre.sh \\安装网络组件
iaas-install-cinder-compute.sh \\安装块存储组件
iaas-install-swift-compute.sh \\安装对象存储组件
需要输入yes和密码:000000
回到外面宿主机打开浏览器输入网址:http://192.168.100.10/dashboard
暂无评论内容