openstack
紧接着上一节
一、继续基本配置
controller
1、配置YUM文件先删除一下 /etc/yum.repos.d/*下的所有内容
然后编辑一个centos.repo文件
内容如下。
[centos]
name=centos
baseurl=file:///opt/centos
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=file:///opt/iaas/iaas-repo
gpgcheck=0
enabled=1
compute
ftp.repo文件的内容如下name=centos
baseurl=ftp://192.168.200.10/centos
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=ftp://192.168.200.10/iaas/iaas-repo
gpgcheck=0
enabled=1
controller
验证一下 yum 配置是否正确,这里注意 compute节点先别验证
安装vsftpd服务
vi /etc/vsftpd/vsftpd.conf修改配置文件,只需要加上一行anon_root=/opt/即可
[root@controller opt]# systemctl restart vsftpd #重启一下vsftpd服务
[root@controller opt]# chkconfig vsftpd on #加入开机自启
注意:正在将请求转发到“systemctl enable vsftpd.service”。
Created symlink from /etc/systemd/system/multi-user.target.wants/vsftpd.service to /usr/lib/systemd/system/vsftpd.service.
[root@controller opt]#
compute
检查一下compute的源配置
[root@compute ~]# yum clean all
[root@compute ~]# yum list
Iaas-xiandian安装和配置
controller和compute
[root@controller opt]# yum install -y iaas-xiandian 安装
[root@controller opt]# cd /etc/xiandian/
[root@controller xiandian]# sed -i 's/^#//g' openrc.sh // 正则表达式,除去每一行的#
[root@controller xiandian]# vi openrc.sh // 编辑环境
如下。#--------------------system Config--------------------##
#Controller Server Manager IP. example:x.x.x.x
HOST_IP=192.168.100.10 #controller#Controller Server hostname. example:controller
HOST_NAME=controller#Compute Node Manager IP. example:x.x.x.x
HOST_IP_NODE=192.168.200.20#Compute Node hostname. example:compute
HOST_NAME_NODE=compute#--------------------Rabbit Config ------------------##
#user for rabbit. example:openstack
RABBIT_USER=openstack#Password for rabbit user .example:000000
RABBIT_PASS=000000#--------------------MySQL Config---------------------##
#Password for MySQL root user . exmaple:000000
DB_PASS=000000#--------------------Keystone Config------------------##
#Password for Keystore admin user. exmaple:000000
DOMAIN_NAME=demo
ADMIN_PASS=000000
DEMO_PASS=000000#Password for Mysql keystore user. exmaple:000000
KEYSTONE_DBPASS=000000#--------------------Glance Config--------------------##
#Password for Mysql glance user. exmaple:000000
GLANCE_DBPASS=000000#Password for Keystore glance user. exmaple:000000
GLANCE_PASS=000000#--------------------Nova Config----------------------##
#Password for Mysql nova user. exmaple:000000
NOVA_DBPASS=000000#Password for Keystore nova user. exmaple:000000
NOVA_PASS=000000#--------------------Neturon Config-------------------##
#Password for Mysql neutron user. exmaple:000000
NEUTRON_DBPASS=000000#Password for Keystore neutron user. exmaple:000000
NEUTRON_PASS=000000#metadata secret for neutron. exmaple:000000
METADATA_SECRET=000000#External Network Interface. example:eth1
INTERFACE_NAME=ifcfg-eno16777736#First Vlan ID in VLAN RANGE for VLAN Network. exmaple:101
minvlan=#Last Vlan ID in VLAN RANGE for VLAN Network. example:200
maxvlan=#--------------------Cinder Config--------------------##
#Password for Mysql cinder user. exmaple:000000
CINDER_DBPASS=000000#Password for Keystore cinder user. exmaple:000000
CINDER_PASS=000000#Cinder Block Disk. example:md126p3
BLOCK_DISK=d=md126p4#--------------------Trove Config--------------------##
#Password for Mysql Trove User. exmaple:000000
TROVE_DBPASS=000000#Password for Keystore Trove User. exmaple:000000
TROVE_PASS=000000#--------------------Swift Config---------------------##
#Password for Keystore swift user. exmaple:000000
SWIFT_PASS=000000#The NODE Object Disk for Swift. example:md126p4.
OBJECT_DISK=md126p5#The NODE IP for Swift Storage Network. example:x.x.x.x.
STORAGE_LOCAL_NET_IP=192.168.200.20 #compute #--------------------Heat Config----------------------##
#Password for Mysql heat user. exmaple:000000
HEAT_DBPASS=000000#Password for Keystore heat user. exmaple:000000
HEAT_PASS=000000#--------------------Ceilometer Config----------------##
#Password for Mysql ceilometer user. exmaple:000000
CEILOMETER_DBPASS=000000#Password for Keystore ceilometer user. exmaple:000000
CEILOMETER_PASS=000000#--------------------AODH Config----------------##
#Password for Mysql AODH user. exmaple:000000
AODH_DBPASS=000000#Password for Keystore AODH user. exmaple:000000
AODH_PASS=000000
然后compute节点我是先删除该文件然后再复制过去
之后再将两个节点的虚拟机都重启
重启后要重新挂载镜像
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-neutron-controller-gre.sh
iaas-install-dashboard.sh
compute
iaas-pre-host.sh
iaas-install-nova-compute.sh
iaas-install-neutron-compute.sh
iaas-install-neutron-compute-gre.sh
注:脚本安装完成之后,可以打开http://192.168.146.10/dashboard界面时,说明没问题。不考虑效率时,可以先将controller脚本安装后,再进行compute脚本的安装。反之,controller和compute在安装neutron之前,可以并行,安装neutron时,须先让controller先行,后者是compute。
dashboard云主机申请
登录成功的话就是OK了。 后面的明天再发
openstack
紧接着上一节
一、继续基本配置
controller
1、配置YUM文件先删除一下 /etc/yum.repos.d/*下的所有内容
然后编辑一个centos.repo文件
内容如下。
[centos]
name=centos
baseurl=file:///opt/centos
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=file:///opt/iaas/iaas-repo
gpgcheck=0
enabled=1
compute
ftp.repo文件的内容如下name=centos
baseurl=ftp://192.168.200.10/centos
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=ftp://192.168.200.10/iaas/iaas-repo
gpgcheck=0
enabled=1
controller
验证一下 yum 配置是否正确,这里注意 compute节点先别验证
安装vsftpd服务
vi /etc/vsftpd/vsftpd.conf修改配置文件,只需要加上一行anon_root=/opt/即可
[root@controller opt]# systemctl restart vsftpd #重启一下vsftpd服务
[root@controller opt]# chkconfig vsftpd on #加入开机自启
注意:正在将请求转发到“systemctl enable vsftpd.service”。
Created symlink from /etc/systemd/system/multi-user.target.wants/vsftpd.service to /usr/lib/systemd/system/vsftpd.service.
[root@controller opt]#
compute
检查一下compute的源配置
[root@compute ~]# yum clean all
[root@compute ~]# yum list
Iaas-xiandian安装和配置
controller和compute
[root@controller opt]# yum install -y iaas-xiandian 安装
[root@controller opt]# cd /etc/xiandian/
[root@controller xiandian]# sed -i 's/^#//g' openrc.sh // 正则表达式,除去每一行的#
[root@controller xiandian]# vi openrc.sh // 编辑环境
如下。#--------------------system Config--------------------##
#Controller Server Manager IP. example:x.x.x.x
HOST_IP=192.168.100.10 #controller#Controller Server hostname. example:controller
HOST_NAME=controller#Compute Node Manager IP. example:x.x.x.x
HOST_IP_NODE=192.168.200.20#Compute Node hostname. example:compute
HOST_NAME_NODE=compute#--------------------Rabbit Config ------------------##
#user for rabbit. example:openstack
RABBIT_USER=openstack#Password for rabbit user .example:000000
RABBIT_PASS=000000#--------------------MySQL Config---------------------##
#Password for MySQL root user . exmaple:000000
DB_PASS=000000#--------------------Keystone Config------------------##
#Password for Keystore admin user. exmaple:000000
DOMAIN_NAME=demo
ADMIN_PASS=000000
DEMO_PASS=000000#Password for Mysql keystore user. exmaple:000000
KEYSTONE_DBPASS=000000#--------------------Glance Config--------------------##
#Password for Mysql glance user. exmaple:000000
GLANCE_DBPASS=000000#Password for Keystore glance user. exmaple:000000
GLANCE_PASS=000000#--------------------Nova Config----------------------##
#Password for Mysql nova user. exmaple:000000
NOVA_DBPASS=000000#Password for Keystore nova user. exmaple:000000
NOVA_PASS=000000#--------------------Neturon Config-------------------##
#Password for Mysql neutron user. exmaple:000000
NEUTRON_DBPASS=000000#Password for Keystore neutron user. exmaple:000000
NEUTRON_PASS=000000#metadata secret for neutron. exmaple:000000
METADATA_SECRET=000000#External Network Interface. example:eth1
INTERFACE_NAME=ifcfg-eno16777736#First Vlan ID in VLAN RANGE for VLAN Network. exmaple:101
minvlan=#Last Vlan ID in VLAN RANGE for VLAN Network. example:200
maxvlan=#--------------------Cinder Config--------------------##
#Password for Mysql cinder user. exmaple:000000
CINDER_DBPASS=000000#Password for Keystore cinder user. exmaple:000000
CINDER_PASS=000000#Cinder Block Disk. example:md126p3
BLOCK_DISK=d=md126p4#--------------------Trove Config--------------------##
#Password for Mysql Trove User. exmaple:000000
TROVE_DBPASS=000000#Password for Keystore Trove User. exmaple:000000
TROVE_PASS=000000#--------------------Swift Config---------------------##
#Password for Keystore swift user. exmaple:000000
SWIFT_PASS=000000#The NODE Object Disk for Swift. example:md126p4.
OBJECT_DISK=md126p5#The NODE IP for Swift Storage Network. example:x.x.x.x.
STORAGE_LOCAL_NET_IP=192.168.200.20 #compute #--------------------Heat Config----------------------##
#Password for Mysql heat user. exmaple:000000
HEAT_DBPASS=000000#Password for Keystore heat user. exmaple:000000
HEAT_PASS=000000#--------------------Ceilometer Config----------------##
#Password for Mysql ceilometer user. exmaple:000000
CEILOMETER_DBPASS=000000#Password for Keystore ceilometer user. exmaple:000000
CEILOMETER_PASS=000000#--------------------AODH Config----------------##
#Password for Mysql AODH user. exmaple:000000
AODH_DBPASS=000000#Password for Keystore AODH user. exmaple:000000
AODH_PASS=000000
然后compute节点我是先删除该文件然后再复制过去
之后再将两个节点的虚拟机都重启
重启后要重新挂载镜像
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-neutron-controller-gre.sh
iaas-install-dashboard.sh
compute
iaas-pre-host.sh
iaas-install-nova-compute.sh
iaas-install-neutron-compute.sh
iaas-install-neutron-compute-gre.sh
注:脚本安装完成之后,可以打开http://192.168.146.10/dashboard界面时,说明没问题。不考虑效率时,可以先将controller脚本安装后,再进行compute脚本的安装。反之,controller和compute在安装neutron之前,可以并行,安装neutron时,须先让controller先行,后者是compute。
dashboard云主机申请
登录成功的话就是OK了。 后面的明天再发