openstack安裝


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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM