先电IaaS平台搭建过程
基础配置:
controller:
站在用户的角度思考问题,与客户深入沟通,找到泗洪网站设计与泗洪网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:做网站、网站设计、企业官网、英文网站、手机端网站、网站推广、域名申请、网络空间、企业邮箱。业务覆盖泗洪地区。
1.修改主机名:
hostnamectl set-hostname controller
2.关闭防火墙并且设置开机不启动:
systemctl stop firewalld systemctl disable firewalld
3.修改hosts文件:
192.168.214.10 controller
193.168.214.20 compute
4.修改selinux为permissive:
vi /etc/selinux/config SELINUX=permissive; setenforce 0
5.创建目录并上传镜像并挂载:
mkdir /opt/{centos,iaas};
将镜像CentOS-7-x86_64-DVD-1511.iso XianDian-IaaS-v2.2.iso上传到/opt目录下
mount -o loop CentOS-7-x86_64-DVD-1511.iso centos/
mount -o loop XianDian-IaaS-v2.2.iso iaas/
6.编写YUM源:
mkdir /yum; mv /etc/yum.repos.d/ /yum
vi /etc/yum.repos.d/local.repo
[centos]
name=centos
baseurl=file://opt/centos
enabled=1
gpgcheck=0
[iaas]
name=iaas
baseurl=file://opt/iaas
enabled=1
gpgcheck=0
7.验证YUM源:
yum clean all
yum repolist
8.安装并配置ftp服务:
yum install vsftpd -y
vi /etc/vsftpd/vsftpd.conf
anon_root=/opt
systemctl enable vsftpd
systemctl restart vsftpd
9.安装iaas-xiandian并配置环境变量
sed -i -e "s/PASS=/PASS=000000/" -e "s/^#//" /etc/xiandian/openrc.sh
vi /etc/xiandian/openrc.sh
HOST_IP=192.168.214.10
HOST_NAME=controller
HOST_IP_NODE=192.168.214.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=eno33554976 (外网网卡名称)
minvlan=101
maxvlan=200
CINDER_DBPASS=000000
CINDER_PASS=000000
BLOCK_DISK=sdb1(空白分区)
TROVE_DBPASS=000000
TROVE_PASS=000000
SWIFT_PASS=000000
OBJECT_DISK=sdb2 (空白分区)
STORAGE_LOCAL_NET_IP=192.168.214.20
HEAT_DBPASS=000000
HEAT_PASS=000000
CEILOMETER_DBPASS=000000
CEILOMETER_PASS=000000
AODH_DBPASS=000000
AODH_PASS=000000
compute:
1.修改主机名:
hostnamectl set-hostname compute
2.关闭防火墙并且设置开机不启动:
systemctl stop firewalld systemctl disable firewalld
3.修改hosts文件:
192.168.214.10 controller
193.168.214.20 compute
4.修改selinux为permissive:
vi /etc/selinux/config SELINUX=permissive; setenforce 0
5.配置YUM源:
mkdir /yum
mv /etc/yum.repos.d/ /yum
vi /etc/yum.repos.d/ftp.repo
[centos]
name=centos
baseurl=ftp://controller/centos
enabled=1
gpgcheck=0
[iaas]
name=iaas
baseurl=ftp://controller/iaas/iaas-repo
enabled=1
gpgcheck=0
6.验证YUM源:
yum clean all
yum repolist
7.从controller节点将环境变量复制过来:
scp controller:/etc/xiandian/openrc /etc/xiandian
各组件部署
controller:
1.执行脚本iaas-pre-host.sh(同compute节点一同执行)
2.MySQL部署:
iaas-install-mysql.sh(仅在controller节点部署)
3.keystone部署:
iaas-install-keystone.sh(仅在controller节点部署)
4.glance部署:
iaas-install-glance.sh(仅在controller节点部署)
5.nova部署:
iaas-install-nova-controller.sh(先在controller节点执行,完成后执行compute节点的nova脚本)
6.neutron部署:
iaas-install-neutron-controller.sh(先在controller节点执行,完成后执行compute节点的eutron脚本)
neutron-gre:
iaas-install-neutron-controller-gre.sh(先在controller节点执行,完成后执行compute节点的neutron-gre脚本)
7.dashboard部署:
iaas-install-dashboard.sh(执行完成后即可登录界面访问daoshboard界面)
8.cinder部署:
iaas-install-cinder-controller.sh(先在controller节点执行,完成后执行compute节点的cinder脚本)
9.swift部署:
iaas-install-swift-controller.sh(先在controller节点执行,完成后执行compute节点的swift脚本)
10.trove部署:
在部署之前要先将网络创建好,否则无法执行此脚本
iaas-install-trover.sh(仅在controller节点部署)
11.heat部署:
iaas-install-heat.sh(仅在controller节点部署)
12.ceilometer部署:
iaas-install-ceilometer.sh(先在controller节点执行,完成后执行compute节点的ceilometer脚本)
13.alarm部署:
iaas-install-alarm.sh(仅在controller节点部署)
compute:
1.执行脚本iaas-pre-host.sh(同controller节点一同执行)
2.nova部署:
iaas-install-nova-compute.sh(先在controller节点执行,完成后执行compute节点的nova脚本)
3.neutron部署:
iaas-install-neutron-controller.sh(先在controller节点执行,完成后执行compute节点的eutron脚本)
neutron-gre:
iaas-install-neutron-controller-gre.sh(先在controller节点执行,完成后执行compute节点的neutron-gre脚本)
4.cinder部署:
iaas-install-cinder-controller.sh(先在controller节点执行,完成后执行compute节点的cinder脚本)
5.swift部署:
iaas-install-swift-controller.sh(先在controller节点执行,完成后执行compute节点的swift脚本)
6.ceilometer部署:
iaas-install-ceilometer.sh(先在controller节点执行,完成后执行compute节点的ceilometer脚本)
当前名称:先电IaaS平台搭建过程
分享路径:http://azwzsj.com/article/ihojdd.html