GNU/Linux >> Linux の 問題 >  >> Ubuntu

Ubuntu14.04.2でのOpenStackKilo–Novaの構成

このガイドは、OpenStak環境でNova(Compute)サービスを構成するのに役立ちます。OpenStackでは、コンピューティングサービス(ノード)を使用してクラウドコンピューティングシステムをホストおよび管理します。 OpenStackコンピューティングは、IaaSの主要な部分であり、認証のためにKeyStoneと対話し、ディスクとイメージのためのイメージサービス、およびユーザーと管理インターフェースのためのダッシュボードと相互作用します。

OpenStack Computeは、標準のハードウェアで水平方向にスケーリングし、イメージをダウンロードしてコンピューティングインスタンスを起動できます。

コントローラーノードのインストールと構成:

ControllerノードでComputeサービスを構成し、rootユーザーとしてMySQLサーバーにログインします。

# mysql -u root -p

novaデータベースを作成します。

CREATE DATABASE nova;

novaデータベースに適切な権限を付与します。

GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'password';

「パスワード」を適切なパスワードに置き換えます。 MySQLを終了します。

環境スクリプトから管理者クレデンシャルをロードします。

# source admin-openrc.sh

サービス資格情報を作成するためのnovaユーザーを作成します。

# openstack user create --password-prompt nova
User Password:
Repeat User Password:
+----------+----------------------------------+
| Field    | Value                            |
+----------+----------------------------------+
| email    | None                             |
| enabled  | True                             |
| id       | 58677ccc7412413587d138f686574867 |
| name     | nova                             |
| username | nova                             |
+----------+----------------------------------+

novaユーザーに管理者の役割を追加します。

# openstack role add --project service --user nova admin
+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 33af4f957aa34cc79451c23bf014af6f |
| name  | admin                            |
+-------+----------------------------------+

novaサービスエンティティを作成します。

# openstack service create --name nova --description "OpenStack Compute" compute

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Compute                |
| enabled     | True                             |
| id          | 40bc66cafb164b18965528c0f4f5ab83 |
| name        | nova                             |
| type        | compute                          |
+-------------+----------------------------------+

novaサービスAPIエンドポイントを作成します。

# openstack endpoint create \
--publicurl http://controller:8774/v2/%\(tenant_id\)s \
--internalurl http://controller:8774/v2/%\(tenant_id\)s \
--adminurl http://controller:8774/v2/%\(tenant_id\)s \
--region RegionOne \
compute

+--------------+-----------------------------------------+
| Field        | Value                                   |
+--------------+-----------------------------------------+
| adminurl     | http://controller:8774/v2/%(tenant_id)s |
| id           | 3a61334885334ccaa822701ac1091080        |
| internalurl  | http://controller:8774/v2/%(tenant_id)s |
| publicurl    | http://controller:8774/v2/%(tenant_id)s |
| region       | RegionOne                               |
| service_id   | 40bc66cafb164b18965528c0f4f5ab83        |
| service_name | nova                                    |
| service_type | compute                                 |
+--------------+-----------------------------------------+

コンピュートコントローラーコンポーネントのインストールと構成:

コントローラーノードにパッケージをインストールします。

# apt-get install nova-api nova-cert nova-conductor nova-consoleauth nova-novncproxy nova-scheduler python-novaclient

/etc/nova/nova.confを編集します。

# nano /etc/nova/nova.conf

以下の設定を変更し、適切なセクションにエントリを配置してください。

[DEFAULT]
...
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 192.168.12.21 
## Management IP of Controller Node
vncserver_listen = 192.168.12.21 
## Management IP of Controller Node
vncserver_proxyclient_address = 192.168.12.21 
## Management IP of Controller Node

[database]
connection = mysql://nova:password@controller/nova

## Replace "password" with the password you chose for nova database

[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = password

## Replace "password" with the password you chose for the openstack account in RabbitMQ.

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = password

## Replace "password" with the password you chose for nova user in the identity service

[glance]
host = controller

[oslo_concurrency]
lock_path = /var/lib/nova/tmp

Computeデータベースにデータを入力します。

#  su -s /bin/sh -c "nova-manage db sync" nova

コンピューティングサービスを再起動します。

# service nova-api restart
# service nova-cert restart
# service nova-consoleauth restart
# service nova-scheduler restart
# service nova-conductor restart
# service nova-novncproxy restart

SQLiteデータベースファイルを削除します。

# rm -f /var/lib/nova/nova.sqlite

Nova(計算ノード)のインストールと構成:

ここでは、コンピュートノードにコンピュートサービスをインストールして構成します。このサービスは、インスタンス(VM)をデプロイするための複数のハイパーバイザーをサポートします。コンピューティングノードは、KVM拡張機能を備えたQEMUハイパーバイザーを使用して、ハードウェアアクセラレーションによる仮想化をサポートします。

コンピューティングがハードウェア仮想化をサポートしているかどうかを確認します。

# egrep -c '(vmx|svm)' /proc/cpuinfo
1

コマンドが値1以上で返される場合、計算ノードは仮想化をサポートしています。

ComputeNodeでOpenStackKiloリポジトリーが有効になっていることを確認するか、以下の手順に従って有効にしてください。

UbuntuCloudアーカイブキーリングとリポジトリをインストールします。

# apt-get install ubuntu-cloud-keyring

# echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu" "trusty-updates/kilo main" > /etc/apt/sources.list.d/cloudarchive-kilo.list

システムをアップグレードします。

# apt-get update

次のパッケージをすべてのコンピュートノードにインストールします。

# apt-get install nova-compute sysfsutils

/etc/nova/nova-compute.confを編集して、QEMUを有効にします。

# nano /etc/nova/nova-compute.conf/
Change virt_type=kvm to qemu in libvirt section.
[libvirt]
...
virt_type = qemu

/etc/nova/nova.confを編集します。

# nano /etc/nova/nova.conf

以下の設定を変更し、適切なセクションにエントリを配置してください。

[DEFAULT]
...
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 192.168.12.23
## Management IP of Compute Node
vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 192.168.12.23
## Management IP of Compute Node
novncproxy_base_url = http://controller:6080/vnc_auto.html

[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = password
## Replace "password" with the password you chose for the openstack account in RabbitMQ.

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = password

## Replace "password" with the password you chose for nova user in the identity service

[glance]
host = controller

[oslo_concurrency]
lock_path = /var/lib/nova/tmp

コンピューティングサービスを再起動します。

# service nova-compute restart

SQLiteデータベースファイルを削除します。

# rm -f /var/lib/nova/nova.sqlite

操作の確認:

コントローラノードに管理者クレデンシャルをロードします。

# source admin-openrc.sh

検証するコンピューティングサービスコンポーネントを一覧表示し、コントローラーノードで次のコマンドを実行します。

# nova service-list
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host       | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| 1  | nova-cert        | controller | internal | enabled | up    | 2015-06-29T20:38:48.000000 | -               |
| 2  | nova-conductor   | controller | internal | enabled | up    | 2015-06-29T20:38:46.000000 | -               |
| 3  | nova-consoleauth | controller | internal | enabled | up    | 2015-06-29T20:38:41.000000 | -               |
| 4  | nova-scheduler   | controller | internal | enabled | up    | 2015-06-29T20:38:50.000000 | -               |
| 5  | nova-compute     | compute    | nova     | enabled | up    | 2015-06-29T20:38:49.000000 | -               |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+

コントローラノードで4つのサービスコンポーネントが有効になり、コンピュートノードで1つのサービスコンポーネントが有効になっている出力が得られるはずです。

画像サービスカタログに画像を一覧表示して、画像サービスとの接続を確認します。

# nova image-list
+--------------------------------------+---------------------+--------+--------+
| ID                                   | Name                | Status | Server |
+--------------------------------------+---------------------+--------+--------+
| b19c4522-df31-4331-a2e1-5992abcd4ded | Ubuntu_14.04-x86_64 | ACTIVE |        |
+--------------------------------------+---------------------+--------+--------+

以上です!!!これで、Novaサービスが正常に構成されました。次は、OpenStack Networking(Neutron)を構成することです。


Ubuntu
  1. Ubuntu14.04LTSでのOpenStackLiberty–Novaの構成

  2. Ubuntu14.04.2でのOpenStackKilo– Neutron#1の構成

  3. Ubuntu14.04.2上のOpenStackKilo–Glanceの構成

  1. Ubuntu14.04.2でのOpenStackKilo– KeyStone#2の構成

  2. Ubuntu14.04.2でのOpenStackKilo– KeyStone#1の構成

  3. Ubuntu14.04.2にOpenStackKiloをインストールします

  1. Ubuntu14.04.2でのOpenStackKilo– Swift#1の構成

  2. Ubuntu14.04.2でのOpenStackKilo– Cinder#2の構成

  3. Ubuntu14.04.2でのOpenStackKilo– Cinder#1の構成