RDO(Red Hat Distribution of OpenStack)是由红帽公司推出的部署OpenStack集群的一个基于Puppet的部署工具,可以很快地通过RDO部署一套复杂的OpenStack环境。如果用户想在REHL上面部署OpenStack,最便捷的方式就是RDO。
环境:Centos7系统,4G内存,100G硬盘大小。
一:更新yum源
yum -y update
二:RDO安装源
yum install -y https://www.rdoproject.org/repos/rdo-release.rpm
三:在使用RDO安装OpenStack过程中,需要Packstack来部署OpenStack,以下安装Packstack:
yum install -y openstack-packstack
最好把相关依赖包都尽量安装下:
yum install -y yum openstack-packstack openstack-nova-compute puppet hiera openssh-clients tar nc rubygem-json openstack-nova-conductor openstack-dashboard openstack-swift mongodb-server openstack-ceilometer-central mariadb mariadb-galera-server python-openstackclient openstack-cinder openstack-liberty
四:关闭相应服务
systemctl disable NetworkManager-dispatcher.service
systemctl disable NetworkManager.service
systemctl disable postfix.service
systemctl stop NetworkManager
systemctl status NetworkManager
systemctl list-unit-files |grep enable
这里必须停止 NetworkManager,不然一直卡起执行:
Testing if puppet apply is finished: 192.168.18.167_glance.pp
关闭SELINUX
/etc/selinux/config里设置
SELINUX=disabled
五:单节点快速部署OpenStack
packstack --allinone
正常应该如下过程:
[root@kilo-rdo ~]# packstack --allinone Welcome to the Packstack setup utility The installation log file is available at: /var/tmp/packstack/20161208-122639-y7 lVCr/openstack-setup.log Installing: Clean Up [ DONE ] Discovering ip protocol version [ DONE ] Setting up ssh keys [ DONE ] Preparing servers [ DONE ] Pre installing Puppet and discovering hosts' details [ DONE ] Preparing pre-install entries [ DONE ] Setting up CACERT [ DONE ] Preparing AMQP entries [ DONE ] Preparing MariaDB entries [ DONE ] Fixing Keystone LDAP config parameters to be undef if empty[ DONE ] Preparing Keystone entries [ DONE ] Preparing Glance entries [ DONE ] Checking if the Cinder server has a cinder-volumes vg[ DONE ] Preparing Cinder entries [ DONE ] Preparing Nova API entries [ DONE ] Creating ssh keys for Nova migration [ DONE ] Gathering ssh host keys for Nova migration [ DONE ] Preparing Nova Compute entries [ DONE ] Preparing Nova Scheduler entries [ DONE ] Preparing Nova VNC Proxy entries [ DONE ] Preparing OpenStack Network-related Nova entries [ DONE ] Preparing Nova Common entries [ DONE ] Preparing Neutron LBaaS Agent entries [ DONE ] Preparing Neutron API entries [ DONE ] Preparing Neutron L3 entries [ DONE ] Preparing Neutron L2 Agent entries [ DONE ] Preparing Neutron DHCP Agent entries [ DONE ] Preparing Neutron Metering Agent entries [ DONE ] Checking if NetworkManager is enabled and running [ DONE ] Preparing OpenStack Client entries [ DONE ] Preparing Horizon entries [ DONE ] Preparing Swift builder entries [ DONE ] Preparing Swift proxy entries [ DONE ] Preparing Swift storage entries [ DONE ] Preparing Gnocchi entries [ DONE ] Preparing MongoDB entries [ DONE ] Preparing Redis entries [ DONE ] Preparing Ceilometer entries [ DONE ] Preparing Aodh entries [ DONE ] Preparing Nagios server entries [ DONE ] Preparing Nagios host entries [ DONE ] Preparing Puppet manifests [ DONE ] Copying Puppet modules and manifests [ DONE ] Applying 192.168.80.128_controller.pp Testing if puppet apply is finished: 192.168.80.128_controller.pp [ | ] 192.168.80.128_controller.pp: [ DONE ] Applying 192.168.80.128_network.pp Testing if puppet apply is finished: 192.168.80.128_network.pp [ / ] 192.168.80.128_network.pp: [ DONE ] Applying 192.168.80.128_compute.pp 192.168.80.128_compute.pp: [ DONE ] Applying Puppet manifests [ DONE ] Finalizing [ DONE ] **** Installation completed successfully ****** Additional information: * A new answerfile was created in: /root/packstack-answers-20161208-122640.txt * Time synchronization installation was skipped. Please note that unsynchronize d time on server instances might be problem for some OpenStack components. * File /root/keystonerc_admin has been created on OpenStack client host 192.168 .80.128. To use the command line tools you need to source the file. * To access the OpenStack Dashboard browse to http://192.168.80.128/dashboard . Please, find your login credentials stored in the keystonerc_admin in your home directory. * To use Nagios, browse to http://192.168.80.128/nagios username: nagiosadmin, password: a0cc9b49b7c54c56 * Because of the kernel update the host 192.168.80.128 requires reboot. * The installation log file is available at: /var/tmp/packstack/20161208-122639 -y7lVCr/openstack-setup.log * The generated manifests are available at: /var/tmp/packstack/20161208-122639- y7lVCr/manifests
六:登录OpenStack控制台:
查看控制台登录信息位于用户主目录的keystonerc_admin文件中。
可以用more keystonerc_admin命令查看登录。
-------------------------------------------------------------------------------------------------------
遇到的问题:
开始用VPS测试的,但是一直卡在Testing if puppet apply is finished: 192.168.80.128_controller.pp [ | ] 不走了。网上很多朋友好像也都遇到过,也没有给出解决方法,很无奈。
后来改用物理服务器就成功了,最需要等待时间的还是在Testing if puppet apply is finished: 192.168.80.128_controller.pp [ | ] 这一步,服务器安装的时候大概等了将近一个小时。
总结,单节点快速安装其实也就是简单的四个命令:
yum update -y yum install -y https://rdoproject.org/repos/rdo-release.rpm yum install -y openstack-packstack packstack --allinone
最后一步安装过程如下:
[root@openstackline ~]# packstack --allinone Welcome to the Packstack setup utility The installation log file is available at: /var/tmp/packstack/20171027-121249-_1EEC9/openstack-setup.log Packstack changed given value to required value /root/.ssh/id_rsa.pub Installing: Clean Up [ DONE ] Discovering ip protocol version [ DONE ] Setting up ssh keys [ DONE ] Preparing servers [ DONE ] Pre installing Puppet and discovering hosts' details [ DONE ] Preparing pre-install entries [ DONE ] Setting up CACERT [ DONE ] Preparing AMQP entries [ DONE ] Preparing MariaDB entries [ DONE ] Fixing Keystone LDAP config parameters to be undef if empty[ DONE ] Preparing Keystone entries [ DONE ] Preparing Glance entries [ DONE ] Checking if the Cinder server has a cinder-volumes vg[ DONE ] Preparing Cinder entries [ DONE ] Preparing Nova API entries [ DONE ] Creating ssh keys for Nova migration [ DONE ] Gathering ssh host keys for Nova migration [ DONE ] Preparing Nova Compute entries [ DONE ] Preparing Nova Scheduler entries [ DONE ] Preparing Nova VNC Proxy entries [ DONE ] Preparing OpenStack Network-related Nova entries [ DONE ] Preparing Nova Common entries [ DONE ] Preparing Neutron LBaaS Agent entries [ DONE ] Preparing Neutron API entries [ DONE ] Preparing Neutron L3 entries [ DONE ] Preparing Neutron L2 Agent entries [ DONE ] Preparing Neutron DHCP Agent entries [ DONE ] Preparing Neutron Metering Agent entries [ DONE ] Checking if NetworkManager is enabled and running [ DONE ] Preparing OpenStack Client entries [ DONE ] Preparing Horizon entries [ DONE ] Preparing Swift builder entries [ DONE ] Preparing Swift proxy entries [ DONE ] Preparing Swift storage entries [ DONE ] Preparing Gnocchi entries [ DONE ] Preparing MongoDB entries [ DONE ] Preparing Redis entries [ DONE ] Preparing Ceilometer entries [ DONE ] Preparing Aodh entries [ DONE ] Preparing Puppet manifests [ DONE ] Copying Puppet modules and manifests [ DONE ] Applying IP_controller.pp IP_controller.pp: [ DONE ] Applying IP_network.pp IP_network.pp: [ DONE ] Applying IP_compute.pp IP_compute.pp: [ DONE ] Applying Puppet manifests [ DONE ] Finalizing [ DONE ] **** Installation completed successfully ****** Additional information: * A new answerfile was created in: /root/packstack-answers-20171027-121250.txt * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components. * Warning: NetworkManager is active on IP. OpenStack networking currently does not work on systems that have the Network Manager service enabled. * File /root/keystonerc_admin has been created on OpenStack client host IP. To use the command line tools you need to source the file. * To access the OpenStack Dashboard browse to http://IP/dashboard . Please, find your login credentials stored in the keystonerc_admin in your home directory. * The installation log file is available at: /var/tmp/packstack/20171027-121249-_1EEC9/openstack-setup.log * The generated manifests are available at: /var/tmp/packstack/20171027-121249-_1EEC9/manifests 您在 /var/spool/mail/root ä¸æœ‰æ–°é‚®ä»¶ [root@openstackline ~]# cat keystonerc_admin unset OS_SERVICE_TOKEN export OS_USERNAME=admin export OS_PASSWORD='e2b100492d724405' export OS_AUTH_URL=http://IP:5000/v3 export PS1='[u@h W(keystone_admin)]$ ' export OS_PROJECT_NAME=admin export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_DOMAIN_NAME=Default export OS_IDENTITY_API_VERSION=3