2015年10月29日木曜日

Oracle OpenStack を VirtualBox に構築。その4

またまたまた引き続き、
Oracle OpenStack for Oracle Linux R1 + Oracle VM Server(OVMS)の環境を、
VirtualBox に作っていきます。

これまでの話はこちら。
Oracle OpenStack を VirtualBox に構築。その1
Oracle OpenStack を VirtualBox に構築。その2
Oracle OpenStack を VirtualBox に構築。その3

今回は OpenStack を構築する、「packstack」 を実行します。

今回は、本当に packstack コマンドを実行するだけです。
また、あとからやり直しができるように
packstack 実行前に VirtualBox でのスナップショットを取得しておくと便利です。
  • --install-hosts では、Control Node (192.168.56.21) を最初に指定して、その後 Control Node を指定しています。
  • ネットワークタイプは、VLAN を指定しています。
  • --novavncproxy-hosts には、Control Node でコンソールを開く際に使用する IP アドレスを指定しています。

実行すると、下記のような感じになります。
コマンド内部では yum や pappet が実行されるので、結構時間がかかります。
[root@osctl01 ~]# packstack --install-hosts=192.168.56.21,192.168.56.11,192.168.56.12 --neutron-ovs-tenant-network-type=vlan --neutron-ovs-vlan-ranges=default:100:200 --neutron-ovs-bridge-mappings=default:br-eth2 --neutron-ovs-bridge-interfaces=br-eth2:eth2 --novavncproxy-hosts=192.168.56.21
Welcome to Installer setup utility
Packstack changed given value  to required value /root/.ssh/id_rsa.pub

Installing:
Clean Up                                             [ DONE ]
root@192.168.56.21's password:  ★パスワードを入力
root@192.168.56.11's password:  ★パスワードを入力
root@192.168.56.12's password:  ★パスワードを入力
Setting up ssh keys                                  [ DONE ]
Discovering hosts' details                           [ DONE ]
Adding pre install manifest entries                  [ DONE ]
Adding MySQL manifest entries                        [ DONE ]
Adding AMQP manifest entries                         [ DONE ]
Adding Keystone manifest entries                     [ DONE ]
Adding Glance Keystone manifest entries              [ DONE ]
Adding Glance manifest entries                       [ DONE ]
Installing dependencies for Cinder                   [ DONE ]
Adding Cinder Keystone manifest entries              [ DONE ]
Adding Cinder manifest entries                       [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ 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 Nova Common manifest entries                  [ DONE ]
Adding Openstack Network-related Nova 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 LBaaS Agent manifest entries          [ DONE ]
Adding Neutron Metadata Agent manifest entries       [ DONE ]
Adding OpenStack Client manifest entries             [ DONE ]
Adding Horizon manifest entries                      [ DONE ]
Adding post install manifest entries                 [ DONE ]
Preparing servers                                    [ DONE ]
Installing Dependencies                              [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 192.168.56.21_prescript.pp
Applying 192.168.56.11_prescript.pp
Applying 192.168.56.12_prescript.pp
192.168.56.21_prescript.pp:                          [ DONE ]
192.168.56.11_prescript.pp:                          [ DONE ]
192.168.56.12_prescript.pp:                          [ DONE ]
Applying 192.168.56.21_mysql.pp
Applying 192.168.56.21_amqp.pp
192.168.56.21_mysql.pp:                              [ DONE ]
192.168.56.21_amqp.pp:                               [ DONE ]
Applying 192.168.56.21_keystone.pp
Applying 192.168.56.21_glance.pp
Applying 192.168.56.21_cinder.pp
192.168.56.21_keystone.pp:                           [ DONE ]
192.168.56.21_glance.pp:                             [ DONE ]
192.168.56.21_cinder.pp:                             [ DONE ]
Applying 192.168.56.21_api_nova.pp
192.168.56.21_api_nova.pp:                           [ DONE ]
Applying 192.168.56.21_nova.pp
Applying 192.168.56.11_nova.pp
Applying 192.168.56.12_nova.pp
192.168.56.21_nova.pp:                               [ DONE ]
192.168.56.11_nova.pp:                               [ DONE ]
192.168.56.12_nova.pp:                               [ DONE ]
Applying 192.168.56.21_neutron.pp
Applying 192.168.56.11_neutron.pp
Applying 192.168.56.12_neutron.pp
192.168.56.11_neutron.pp:                            [ DONE ]
192.168.56.12_neutron.pp:                            [ DONE ]
192.168.56.21_neutron.pp:                            [ DONE ]
Applying 192.168.56.21_osclient.pp
Applying 192.168.56.21_horizon.pp
192.168.56.21_osclient.pp:                           [ DONE ]
192.168.56.21_horizon.pp:                            [ DONE ]
Applying 192.168.56.21_postscript.pp
Applying 192.168.56.11_postscript.pp
Applying 192.168.56.12_postscript.pp
192.168.56.11_postscript.pp:                         [ DONE ]
192.168.56.12_postscript.pp:                         [ DONE ]
192.168.56.21_postscript.pp:                         [ DONE ]
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]

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


Additional information:
* A new answerfile was created in: /root/packstack-answers-20151028-233222.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.56.21. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.56.21/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* Because of the kernel update the host 192.168.56.21 requires reboot.
* Because of the kernel update the host 192.168.56.11 requires reboot.
* Because of the kernel update the host 192.168.56.12 requires reboot.
* The installation log file is available at: /var/tmp/packstack/20151028-233222-Ff8sPE/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20151028-233222-Ff8sPE/manifests
[root@osctl01 ~]#

終了すると、この時点でも OpenStack コンポーネントのサービスは起動しています。

たとえば、2台の Compute Node が 登録されていることもわかります。
※keystonerc_admin ファイルを読み込んでからコマンド実行します。
[root@osctl01 ~]# source keystonerc_admin[root@osctl01 ~(keystone_admin)]# nova hypervisor-list
+----+---------------------+
| ID | Hypervisor hostname |
+----+---------------------+
| 1  | ovms11              |
| 2  | ovms12              |
+----+---------------------+

いったん、ここで Control Node / Compute Node を再起動しておきます。

Control Node
[root@osctl01 ~(keystone_admin)]# reboot
Compute Node #1
[root@ovms11 ~]# reboot
Compute Node #2
[root@ovms12 ~]# reboot

再起動後、OpenStack コンポーネントは自動起動されます。

Control Node
keystonerc_admin は、ただ Status を見るだけなら読み込まないほうが見やすいかもしれません。
[root@osctl01 ~]# source keystonerc_admin
[root@osctl01 ~(keystone_admin)]# openstack-status
== Nova services ==
openstack-nova-api:                     active
openstack-nova-cert:                    active
openstack-nova-compute:                 dead      (disabled on boot)
openstack-nova-network:                 dead      (disabled on boot)
openstack-nova-scheduler:               active
openstack-nova-conductor:               active
== Glance services ==
openstack-glance-api:                   active
openstack-glance-registry:              active
== Keystone service ==
openstack-keystone:                     active
== Horizon service ==
openstack-dashboard:                    active
== neutron services ==
neutron-server:                         active
neutron-dhcp-agent:                     active
neutron-l3-agent:                       active
neutron-metadata-agent:                 active
neutron-lbaas-agent:                    inactive  (disabled on boot)
neutron-openvswitch-agent:              active
== Cinder services ==
openstack-cinder-api:                   active
openstack-cinder-scheduler:             active
openstack-cinder-volume:                active
openstack-cinder-backup:                inactive  (disabled on boot)
== Support services ==
openvswitch:                            active
messagebus:                             dead      (disabled on boot)
tgtd:                                   active
rabbitmq-server:                        active
memcached:                              active

== Keystone users ==
+----------------------------------+---------+---------+-------------------+
|                id                |   name  | enabled |       email       |
+----------------------------------+---------+---------+-------------------+
| 695d91537c7a4e6fb672e856a6fa5900 |  admin  |   True  |   test@test.com   |
| b7b43574838b415796bddd176900de50 |  cinder |   True  |  cinder@localhost |
| e8efc9dd1574483f9f1e6d21a7486a3c |  glance |   True  |  glance@localhost |
| 93d2746015f6453db863b52691ff5de8 | neutron |   True  | neutron@localhost |
| 420cb7c59be04cadbd7120e8f590c069 |   nova  |   True  |   nova@localhost  |
+----------------------------------+---------+---------+-------------------+
== Glance images ==
+----+------+-------------+------------------+------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+----+------+-------------+------------------+------+--------+
+----+------+-------------+------------------+------+--------+
== Nova managed services ==
+------------------+---------+----------+---------+-------+----------------------------+-----------------+
| Binary           | Host    | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+------------------+---------+----------+---------+-------+----------------------------+-----------------+
| nova-consoleauth | osctl01 | internal | enabled | up    | 2015-10-28T18:19:37.000000 | -               |
| nova-scheduler   | osctl01 | internal | enabled | up    | 2015-10-28T18:19:37.000000 | -               |
| nova-conductor   | osctl01 | internal | enabled | up    | 2015-10-28T18:19:44.000000 | -               |
| nova-cert        | osctl01 | internal | enabled | up    | 2015-10-28T18:19:37.000000 | -               |
| nova-compute     | ovms11  | nova     | enabled | up    | 2015-10-28T18:19:42.000000 | -               |
| nova-compute     | ovms12  | nova     | enabled | up    | 2015-10-28T18:19:44.000000 | -               |
+------------------+---------+----------+---------+-------+----------------------------+-----------------+
== Nova networks ==
+----+-------+------+
| ID | Label | Cidr |
+----+-------+------+
+----+-------+------+
== Nova instance flavors ==
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1  | m1.tiny   | 512       | 1    | 0         |      | 1     | 1.0         | True      |
| 2  | m1.small  | 2048      | 20   | 0         |      | 1     | 1.0         | True      |
| 3  | m1.medium | 4096      | 40   | 0         |      | 2     | 1.0         | True      |
| 4  | m1.large  | 8192      | 80   | 0         |      | 4     | 1.0         | True      |
| 5  | m1.xlarge | 16384     | 160  | 0         |      | 8     | 1.0         | True      |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
== Nova instances ==
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+

Compute Node
[root@ovms11 ~]# openstack-status
== Nova services ==
openstack-nova-api:                     dead      (disabled on boot)
openstack-nova-compute:                 active
openstack-nova-network:                 dead      (disabled on boot)
openstack-nova-scheduler:               dead      (disabled on boot)
== neutron services ==
neutron-server:                         inactive  (disabled on boot)
neutron-dhcp-agent:                     inactive  (disabled on boot)
neutron-l3-agent:                       inactive  (disabled on boot)
neutron-metadata-agent:                 inactive  (disabled on boot)
neutron-lbaas-agent:                    inactive  (disabled on boot)
neutron-openvswitch-agent:              active
== Support services ==
libvirtd:                               active
openvswitch:                            active
messagebus:                             active
Warning novarc not sourced

以上、今回は packstack の実行でした。つづく・・・

0 件のコメント:

コメントを投稿