1. 程式人生 > >CentOS7下三步安裝單點OpenStack【KVM、VMwareOK】

CentOS7下三步安裝單點OpenStack【KVM、VMwareOK】

失敗7次後成功。

注意:

1、必須CENTOS7,主要是python要2.7,yum要能用

2、關閉NetworkManager

3、多次安裝,千萬別修改IP,否則,必然失敗

4、安裝過程中,失敗多次,處理各不同:【不知道是否與我的網路情況有關,導致失敗多次】

使用配置參考:

https://www.linuxtechi.com/launch-instance-from-openstack-dashboard/

安裝成功後的部分截圖:

網路:


路由介面:

虛擬機器網路測試:


開始安裝:

KVM:

[email protected]:~$ qemu-img create -f qcow2 -o size=60G,preallocation=metadata /media/test/Seagate\ Expansion\ Drive/bak/kvm/Cos7Openstack.img
Formatting '/media/test/Seagate Expansion Drive/bak/kvm/Cos7Openstack.img', fmt=qcow2 size=64424509440 encryption=off cluster_size=65536 preallocation='metadata' lazy_refcounts=off

[email protected]:~$ virt-manager
掛載IMG到GUI【virt-manager】
修改VirtIO Disk1的Storage format 為qcow2;
新增centos7.iso光碟,掛載ISO為CDROM
設定Boot Option 為 cd-rom在第1引導
啟動虛擬機器

虛擬機器上,安裝centos7,選擇的base web server +Large System Performance +Laod Balancer +MariaDB Database Client +Python+Compatibility Libraries+Development Tools 【583】,空間/boot +/swap +/ =120G,單網絡卡,【最好配2網絡卡,NAT方式,模擬RTL8139】,4G記憶體,1CPU【物理機i5+8G】,測試樣例最好分5G記憶體,2CPU【物理機i5+8G】

ROOT PASSWORD ->123456->Done -> USER CREATION -> Full name:test ->Password:123456 ->Done
test
#:
root->chmod u+w sudoers-> vi /etc/sudoers -> 新增 test  ALL......->chmod u-w sudoers
vi ifcfg-eth0-> boot on -> ifup eth0 -> ip addr ->ping baidu ok
vim /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=1

vi /etc/hostname 修改為
openstack01
vi /etc/hosts 新增
192.168.122.130    openstack01
systemctl stop NetworkManager
systemctl disable NetworkManager.service
chkconfig NetworkManager off

ERR1:
ERROR : Failed to run remote script, stdout: Loaded plugins: fastestmirror, langpacks
stderr: Warning: Permanently added '192.168.122.130' (ECDSA) to the list of known hosts.
vi /etc/hostname 修改為
openstack01
vi /etc/hosts 新增
192.168.122.130    openstack01
[[email protected] ~]$ packstack --allinone|tee pactstack2.log
ERR2:
ERROR : Error appeared during Puppet run: 192.168.122.130_prescript.pp
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install iptables-services' returned 1: Error downloading packages
yum install iptables-services
[[email protected] ~]$ packstack --allinone|tee pactstack3.log
ERR3:
192.168.122.130_api_nova.pp:                 [ ERROR ]
Applying Puppet manifests                    [ ERROR ]
* Warning: NetworkManager is active on 192.168.122.130. OpenStack networking currently does not work on systems that have the Network Manager service enabled.
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager.service
sudo chkconfig NetworkManager off
[[email protected] ~]$ packstack --allinone|tee pactstack4.log
ERR4:
192.168.122.130_neutron.pp:         [ ERROR ]
Applying Puppet manifests           [ ERROR ]
ERROR : Error appeared during Puppet run:192.168.122.130_neutron.pp
Error: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]: Failed to call refresh: Command exceeded timeout
[[email protected] ~]$ packstack --allinone|tee pactstack5.log
ERR5:
192.168.122.130_osclient.pp:        [ DONE ]
假死,發現IP掉了
ifup eth0
[[email protected] ~]$ packstack --allinone|tee pactstack6.log

Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20160609-232624-G8KIr7/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 ]
Adding pre install manifest entries                  [ DONE ]
Setting up CACERT                                    [ DONE ]
Adding AMQP manifest entries                         [ DONE ]
Adding MariaDB manifest entries                      [ DONE ]
Adding Apache manifest entries                       [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Adding Keystone manifest entries                     [ DONE ]
Adding Glance Keystone manifest entries              [ DONE ]
Adding Glance manifest entries                       [ DONE ]
Adding Cinder Keystone manifest entries              [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Adding Cinder manifest entries                       [ DONE ]
Adding Nova API manifest entries                     [ DONE ]
Adding Nova Keystone manifest entries                [ DONE ]
Adding Nova Cert manifest entries                    [ DONE ]
Adding Nova Conductor manifest entries               [ DONE ]
Creating ssh keys for Nova migration                 [ DONE ]
Gathering ssh host keys for Nova migration           [ DONE ]
Adding Nova Compute manifest entries                 [ DONE ]
Adding Nova Scheduler manifest entries               [ DONE ]
Adding Nova VNC Proxy manifest entries               [ DONE ]
Adding OpenStack Network-related Nova manifest entries[ DONE ]
Adding Nova Common manifest entries                  [ DONE ]
Adding Neutron VPNaaS Agent manifest entries         [ DONE ]
Adding Neutron FWaaS Agent manifest entries          [ DONE ]
Adding Neutron LBaaS Agent manifest entries          [ DONE ]
Adding Neutron API manifest entries                  [ DONE ]
Adding Neutron Keystone manifest entries             [ DONE ]
Adding Neutron L3 manifest entries                   [ DONE ]
Adding Neutron L2 Agent manifest entries             [ DONE ]
Adding Neutron DHCP Agent manifest entries           [ DONE ]
Adding Neutron Metering Agent manifest entries       [ DONE ]
Adding Neutron Metadata Agent manifest entries       [ DONE ]
Adding Neutron SR-IOV Switch Agent manifest entries  [ DONE ]
Checking if NetworkManager is enabled and running    [ DONE ]
Adding OpenStack Client manifest entries             [ DONE ]
Adding Horizon manifest entries                      [ DONE ]
Adding Swift Keystone manifest entries               [ DONE ]
Adding Swift builder manifest entries                [ DONE ]
Adding Swift proxy manifest entries                  [ DONE ]
Adding Swift storage manifest entries                [ DONE ]
Adding Swift common manifest entries                 [ DONE ]
Adding Provisioning manifest entries                 [ DONE ]
Adding Provisioning Glance manifest entries          [ DONE ]
Adding Provisioning Demo bridge manifest entries     [ DONE ]
Adding Gnocchi manifest entries                      [ DONE ]
Adding Gnocchi Keystone manifest entries             [ DONE ]
Adding MongoDB manifest entries                      [ DONE ]
Adding Redis manifest entries                        [ DONE ]
Adding Ceilometer manifest entries                   [ DONE ]
Adding Ceilometer Keystone manifest entries          [ DONE ]
Adding Aodh manifest entries                         [ DONE ]
Adding Aodh Keystone manifest entries                [ DONE ]
Adding Nagios server manifest entries                [ DONE ]
Adding Nagios host manifest entries                  [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 192.168.122.130_prescript.pp
192.168.122.130_prescript.pp:                        [ DONE ]
Applying 192.168.122.130_amqp.pp
Applying 192.168.122.130_mariadb.pp
192.168.122.130_amqp.pp:                             [ DONE ]
192.168.122.130_mariadb.pp:                          [ DONE ]
Applying 192.168.122.130_apache.pp
192.168.122.130_apache.pp:                           [ DONE ]
Applying 192.168.122.130_keystone.pp
Applying 192.168.122.130_glance.pp
Applying 192.168.122.130_cinder.pp
192.168.122.130_keystone.pp:                         [ DONE ]
192.168.122.130_glance.pp:                           [ DONE ]
192.168.122.130_cinder.pp:                           [ DONE ]
Applying 192.168.122.130_api_nova.pp
192.168.122.130_api_nova.pp:                         [ DONE ]
Applying 192.168.122.130_nova.pp
192.168.122.130_nova.pp:                             [ DONE ]
Applying 192.168.122.130_neutron.pp
192.168.122.130_neutron.pp:                          [ DONE ]
Applying 192.168.122.130_osclient.pp
Applying 192.168.122.130_horizon.pp
192.168.122.130_osclient.pp:                         [ DONE ]
Write failed: Broken pipe
[email protected]:/media/test/Seagate Expansion Drive/bak/packstack$ ssh [email protected]
[email protected]'s password:
Last login: Thu Jun  9 21:27:24 2016 from 192.168.122.1
[[email protected] ~]$ packstack --allinone|tee pactstack6.log
Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20160610-004125-SVXaAh/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 ]
Adding pre install manifest entries                  [ DONE ]
Setting up CACERT                                    [ DONE ]
Adding AMQP manifest entries                         [ DONE ]
Adding MariaDB manifest entries                      [ DONE ]
Adding Apache manifest entries                       [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Adding Keystone manifest entries                     [ DONE ]
Adding Glance Keystone manifest entries              [ DONE ]
Adding Glance manifest entries                       [ DONE ]
Adding Cinder Keystone manifest entries              [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Adding Cinder manifest entries                       [ DONE ]
Adding Nova API manifest entries                     [ DONE ]
Adding Nova Keystone manifest entries                [ DONE ]
Adding Nova Cert manifest entries                    [ DONE ]
Adding Nova Conductor manifest entries               [ DONE ]
Creating ssh keys for Nova migration                 [ DONE ]
Gathering ssh host keys for Nova migration           [ DONE ]
Adding Nova Compute manifest entries                 [ DONE ]
Adding Nova Scheduler manifest entries               [ DONE ]
Adding Nova VNC Proxy manifest entries               [ DONE ]
Adding OpenStack Network-related Nova manifest entries[ DONE ]
Adding Nova Common manifest entries                  [ DONE ]
Adding Neutron VPNaaS Agent manifest entries         [ DONE ]
Adding Neutron FWaaS Agent manifest entries          [ DONE ]
Adding Neutron LBaaS Agent manifest entries          [ DONE ]
Adding Neutron API manifest entries                  [ DONE ]
Adding Neutron Keystone manifest entries             [ DONE ]
Adding Neutron L3 manifest entries                   [ DONE ]
Adding Neutron L2 Agent manifest entries             [ DONE ]
Adding Neutron DHCP Agent manifest entries           [ DONE ]
Adding Neutron Metering Agent manifest entries       [ DONE ]
Adding Neutron Metadata Agent manifest entries       [ DONE ]
Adding Neutron SR-IOV Switch Agent manifest entries  [ DONE ]
Checking if NetworkManager is enabled and running    [ DONE ]
Adding OpenStack Client manifest entries             [ DONE ]
Adding Horizon manifest entries                      [ DONE ]
Adding Swift Keystone manifest entries               [ DONE ]
Adding Swift builder manifest entries                [ DONE ]
Adding Swift proxy manifest entries                  [ DONE ]
Adding Swift storage manifest entries                [ DONE ]
Adding Swift common manifest entries                 [ DONE ]
Adding Provisioning manifest entries                 [ DONE ]
Adding Provisioning Glance manifest entries          [ DONE ]
Adding Provisioning Demo bridge manifest entries     [ DONE ]
Adding Gnocchi manifest entries                      [ DONE ]
Adding Gnocchi Keystone manifest entries             [ DONE ]
Adding MongoDB manifest entries                      [ DONE ]
Adding Redis manifest entries                        [ DONE ]
Adding Ceilometer manifest entries                   [ DONE ]
Adding Ceilometer Keystone manifest entries          [ DONE ]
Adding Aodh manifest entries                         [ DONE ]
Adding Aodh Keystone manifest entries                [ DONE ]
Adding Nagios server manifest entries                [ DONE ]
Adding Nagios host manifest entries                  [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 192.168.122.130_prescript.pp
192.168.122.130_prescript.pp:                        [ DONE ]
Applying 192.168.122.130_amqp.pp
Applying 192.168.122.130_mariadb.pp
192.168.122.130_amqp.pp:                             [ DONE ]
192.168.122.130_mariadb.pp:                          [ DONE ]
Applying 192.168.122.130_apache.pp
192.168.122.130_apache.pp:                           [ DONE ]
Applying 192.168.122.130_keystone.pp
Applying 192.168.122.130_glance.pp
Applying 192.168.122.130_cinder.pp
192.168.122.130_keystone.pp:                         [ DONE ]
192.168.122.130_glance.pp:                           [ DONE ]
192.168.122.130_cinder.pp:                           [ DONE ]
Applying 192.168.122.130_api_nova.pp
192.168.122.130_api_nova.pp:                         [ DONE ]
Applying 192.168.122.130_nova.pp
192.168.122.130_nova.pp:                             [ DONE ]
Applying 192.168.122.130_neutron.pp
192.168.122.130_neutron.pp:                          [ DONE ]
Applying 192.168.122.130_osclient.pp
Applying 192.168.122.130_horizon.pp
192.168.122.130_osclient.pp:                         [ DONE ]
192.168.122.130_horizon.pp:                          [ DONE ]
Applying 192.168.122.130_ring_swift.pp
192.168.122.130_ring_swift.pp:                       [ DONE ]
Applying 192.168.122.130_swift.pp
192.168.122.130_swift.pp:                            [ DONE ]
Applying 192.168.122.130_provision.pp
Applying 192.168.122.130_provision_glance
192.168.122.130_provision.pp:                        [ DONE ]
192.168.122.130_provision_glance:                    [ DONE ]
Applying 192.168.122.130_provision_bridge.pp
192.168.122.130_provision_bridge.pp:                 [ DONE ]
Applying 192.168.122.130_gnocchi.pp
192.168.122.130_gnocchi.pp:                          [ DONE ]
Applying 192.168.122.130_mongodb.pp
Applying 192.168.122.130_redis.pp
192.168.122.130_mongodb.pp:                          [ DONE ]
192.168.122.130_redis.pp:                            [ DONE ]
Applying 192.168.122.130_ceilometer.pp
192.168.122.130_ceilometer.pp:                       [ DONE ]
Applying 192.168.122.130_aodh.pp
192.168.122.130_aodh.pp:                             [ DONE ]
Applying 192.168.122.130_nagios.pp
Applying 192.168.122.130_nagios_nrpe.pp
192.168.122.130_nagios.pp:                           [ DONE ]
192.168.122.130_nagios_nrpe.pp:                      [ DONE ]
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]

 **** Installation completed successfully ******

Additional information:
 * A new answerfile was created in: /home/test/packstack-answers-20160610-004126.txt
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
 * File /root/keystonerc_admin has been created on OpenStack client host 192.168.122.130. To use the command line tools you need to source the file.
 * Copy of keystonerc_admin file has been created for non-root user in /home/test.
 * To access the OpenStack Dashboard browse to http://192.168.122.130/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
 * To use Nagios, browse to http://192.168.122.130/nagios username: nagiosadmin, password: 014485468608421d
 * The installation log file is available at: /var/tmp/packstack/20160610-004125-SVXaAh/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20160610-004125-SVXaAh/manifests



VMWARE:

$ sudo yum install -y centos-release-openstack-mitaka
$ sudo yum install -y openstack-packstack
$ packstack --allinone
命令 packstack  --allinone

感覺在第一次安裝過程中,172.16.144.132_glance.pp [done] 後
IP會掉,但手動重啟,導致一個172.16.144.132_cinder.pp失敗,提示網絡卡重新啟動了
重新packstack --allinone
第2次死於172.16.144.132_nova.pp,提示什麼error download openstack-nova-console,其實可以下載yum install ...ok
重新packstack --allinone
第3次死於172.16.144.132_neutron.pp,提示什麼error download openvswitch,
yum install openvswitch 提示openvswitch-2.4.0-1.el7.x86_64沒有mirrors to try
https://cloudrouter.org/repo/centos/7/x86_64/下載“    openvswitch-2.4.0-1.el7.centos.x86_64.rpm”rpm -ivh 安裝後
yum install openvswitch 提示 Nothing to do
重新packstack --allinone
第4次死於172.16.144.132_swift.pp,提示什麼error download openstack-nova-console,其實可以 yum install openstack-swift-object   ok
重新packstack --allinone
第5次死於172.16.144.132_provsion_glance,提示什麼e/usr/bin/openstack image set cirros  No image with a name or id of 'cirros' exists.
重新packstack --allinone
第6次死於172.16.144.132_redis.pp,提示什麼error download packages, 可以 yum install redis ...ok
重新packstack --allinone

第7次死於172.16.144.132_ceilometer.pp,提示什麼error download packages, 可以 yum install openstack-ceilometer-api ...ok
重新packstack --allinone

安裝輸出:

Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20160607-053835-zTTINd/openstack-setup.log

Installing:
Clean Up                                             [ [32mDONE[0m ]
Discovering ip protocol version                      [ [32mDONE[0m ]
Setting up ssh keys                                  [ [32mDONE[0m ]
Preparing servers                                    [ [32mDONE[0m ]
Pre installing Puppet and discovering hosts' details [ [32mDONE[0m ]
Adding pre install manifest entries                  [ [32mDONE[0m ]
Setting up CACERT                                    [ [32mDONE[0m ]
Adding AMQP manifest entries                         [ [32mDONE[0m ]
Adding MariaDB manifest entries                      [ [32mDONE[0m ]
Adding Apache manifest entries                       [ [32mDONE[0m ]
Fixing Keystone LDAP config parameters to be undef if empty[ [32mDONE[0m ]
Adding Keystone manifest entries                     [ [32mDONE[0m ]
Adding Glance Keystone manifest entries              [ [32mDONE[0m ]
Adding Glance manifest entries                       [ [32mDONE[0m ]
Adding Cinder Keystone manifest entries              [ [32mDONE[0m ]
Checking if the Cinder server has a cinder-volumes vg[ [32mDONE[0m ]
Adding Cinder manifest entries                       [ [32mDONE[0m ]
Adding Nova API manifest entries                     [ [32mDONE[0m ]
Adding Nova Keystone manifest entries                [ [32mDONE[0m ]
Adding Nova Cert manifest entries                    [ [32mDONE[0m ]
Adding Nova Conductor manifest entries               [ [32mDONE[0m ]
Creating ssh keys for Nova migration                 [ [32mDONE[0m ]
Gathering ssh host keys for Nova migration           [ [32mDONE[0m ]
Adding Nova Compute manifest entries                 [ [32mDONE[0m ]
Adding Nova Scheduler manifest entries               [ [32mDONE[0m ]
Adding Nova VNC Proxy manifest entries               [ [32mDONE[0m ]
Adding OpenStack Network-related Nova manifest entries[ [32mDONE[0m ]
Adding Nova Common manifest entries                  [ [32mDONE[0m ]
Adding Neutron VPNaaS Agent manifest entries         [ [32mDONE[0m ]
Adding Neutron FWaaS Agent manifest entries          [ [32mDONE[0m ]
Adding Neutron LBaaS Agent manifest entries          [ [32mDONE[0m ]
Adding Neutron API manifest entries                  [ [32mDONE[0m ]
Adding Neutron Keystone manifest entries             [ [32mDONE[0m ]
Adding Neutron L3 manifest entries                   [ [32mDONE[0m ]
Adding Neutron L2 Agent manifest entries             [ [32mDONE[0m ]
Adding Neutron DHCP Agent manifest entries           [ [32mDONE[0m ]
Adding Neutron Metering Agent manifest entries       [ [32mDONE[0m ]
Adding Neutron Metadata Agent manifest entries       [ [32mDONE[0m ]
Adding Neutron SR-IOV Switch Agent manifest entries  [ [32mDONE[0m ]
Checking if NetworkManager is enabled and running    [ [32mDONE[0m ]
Adding OpenStack Client manifest entries             [ [32mDONE[0m ]
Adding Horizon manifest entries                      [ [32mDONE[0m ]
Adding Swift Keystone manifest entries               [ [32mDONE[0m ]
Adding Swift builder manifest entries                [ [32mDONE[0m ]
Adding Swift proxy manifest entries                  [ [32mDONE[0m ]
Adding Swift storage manifest entries                [ [32mDONE[0m ]
Adding Swift common manifest entries                 [ [32mDONE[0m ]
Adding Provisioning manifest entries                 [ [32mDONE[0m ]
Adding Provisioning Glance manifest entries          [ [32mDONE[0m ]
Adding Provisioning Demo bridge manifest entries     [ [32mDONE[0m ]
Adding Gnocchi manifest entries                      [ [32mDONE[0m ]
Adding Gnocchi Keystone manifest entries             [ [32mDONE[0m ]
Adding MongoDB manifest entries                      [ [32mDONE[0m ]
Adding Redis manifest entries                        [ [32mDONE[0m ]
Adding Ceilometer manifest entries                   [ [32mDONE[0m ]
Adding Ceilometer Keystone manifest entries          [ [32mDONE[0m ]
Adding Aodh manifest entries                         [ [32mDONE[0m ]
Adding Aodh Keystone manifest entries                [ [32mDONE[0m ]
Adding Nagios server manifest entries                [ [32mDONE[0m ]
Adding Nagios host manifest entries                  [ [32mDONE[0m ]
Copying Puppet modules and manifests                 [ [32mDONE[0m ]
Applying 172.16.144.132_prescript.pp

172.16.144.132_prescript.pp:                         [ [32mDONE[0m ]
Applying 172.16.144.132_amqp.pp
Applying 172.16.144.132_mariadb.pp

172.16.144.132_amqp.pp:                              [ [32mDONE[0m ]

172.16.144.132_mariadb.pp:                           [ [32mDONE[0m ]
Applying 172.16.144.132_apache.pp

172.16.144.132_apache.pp:                            [ [32mDONE[0m ]
Applying 172.16.144.132_keystone.pp
Applying 172.16.144.132_glance.pp
Applying 172.16.144.132_cinder.pp

172.16.144.132_keystone.pp:                          [ [32mDONE[0m ]

172.16.144.132_glance.pp:                            [ [32mDONE[0m ]

172.16.144.132_cinder.pp:                            [ [32mDONE[0m ]
Applying 172.16.144.132_api_nova.pp

172.16.144.132_api_nova.pp:                          [ [32mDONE[0m ]
Applying 172.16.144.132_nova.pp

172.16.144.132_nova.pp:                              [ [32mDONE[0m ]
Applying 172.16.144.132_neutron.pp

172.16.144.132_neutron.pp:                           [ [32mDONE[0m ]
Applying 172.16.144.132_osclient.pp
Applying 172.16.144.132_horizon.pp

172.16.144.132_osclient.pp:                          [ [32mDONE[0m ]

172.16.144.132_horizon.pp:                           [ [32mDONE[0m ]
Applying 172.16.144.132_ring_swift.pp

172.16.144.132_ring_swift.pp:                        [ [32mDONE[0m ]
Applying 172.16.144.132_swift.pp

172.16.144.132_swift.pp:                             [ [32mDONE[0m ]
Applying 172.16.144.132_provision.pp
Applying 172.16.144.132_provision_glance

172.16.144.132_provision.pp:                         [ [32mDONE[0m ]

172.16.144.132_provision_glance:                     [ [32mDONE[0m ]
Applying 172.16.144.132_provision_bridge.pp

172.16.144.132_provision_bridge.pp:                  [ [32mDONE[0m ]
Applying 172.16.144.132_gnocchi.pp

172.16.144.132_gnocchi.pp:                           [ [32mDONE[0m ]
Applying 172.16.144.132_mongodb.pp
Applying 172.16.144.132_redis.pp

172.16.144.132_mongodb.pp:                           [ [32mDONE[0m ]

172.16.144.132_redis.pp:                             [ [32mDONE[0m ]
Applying 172.16.144.132_ceilometer.pp

172.16.144.132_ceilometer.pp:                        [ [32mDONE[0m ]
Applying 172.16.144.132_aodh.pp

172.16.144.132_aodh.pp:                              [ [32mDONE[0m ]
Applying 172.16.144.132_nagios.pp
Applying 172.16.144.132_nagios_nrpe.pp

172.16.144.132_nagios.pp:                            [ [32mDONE[0m ]

172.16.144.132_nagios_nrpe.pp:                       [ [32mDONE[0m ]
Applying Puppet manifests                            [ [32mDONE[0m ]
Finalizing                                           [ [32mDONE[0m ]

 **** Installation completed successfully ******

Additional information:
 * A new answerfile was created in: /home/test/packstack-answers-20160607-053836.txt
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
 * File /root/keystonerc_admin has been created on OpenStack client host 172.16.144.132. To use the command line tools you need to source the file.
 * Copy of keystonerc_admin file has been created for non-root user in /home/test.
 * To access the OpenStack Dashboard browse to http://172.16.144.132/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
 * To use Nagios, browse to http://172.16.144.132/nagios username: nagiosadmin, password: 11cc5b0fc9d948ee
 * The installation log file is available at: /var/tmp/packstack/20160607-053835-zTTINd/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20160607-053835-zTTINd/manifests


參考原文: http://www.linuxidc.com/Linux/2014-01/94926.htm

找到一個網站,國外的, http://openstack.RedHat.com/Main_Page,進入到quickstart頁面中,簡單翻譯如下:

用到的工具是一個被成為RDO的東東, 能夠在基於RHEL核心的linux系統,如RedHat,CentOS,Scientific Linux下,快速實現三步安裝。

一:安裝RDO軟體

二:安裝一個叫packstack的部署包

三:一鍵自動安裝

$ sudo yum install -y centos-release-openstack-mitaka
$ sudo yum install -y openstack-packstack
$ packstack --allinone

安裝完畢,可以通過OpenStack的網路管理介面Horizon進行訪問,地址如:http://192.168.1.123/dashboard ,使用者名稱為admin,密碼可以在

/root/ 下的keystonerc_admin檔案中找到到。

參考from :  https://www.rdoproject.org/install/quickstart/ 

Packstack quickstart: Proof of concept for single node

Packstack is an installation utility that lets you spin up a proof of concept cloud on one node. You will be able toadd more nodes to your OpenStack cloud later, if you choose.

  • If you are looking for instructions on how to deploy a production-ready cloud, possibly with HA, see theTripleO quickstart.

  • If you just want to try out OpenStack without installing anything, check out TryStack.

This document describes installing the current Mitaka release.

Summary for the impatient

If you are using non-English locale make sure your /etc/environment is populated:

LANG=en_US.utf-8
LC_ALL=en_US.utf-8

If your system meets all the prerequisites mentioned below, proceed with running the following commands.

  • On RHEL:

    $ sudo yum install -y https://www.rdoproject.org/repos/rdo-release.rpm
    $ sudo yum update -y
    $ sudo yum install -y openstack-packstack
    $ packstack --allinone
    
  • On CentOS:

    $ sudo yum install -y centos-release-openstack-mitaka
    $ sudo yum update -y
    $ sudo yum install -y openstack-packstack
    $ packstack --allinone
    

Step 0: Prerequisites

Software

Red Hat Enterprise Linux (RHEL) 7 is the minimum recommended version, or the equivalent version of one of the RHEL-based Linux distributions such asCentOS,Scientific Linux, and so on.x86_64 is currently the only supported architecture.

Name the host with a fully qualified domain name rather than a short-form name to avoid DNS issues with Packstack.

Hardware

Machine with at least 4GB RAM, preferably 6GB RAM, processors with hardware virtualization extensions, and at least one network adapter.

Network

If you plan on having external network access to the server and instances, this is a good moment to properly configure your network settings. A static IP address to your network card, and disabling NetworkManager are good ideas.

$ sudo systemctl disable NetworkManager $ sudo systemctl enable network $ sudo systemctl stop NetworkManager.service $ sudo systemctl start network.service

If you are planing on something fancier, read the document on advanced networking before proceeding.

Step 1: Software repositories

On RHEL, download and install the RDO repository RPM to set up the OpenStack repository:

$ sudo yum install -y https://rdoproject.org/repos/rdo-release.rpm

On CentOS, the Extras repository provides the RPM that enables the OpenStack repository.Extras is enabled by default on CentOS 7, so you can simply install the RPM to set up the OpenStack repository:

$ sudo yum install -y centos-release-openstack-mitaka

Update your current packages:

$ sudo yum update -y

Looking for an older version? See http://rdoproject.org/repos/ for the full listing.

Step 2: Install Packstack Installer

$ sudo yum install -y openstack-packstack

Step 3: Run Packstack to install OpenStack

Packstack takes the work out of manually setting up OpenStack. For a single node OpenStack deployment, run the following command:

$ packstack --allinone

If you encounter failures, see the Workarounds page for tips.

If you have run Packstack previously, there will be a file in your home directory named something likepackstack-answers-20130722-153728.txt You will probably want to use that file again, using the--answer-file option, so that any passwords you have already set (for example, mysql) will be reused.

The installer will ask you to enter the root password for each host node you are installing on the network, to enable remote configuration of the host so it can remotely configure each node using Puppet.

Once the process is complete, you can log in to the OpenStack web interface Horizon by going tohttp://$YOURIP/dashboard. The user name isadmin. The password can be found in the filekeystonerc_admin in the/root directory of the control node.

Next steps

Now that your single node OpenStack instance is up and running, you can read on aboutrunning an instance, configuring afloating IP range, configuring RDO to work with your existing network, or about expanding your installation by adding a compute node.


使用配置參考:

https://www.linuxtechi.com/launch-instance-from-openstack-dashboard/

Launch an Instance from OpenStack (Liberty) Dashboard

To Launch an instance from OpenStack dashboard, first we need to finish following steps :

  • Create a Project and add a member to the Project.
  • Create a Image and Flavor
  • Create a Network and Router for a Project.

In my Case i will use Project Name as “Innovation” and linuxtechi as Project Member of Innovation.

  • Internal Network = 10.10.10.0/24
  • External Network or Floating IP Network = 192.168.1.0/24
  • Gateway of External Network = 192.168.1.1

Create a Project and add a member to the Project.

Login to the dashboard using Admin credentials and Go to Identity Tab –> Projects and Click on Create Project.

Create-Projects-OpenStack-Dashboard

Click on “Create Project” , We can also set the Quota for the project from Quota Tab.

To create Users , Go to Identify Tab–> Users–> Click on ‘Create User’

In my case i have specify the followings :

  • User Name = linuxtechi
  • email = [email protected]
  • password = xxxxxx
  • Primary Project = innovation
  • Role = member

Create-Users-OpenStack-Dashboard

Create a flavor and image :

To create a flavor login in dashboard using admin credentials , Go to Admin Tab –> Flavors –> Click on create Flavor.

Flavors-OpenStack-Dashboard

Specify the Flavor Name (fedora.small) , VCPU , Root Disk , Ephemeral Disk & Swap disk.

Create-Flavors-OpenStack-Dashboard

To Create Image , Go to Admin Tab –> Images—> Click on Create Image.

Specify the Image Name , Description, Image Soure ( in my case i am using Image File as i have already downloaded the ) , Format QCOW2

Create-Images-OpenStack Dashboard

Create Network and Router for Project Innovation.

To create Network and router for Innovation project sign out of admin user and login as “linuxtechi” user in dashboard.

Go to the Network Tab —> Click on Networks —> then Click on Create Network

Specify the Network Name as Internal

internal-network-name-openstack

click on Next..

Specify the Subnet name (sub-internal) and Network Address (10.10.0.0/24)

internal-subnet-name-openstack

Click on Next..

click-create-internal-network-openstack

VMs will be getting internal ip from DHCP Server because we enable DHCP option for internal network.

Now Create External Network . Click on “Create Network” again , Specify Network Name as “external

external-network-openstack-dashboard

Click on Next…

Specify subnet Name as “sub-external” & Network Address as “192.168.1.0/24

subnet-name-external-name-openstack

Click on Next

Untick  “Enable DHCP” option and Specify the ip address pool for external network.

ipaddress-pool-external-network-openstack

Click on Create.

Now time to create a Router.

Go To Network Tab –> Routers –> Click on ‘+ Create Router’

create-router-openstack

Now Mark External network as “External” , this task can be completed only from admin user , so logout from linuxtechi user and login as admin.

Go to Admin Tab —> Networks–> Click on Edit Network for “External”

Set-External-Networks-OpenStack-Dashboard

Click on Save Changes

Now Logout from admin user and login as linuxtechi user.

Go to Network Tab —> Routers –> for Router1 click on “Set Gateway”

Set-Gateway-Router-OpenStack-Dashboard

Click on “Set Gateway” , this will add a interface on router and will assign the first ip of external subnet (192.168.1.0/24).

Add internal interface to router as well , Click on the “router1″ and select on “interfaces” and then click on “Add interface”

Add-internal-interface-router-OpenStack-Dashboard

Click on Add interface.

Network Part is completed Now & we can view Network Topology from “Network Topology” Tab

Network-Topology-OpenStack-Dashboard

Now Create a key pair that will be used for accessing the VM and define the Security firewall rules.

For creating a key pair

Go to ‘Access & Security’  Tab —> Click on Key Pairs –> then click on ‘Create Key Pair

Access-security-OpenStack-Dashboard

It will create a Key pair with name “myssh-keys.pem

Add a new Security Group with name ‘fedora-rules’ from Access & Security Tab. Allow 22 and ICMP from Internet ( 0.0.0.0 ).

Security-Group-OpenStack-Dashboard

Once the Security Group ‘fedora-rules’ created , click on Manage Rules and allow 22 & ICMP ping.

Manage-Security-Group-Rules-OpenStack Dashboard

Click on Add , Similarly add a rule for ICMP.

Now Finally it’s time to Launch an instance.

Go to Compute Tab –> Click on Instances –> then click on ‘Launch Instance’

Instances-Details-OpenStack-Dashboard

Specify the Instance Name , Flavor that we created in above steps and ‘Boot from image’ from Instance Boot Source option and Select Image Name ‘fedora-image’.

Click on ‘Access & Security’ and Select the Security Group ‘fedora-rules’ & Key Pair ”myssh-keys

Instances-Security-group-keypair-OpenStack-Dashboard

Now Select Networking and add ‘Internal’ Network and the Click on Launch ….

Instances-Network-OpenStack-Dashboard

Once the VM is launched , Associate a floating ip so that we can access the VM.

Associate-floating-ip-Instances-OpenStack-Dashboard

Click on ‘Associate Floating IP

Allocating-floating-OpenStack Dashboard

Click on Allocate IP.

Associate-floating-ip-instance-OpenStack-Dashboard

Click on Associate

Instances-internal-floating-OpenStack-Dashboard

Now try to access the VM with floating IP ( 192.168.1.20) using keys.

Access-openstack-instance-using-keys

As we can see above that we are able to access the VM using keys. Our task of launching a VM from Dashboard is Completed Now.

Hope you like steps and do not hesitate to share this article.