重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
基础配置:
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脚本)
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。