NTNX>日記

個人的な趣味による Nutanix Community Edition 日記。Japanese のみですみません。

Nutanix OpenStack service VM (OVM) の RPM。

Nutanix OpenStack Servieice VM(OVM)にインストールされている RPM を見てみました。

OVM は、CentOS 7 ベースの VM です。

[root@ovm01 ~]# cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)

Nutanix から提供されている、Acropolis OpenStack Driver の RPM がインストールされています。これが OVM 特有の RPM で、Nutanix と OpenStack との連携をシンプルにすることができます。この RPM をインストールすれば、OVM を使用しなくても物理サーバ / VM をとわず OVM と同様の機能が提供できるようです。

RPM のバージョンを見ると 1年以上前のもののように見えますが、実際ビルドされたのはわりと最近です。

[root@ovm01 ~]# rpm -qi nutanix_openstack
Name        : nutanix_openstack
Version     : 2015.1.0
Release     : 1
Architecture: noarch
Install Date: Thu 11 Feb 2016 07:31:25 AM PST
Group       : Unspecified
Size        : 1280839
License     : Nutanix
Signature   : (none)
Source RPM  : nutanix_openstack-2015.1.0-1.src.rpm
Build Date  : Thu 11 Feb 2016 07:29:59 AM PST
Build Host  : ravi-dev-ovm.dev.eng.nutanix.com
Relocations : (not relocatable)
Summary     : Acropolis drivers for Openstack Kilo.
Description :
A collection of Acropolis drivers for using OpenStack on Nutanix.
続きを読む

Nutanix CE で OpenStack。Part5: OVM-services 構成の動作確認。

Nutanix ₊ OpenStack を Controller と Acropolice Driver ノードを別サーバとして構成してみました。今回は、Nova / Neutron / Cinder / Glance のサービスが実際に使用できることを確認します。

前回構成した環境を OS ごと再起動して、下記のような状態にしてあります。

続きを読む

Nutanix OVM 2015.1.0 の OpenStack Horizon Dashboard のログイン問題対応。

Nutanix OpenStack Servieice VM(OVM)2015.1.0 で、Horizon ダッシュボードのログイン時に、どこかがおかしくなることがあります。

f:id:gowatana:20160414051519p:plain

今回の OVM はこれです。

[root@ovm02 ~]# ovmctl --show | tail -n 6
Version:
--------
Version     : 2015.1.0
Release     : 1
Summary     : Acropolis drivers for Openstack Kilo.

ちなみに、Horizon Dashboard の RPM はこれです。

[root@ovm02 ~]# rpm -q python-django-horizon
python-django-horizon-2015.1.1-1.el7.noarch
続きを読む

Prism でのアラート抑止。

Nutanix CE On Demand を使用していると、けっこう頻繁に Prism にアラートが表示されます。いろいろ検証するときにノイズになりそうでも何ともしがたい アラートを、とりあえず抑止してみます。

今回は IPMI の Critical アラートを抑止します。

f:id:gowatana:20160413234511p:plain

Prism の Alert 画面で、抑止したいアラートの編集ボタンをクリックします。
Update Alert Policy 画面に、IPMI Error の「Critical」チェックボックスを OFF にして、Save すると、このアラートは抑止されます。

f:id:gowatana:20160413234639p:plain

すでに上がっているアラートは、上記のようにポリシー変更できますが、それ以外の者は Alert 画面の「+ Alert Policies」をクリックすると表示される画面で検索して、ポリシー設定を変更することができます。

f:id:gowatana:20160413235517p:plain

以上。

Nutanix CE On Demand の、ce-2016.03.13-stable Blueprint。

Nutanix CE On Demand の、ce-2016.03.13-stable バージョンの Blueprint が公開されてました。

NUTANIX COMMUNITY EDITION (2016.03.13)

https://www.ravellosystems.com/repo/blueprints/69605214

f:id:gowatana:20160412214744p:plain

今回の On Demand 版は、起動しただけだと 名前解決ができず、NEXT コミュニティアカウントの認証ができませんでした。通常の CE と同様、オンライン認証前に DNS サーバを設定する必要があります。

f:id:gowatana:20160412225301p:plain

CVM (AHV ではなく)に SSH ログインして確認してみます。

一応バージョンを確認してみると、ce-2016.03.13-stable です。

nutanix@NTNX-b3b7a3a8-A-CVM:10.1.1.11:~$ cat /etc/nutanix/release_version
el6-release-ce-2016.03.13-stable-93b61febe28a6e6140d351ec72c9bcaae107b9ef
nutanix@NTNX-b3b7a3a8-A-CVM:10.1.1.11:~$ cat /etc/nutanix/svm-version
4.6r11

CVM では、DNS サーバ指定が未設定でした。

nutanix@NTNX-b3b7a3a8-A-CVM:10.1.1.11:~$ ncli cluster get-name-servers

    Name Servers              :

Nutanix CE On Demand の Ravello Application で指定されている DNS サーバアドレスを設定しました。

nutanix@NTNX-b3b7a3a8-A-CVM:10.1.1.11:~$ ncli cluster add-to-name-servers servers=10.1.1.1

    Name Servers              : 10.1.1.1

オンライン認証が通りました。

f:id:gowatana:20160412225932p:plain

ちなみに、以前の Nutanix CE On Demand では、なぜか eth0 の IP アドレスが /22 で設定されていたのですが、今度はなぜか /20 でした。

nutanix@NTNX-b3b7a3a8-A-CVM:10.1.1.11:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:dc:19:bd brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.11/20 brd 10.1.15.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fedc:19bd/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:07:cf:53 brd ff:ff:ff:ff:ff:ff
    inet 192.168.5.2/25 brd 192.168.5.127 scope global eth1
       valid_lft forever preferred_lft forever
    inet 192.168.5.254/24 brd 192.168.5.255 scope global eth1:1
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe07:cf53/64 scope link
       valid_lft forever preferred_lft forever

以上。

Nutanix CE で OpenStack。Part3: とりあえず Nova インスタンスを起動。

Nutanix OVM で、OpenStack 環境を構築してみました。

今回は、Nova でのインスタンス(VM)起動をしてみます。
その準備として、ディスクイメージの登録と、ネットワーク作成もしてみます。

ダッシュボードへのログイン(Horizon)

今回は、Horizon のダッシュボードから操作します。
All-in-one 構成にしているため、Web ブラウザから OVM の TCP 443 ポート(下記のURL)にアクセスすると、ダッシュボードを表示できます。

https://<OVM のアドレス>/
※Ravello 環境の場合は、NAT されているパブリック IP アドレスからアクセスします。

おなじみのログイン画面が表示されるので、admin ユーザでログインします。
※パスワードは OVM の  /root/keystonerc_admin ファイルに記載されています。

f:id:gowatana:20160409210107p:plain

ハイパーバイザとして、Nutanix クラスタが AHV として登録されています。

f:id:gowatana:20160409210517p:plain

ディスクイメージ登録(Glance)

VM のディスクイメージを登録しておきます。
今回は、軽量 OS である CirrOS を使用しています。

http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img

管理 → システム → イメージ を開いて、「+イメージの作成」をクリックします。

f:id:gowatana:20160409211040p:plain

今回の設定です。

  • 名前: CirrOS
  • イメージソース: イメージファイル
  • イメージファイル: ダウンロードしておいた cirros-0.3.4-x86_64-disk.img ファイルを指定。
  • 形式: QCOW2  ※CirrOS のディスクイメージに合わせた。
  • パブリック: チェックを入れる。 ※admin 以外のテナントでも使用できるように。

f:id:gowatana:20160409211234p:plain

少し待つとディスクイメージが登録されます。

f:id:gowatana:20160409211546p:plain

ネットワークの作成(Neutron)

ネットワーク作成前に Nutanix の Prism UI から、現時点で作成済みのネットワークを確認しておきます。この環境には、vlan.0 ネットワークだけ作成されています。

f:id:gowatana:20160409211920p:plain

OpenStack の Horizon ダッシュボードから、ネットワークを作成します。

プロジェクト → ネットワーク → ネットワーク を開いて、「+ネットワークの作成」をクリックします。

f:id:gowatana:20160409212032p:plain

「net01」というネットワークを作成します。

f:id:gowatana:20160409212209p:plain

サブネットも作成します。サブネットがないとインスタンス起動時にエラーになるため、必ず作成しておきます。
サブネット名、ネットワークアドレス、ゲートウェイ IP を入力しますが、今回はとりあえず適当なアドレスを指定しています。

f:id:gowatana:20160409212322p:plain

サブネットの詳細 では、下記を設定してから、「作成」をクリックします。
不足があると、(ML2 の acropolis ドライバの仕様で?)サブネット作成が失敗するので、とりあえずアドレスを入力しておきます。

  • DHCP 有効: チェックを入れる。
  • IP アドレス割り当てプール: IP アドレスのレンジを「,」で区切って入力。
  • DNS サーバー: 参照させる想定がなくても何か入力しておく。

f:id:gowatana:20160409213055p:plain

ちなみに、サブネット作成時にパラメータ入力が不足していると、エラーでサブネットが作成されません。OVM のログを見ると下記のようなエラーが出るのですが、このときは、だいたい上記画面での設定がたりていないようです。

/var/log/neutron/server.log より

2016-04-02 05:19:17.946 11544 ERROR neutron.plugins.ml2.managers [req-3d98f824-546a-48fc-b805-2b56ca42c29b ] Mechanism driver 'acropolis' failed in create_subnet_postcommit

入力値に問題がないと、ネットワーク(とサブネット)が作成されます。

f:id:gowatana:20160409213206p:plain

インスタンスの起動(Nova)

作成したイメージとネットワークを指定して、インスタンス(VM)を起動してみます。

プロジェクト → コンピュート → インスタンス を開いて、「+インスタンスの起動」をクリックします。

f:id:gowatana:20160409214051p:plain

「詳細」画面で、下記を設定します。

  • インスタンス名: VM の名前。
  • インスタンスのブートソース: イメージから起動
  • イメージ名: CirrOS ※先ほど登録したディスクイメージ。

f:id:gowatana:20160409214229p:plain

「ネットワーク」画面で、先ほど作成したネットワークを指定して、「起動」します。

f:id:gowatana:20160409214604p:plain

インスタンスが起動されます。

f:id:gowatana:20160409214728p:plain

少し待つと、ステータスが「稼働中」になります。

f:id:gowatana:20160409215109p:plain

できたものの様子

OpenStack の Horizon UI から見る

インスタンスを起動すると、こんな感じになります。

f:id:gowatana:20160409215217p:plain

「プロジェクト」ではなく「管理」配下のインスタンス画面で見ると、起動したインスタンスのホストは Nutanix クラスタではなく OVM(ovm01)になっています。

f:id:gowatana:20160409215314p:plain

Nutanix の Prism UI から見る

Prism から見ると、OpenStack で指定した インスタンス名の VM が作成・起動されています。

f:id:gowatana:20160409215733p:plain

Network Config の画面をひらくと、net01 に対応する vlan.10 が追加されていました。
※VLAN IDは自動採番されました。

f:id:gowatana:20160409215852p:plain

さきほどネットワーク作成で指定した設定が反映されています。

f:id:gowatana:20160409220038p:plain

vm01 でコンソールを開くと、インスタンスに付与された IP アドレスが設定されています。
ちなみに、今回の環境では Horizon に NAT 経由でアクセスしているので、デフォルトではコンソールが開けません。そのため Prism のコンソールを使用すると便利です。

f:id:gowatana:20160409220227p:plain

以上。

 

 

 

 

 

Nutanix CE で OpenStack。Part2: All-in-one 構成での OVM セットアップ

Nutanix の Acropolis OpenStack Services VM (OVM) を Ravello で試してみました。
Ravello での Nutanix CE にわりあてられるスペック上の事情により、OVM は Nutanix とは独立したサーバとしてデプロイしています。

今回は、OpenStack Controller が OVM に含まれる All-in-one 構成にします。

ovmctl 実行前の OVM の状態

Nutanix CE と、OVM の VM を別に用意しています。
OVM デプロイ直後はネットワーク設定がされていないので、Console から接続します。

f:id:gowatana:20160408073434p:plain

Nutanix には、Prism からアクセスします。
Nutanix CE は、1ノードクラスタで、クラスタ名と、クラスタの VIP は設定済みです。

  • CLUSTER NAME: ntnx-ce
  • CLUSTER VIRTUAL IP ADDRESS: 10.1.1.12

f:id:gowatana:20160408073824p:plain

OVM には、Ravello のコンソールからアクセスします。
ディスクイメージから VM を作成して、ただ起動したままの状態です。
Nutanix 上で起動した場合に合わせて virtio の NIC を選択していて、デフォルトで eth0 として認識しています。

f:id:gowatana:20160408074105p:plain

OVM のセットアップ

まず、ovmctl --add ovm で OVM 自身のセットアップをします。
root (初期パスワードは admin)でログインします。

この時点では、まだ何も OVM の設定がありません。

[root@none ~]# ovmctl --show

Role:
-----
None

OVM configuration:
------------------
None

Openstack Controllers configuration:
------------------------------------
None

Nutanix Clusters configuration:
-------------------------------
None

Version:
--------
Version     : 2015.1.0
Release     : 1
Summary     : Acropolis drivers for Openstack Kilo.

下記のようなコマンドラインを実行します。

  • 今回は事情により、/22 のアドレスにしています。
  • このコマンドを実行するときに、NIC が eth0 ではなく ens3 になっていたりするとエラーになるようです。
[root@none ~]# ovmctl --add ovm --name ovm01 --ip 10.1.1.15 --netmask 255.255.252.0 --gateway 10.1.1.1 --nameserver 10.1.1.1 --domain ntnx.local

f:id:gowatana:20160408075239p:plain

これで、OVM の設定だけでなくネットワーク設定もされます。

[root@ovm01 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 2c:c2:60:4a:22:b6 brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.15/22 brd 10.1.3.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::2ec2:60ff:fe4a:22b6/64 scope link
       valid_lft forever preferred_lft forever

ちょっと不思議な感じですが、ifcfg ファイルにも設定が記載されました。

[root@ovm01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

                    # Generated by OVM
                    ONBOOT="yes"
                    NM_CONTROLLED="no"
                    BOOTPROTO=none
                    TYPE="Ethernet"
                    DEVICE="eth0"
                    IPADDR="10.1.1.15"
                    NETMASK="255.255.252.0"
                    GATEWAY="10.1.1.1"
                    DNS1="10.1.1.1"
                    DOMAIN="ntnx,local"

今回の環境だと、OVM を再起動すると接続ができなくなってしまうので、とりあえず NetworkManager は停止しました。

[root@ovm01 ~]# systemctl stop NetworkManager
[root@ovm01 ~]# systemctl disable NetworkManager
Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.

OVM configuration が追加されました。

[root@ovm01 ~]# ovmctl --show

Role:
-----
None

OVM configuration:
------------------
1     OVM name                     : ovm01
      IP                           : 10.1.1.15
      Netmask                      : 255.255.252.0
      Gateway                      : 10.1.1.1
      Nameserver                   : 10.1.1.1
      Domain                       : ntnx.local

Openstack Controllers configuration:
------------------------------------
None

Nutanix Clusters configuration:
-------------------------------
None

Version:
--------
Version     : 2015.1.0
Release     : 1
Summary     : Acropolis drivers for Openstack Kilo.

OVM への OpenStack コントローラ追加

ここからは SSH で接続しています。プロンプトを見ると、ovmctl --add ovm で指定したホスト名に変更されていることがわかります。

「ovmctl --add controller」でコントローラを追加します。All-in-one 構成なので、コントローラの「--ip」には、OVM 自身の IP アドレスを指定しています。

[root@ovm01 ~]# ovmctl --add controller --name ovm01 --ip 10.1.1.15

1/4: Stop services:
Redirecting to /bin/systemctl stop  openstack-nova-api.service
Redirecting to /bin/systemctl stop  openstack-nova-consoleauth.service
Redirecting to /bin/systemctl stop  openstack-nova-scheduler.service
Redirecting to /bin/systemctl stop  openstack-nova-conductor.service
Redirecting to /bin/systemctl stop  openstack-nova-compute.service
Redirecting to /bin/systemctl stop  openstack-nova-cert.service
Redirecting to /bin/systemctl stop  openstack-nova-novncproxy.service
Redirecting to /bin/systemctl stop  openstack-cinder-api.service
Redirecting to /bin/systemctl stop  openstack-cinder-scheduler.service
Redirecting to /bin/systemctl stop  openstack-cinder-volume.service
Redirecting to /bin/systemctl stop  openstack-cinder-backup.service
Redirecting to /bin/systemctl stop  openstack-glance-registry.service
Redirecting to /bin/systemctl stop  openstack-glance-api.service
Redirecting to /bin/systemctl stop  neutron-dhcp-agent.service
Redirecting to /bin/systemctl stop  neutron-l3-agent.service
Redirecting to /bin/systemctl stop  neutron-metadata-agent.service
Redirecting to /bin/systemctl stop  neutron-openvswitch-agent.service
Redirecting to /bin/systemctl stop  neutron-server.service
Redirecting to /bin/systemctl start  iptables.service
Note: Forwarding request to 'systemctl enable iptables.service'.
Redirecting to /bin/systemctl restart  httpd.service
Successful

2/4: Disconnect controller:
Apply allinone disconnect manifest
Error: NetworkManager is not running.
Notice: Compiled catalog for ovm01.ntnx.local in environment production in 0.65 seconds
Notice: Finished catalog run in 5.96 seconds
Apply services disconnect manifest
Error: NetworkManager is not running.
Notice: Compiled catalog for ovm01.ntnx.local in environment production in 0.41 seconds
Notice: Finished catalog run in 12.97 seconds
Apply glance plugin disconnect manifest
Error: NetworkManager is not running.
Notice: Compiled catalog for ovm01.ntnx.local in environment production in 0.11 seconds
Notice: Finished catalog run in 5.90 seconds
Successful

3/4: Connect controller:
Apply allinone connect manifest
Error: NetworkManager is not running.
Notice: Compiled catalog for ovm01.ntnx.local in environment production in 0.25 seconds
Notice: /Stage[main]/Main/Augeas[ovm_allinone_glance_controller_api_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_allinone_glance_controller_registry_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_allinone_nova_controller_config]/returns: executed successfully
Notice: /Stage[main]/Main/File_line[add_allinone_httpd_config]/ensure: created
Notice: /Stage[main]/Main/Augeas[ovm_allinone_cinder_controller_config]/returns: executed successfully
Notice: Finished catalog run in 4.11 seconds
Apply services connect manifest
Error: NetworkManager is not running.
Notice: Compiled catalog for ovm01.ntnx.local in environment production in 0.45 seconds
Notice: /Stage[main]/Main/Augeas[ovm_nova_cluster_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_nova_controller_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_cinder_controller_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_neutron_controller_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_neutron_cluster_entry_points_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_neutron_controller_ml2_config]/returns: executed successfully
Notice: /Stage[main]/Main/File_line[add-acropolis-driver]/ensure: created
Notice: /Stage[main]/Main/Augeas[ovm_neutron_controller_metadata_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_neutron_controller_ovs_neutron_plugin_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_cinder_cluster_config]/returns: executed successfully
Notice: Finished catalog run in 10.88 seconds
Apply glance plugin connect manifest
Error: NetworkManager is not running.
Notice: Compiled catalog for ovm01.ntnx.local in environment production in 0.12 seconds
Notice: /Stage[main]/Main/Augeas[ovm_nova_service_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_glance_controller_api_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_glance_cluster_api_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_glance_controller_registry_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_glance_cluster_entry_points_config]/returns: executed successfully
Notice: /Stage[main]/Main/Augeas[ovm_cinder_service_config]/returns: executed successfully
Notice: Finished catalog run in 6.38 seconds
Successful

4/4: Restart Services:
Redirecting to /bin/systemctl restart  openstack-nova-api.service
Redirecting to /bin/systemctl restart  openstack-nova-consoleauth.service
Redirecting to /bin/systemctl restart  openstack-nova-scheduler.service
Redirecting to /bin/systemctl restart  openstack-nova-conductor.service
Redirecting to /bin/systemctl restart  openstack-nova-compute.service
Redirecting to /bin/systemctl restart  openstack-nova-cert.service
Redirecting to /bin/systemctl restart  openstack-nova-novncproxy.service
Redirecting to /bin/systemctl restart  openstack-cinder-api.service
Redirecting to /bin/systemctl restart  openstack-cinder-scheduler.service
Redirecting to /bin/systemctl restart  openstack-cinder-volume.service
Redirecting to /bin/systemctl restart  openstack-cinder-backup.service
Redirecting to /bin/systemctl restart  openstack-glance-registry.service
Redirecting to /bin/systemctl restart  openstack-glance-api.service
Redirecting to /bin/systemctl restart  neutron-server.service
Redirecting to /bin/systemctl restart  neutron-dhcp-agent.service
Redirecting to /bin/systemctl restart  neutron-l3-agent.service
Redirecting to /bin/systemctl restart  neutron-metadata-agent.service
Redirecting to /bin/systemctl restart  neutron-openvswitch-agent.service
Note: Forwarding request to 'systemctl enable prism-vnc-proxy.service'.
Redirecting to /bin/systemctl stop  iptables.service
Note: Forwarding request to 'systemctl disable iptables.service'.
Removed symlink /etc/systemd/system/basic.target.wants/iptables.service.
Redirecting to /bin/systemctl restart  httpd.service
Successful

Role が Allinone になり、Openstack Controllers configuration にコントローラが追加されました。

[root@ovm01 ~]# ovmctl --show

Role:
-----
Allinone - Openstack controller, Acropolis drivers

OVM configuration:
------------------
1     OVM name                     : ovm01
      IP                           : 10.1.1.15
      Netmask                      : 255.255.252.0
      Gateway                      : 10.1.1.1
      Nameserver                   : 10.1.1.1
      Domain                       : ntnx.local

Openstack Controllers configuration:
------------------------------------
1     Controller name              : ovm01
      IP                           : 10.1.1.15
      Auth
        Auth strategy              : keystone
        Auth region                : RegionOne
        Auth tenant                : services
        Auth Nova password         : ********
        Auth Glance password       : ********
        Auth Cinder password       : ********
        Auth Neutron password      : ********
      DB
        DB Nova                    : mysql
        DB Cinder                  : mysql
        DB Glance                  : mysql
        DB Neutron                 : mysql
        DB Nova password           : ********
        DB Glance password         : ********
        DB Cinder password         : ********
        DB Neutron password        : ********
      RPC
        RPC backend                : rabbit
        RPC username               : guest
        RPC password               : ********
      Image cache                  : disable

Nutanix Clusters configuration:
-------------------------------
None

Version:
--------
Version     : 2015.1.0
Release     : 1
Summary     : Acropolis drivers for Openstack Kilo.

Nutanix クラスタ側の準備

Nutanix CE のクラスタで、default という名前のストレージコンテナを作成しておきます。ovmctl でコンテナ名を指定することも可能ですが、自動的にデフォルトで作成されるコンテナ名が長いので、今回は「default」コンテナを作成しました。

Prism で「Storage」→「₊ Container」をクリックします。

f:id:gowatana:20160408081216p:plain

名前を「default」にして、Save します。

f:id:gowatana:20160408081259p:plain

default というコンテナが作成されました。

f:id:gowatana:20160408081517p:plain

OVM への Nutanix クラスタ追加

念のため、Nutanix クラスタの VIP に疎通が取れることを確認しておきます。

[root@ovm01 ~]# ping -c 1 10.1.1.12
PING 10.1.1.12 (10.1.1.12) 56(84) bytes of data.
64 bytes from 10.1.1.12: icmp_seq=1 ttl=64 time=4.45 ms

--- 10.1.1.12 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 4.451/4.451/4.451/0.000 ms

「ovmctl --add cluster」でクラスタを追加します。

[root@ovm01 ~]# ovmctl --add cluster --name ntnx-ce --ip 10.1.1.12 --username admin --password <パスワード>

1/3: Start VNC proxy:
Started vnc proxy service
Successful

2/3: Enable services:
Service compute enabled
Service volume enabled
Service network enabled
Successful

3/3: Restart services:
Redirecting to /bin/systemctl restart  openstack-nova-api.service
Redirecting to /bin/systemctl restart  openstack-nova-consoleauth.service
Redirecting to /bin/systemctl restart  openstack-nova-scheduler.service
Redirecting to /bin/systemctl restart  openstack-nova-conductor.service
Redirecting to /bin/systemctl restart  openstack-nova-compute.service
Redirecting to /bin/systemctl restart  openstack-nova-cert.service
Redirecting to /bin/systemctl restart  openstack-nova-novncproxy.service
Redirecting to /bin/systemctl restart  openstack-cinder-api.service
Redirecting to /bin/systemctl restart  openstack-cinder-scheduler.service
Redirecting to /bin/systemctl restart  openstack-cinder-volume.service
Redirecting to /bin/systemctl restart  openstack-cinder-backup.service
Redirecting to /bin/systemctl restart  openstack-glance-registry.service
Redirecting to /bin/systemctl restart  openstack-glance-api.service
Redirecting to /bin/systemctl restart  neutron-server.service
Redirecting to /bin/systemctl restart  neutron-dhcp-agent.service
Redirecting to /bin/systemctl restart  neutron-l3-agent.service
Redirecting to /bin/systemctl restart  neutron-metadata-agent.service
Redirecting to /bin/systemctl restart  neutron-openvswitch-agent.service
Note: Forwarding request to 'systemctl enable prism-vnc-proxy.service'.
Redirecting to /bin/systemctl stop  iptables.service
Note: Forwarding request to 'systemctl disable iptables.service'.
Redirecting to /bin/systemctl restart  httpd.service
Successful

Nutanix Clusters configuration にクラスタが追加されました。Container name は default になっています。これで OpenStack から Nutanix を操作できるようになりました。

[root@ovm01 ~]# ovmctl --show

Role:
-----
Allinone - Openstack controller, Acropolis drivers

OVM configuration:
------------------
1     OVM name                     : ovm01
      IP                           : 10.1.1.15
      Netmask                      : 255.255.252.0
      Gateway                      : 10.1.1.1
      Nameserver                   : 10.1.1.1
      Domain                       : ntnx.local

Openstack Controllers configuration:
------------------------------------
1     Controller name              : ovm01
      IP                           : 10.1.1.15
      Auth
        Auth strategy              : keystone
        Auth region                : RegionOne
        Auth tenant                : services
        Auth Nova password         : ********
        Auth Glance password       : ********
        Auth Cinder password       : ********
        Auth Neutron password      : ********
      DB
        DB Nova                    : mysql
        DB Cinder                  : mysql
        DB Glance                  : mysql
        DB Neutron                 : mysql
        DB Nova password           : ********
        DB Glance password         : ********
        DB Cinder password         : ********
        DB Neutron password        : ********
      RPC
        RPC backend                : rabbit
        RPC username               : guest
        RPC password               : ********
      Image cache                  : disable

Nutanix Clusters configuration:
-------------------------------
1     Cluster name                 : ntnx-ce
      IP                           : 10.1.1.12
      Username                     : admin
      Password                     : ********
      Vnc                          : 38362
      Vcpus per core               : 4
      Container name               : default
      Services enabled             : compute, volume, network

Version:
--------
Version     : 2015.1.0
Release     : 1
Summary     : Acropolis drivers for Openstack Kilo.

できたものの様子

nova コマンドで様子を見てみます。
OVM の /root に  keystonerc_admin というファイルがあります。

[root@ovm01 ~]# ls -l
total 392
-rw-------. 1 root root   1068 Feb  4 16:17 anaconda-ks.cfg
-rw-------. 1 root root    223 Feb  4 17:35 keystonerc_admin
-rw-------. 1 root root    223 Feb  4 17:35 keystonerc_demo
-rw-r--r--. 1 root root 336100 Feb 11 07:30 nutanix_openstack-2015.1.0-1.noarch.rpm
drwxrwxr-x. 9  500  500   4096 Oct 27 12:31 openstack
-rw-r--r--. 1 root root  43005 Feb  4 17:26 openstack-controller-packstack-install-answer.txt
[root@ovm01 ~]# cat keystonerc_admin
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=admin
export OS_AUTH_URL=http://127.0.0.1:5000/v2.0
export PS1='[\u@\h \W(keystone_admin)]\$ '

export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne

これを source コマンドもしくは .(ドット)で読み込みます。

[root@ovm01 ~]# source keystonerc_admin
[root@ovm01 ~(keystone_admin)]#

nova hypervisor-list を見てみます。クラスタのノード(AHV)ではなく、クラスタ単位で Nova の Compute Host として扱われるようです。VMware Integrated OpenStack(VIO)で vCenter 配下のクラスタが Nova のホストに見えるのと似た感じです。

[root@ovm01 ~(keystone_admin)]# nova hypervisor-list
+----+---------------------+-------+---------+
| ID | Hypervisor hostname | State | Status  |
+----+---------------------+-------+---------+
| 10 | ntnx-ce             | up    | enabled |
+----+---------------------+-------+---------+

hypervisor_type は AHV(Acropolis Hypervisor)になっています。

[root@ovm01 ~(keystone_admin)]# nova hypervisor-show ntnx-ce
+---------------------------+-----------+
| Property                  | Value     |
+---------------------------+-----------+
| cpu_info_arch             | x86_64    |
| cpu_info_model            | x86_64    |
| cpu_info_topology_cores   | 4         |
| cpu_info_topology_sockets | 4         |
| cpu_info_topology_threads | 4         |
| cpu_info_vendor           | Intel     |
| current_workload          | 0         |
| disk_available_least      | 414       |
| free_disk_gb              | 414       |
| free_ram_mb               | 3087      |
| host_ip                   | 10.1.1.15 |
| hypervisor_hostname       | ntnx-ce   |
| hypervisor_type           | AHV       |
| hypervisor_version        | 1         |
| id                        | 10        |
| local_gb                  | 414       |
| local_gb_used             | 0         |
| memory_mb                 | 3599      |
| memory_mb_used            | 512       |
| running_vms               | 0         |
| service_disabled_reason   | -         |
| service_host              | ovm01     |
| service_id                | 14        |
| state                     | up        |
| status                    | enabled   |
| vcpus                     | 14        |
| vcpus_used                | 0         |
+---------------------------+-----------+

Horizon Dashboard からもアクセス可能です。ハイパーバイザのホスト名は登録した Nutanix クラスタで、種類は AHV と表示されています。

f:id:gowatana:20160408083854p:plain

まだつづく。

Nutanix CE で OpenStack。Part1: Ravello で環境構築

Nutanix CE での OpenStack 環境構築を構築してみます。
Nutanix では、Acropolis OpenStack サービス VM(OVM)というものを提供しているので、それを使用してみました。

Nutanix Bible 日本語版 - OpenStack

http://nutanixbible.jp/#anchor-openstack-39

いままで入手方法が謎だったのですが、下記のサイトのリンクから DL できてしまった nutanix_openstack-2015.1.0-1.ovm.qcow2 を使用しています。

www.cannybag.com

環境の準備

今回も、Ravello で Nutanix CE On Demand を使用しています。ただし Nutanix CE は 2016.03.13 にバージョンアップしています。

nutanix@NTNX-bb10a8de-A-CVM:10.1.1.11:~$ cat /etc/nutanix/release_version
el6-release-ce-2016.03.13-stable-93b61febe28a6e6140d351ec72c9bcaae107b9ef
nutanix@NTNX-bb10a8de-A-CVM:10.1.1.11:~$ cat /etc/nutanix/svm-version
4.6r11

通常の商用版 Nutanix を使用するのであれば、OVM は Nutanix 上で VM として起動すればよいのですが、今回は 独立した VM としてデプロイしています。
Ravello では、1VM あたりのメモリ容量が 16GB に制限されています。Nutanix CE のインストール要件は満たせるのですが、そのうえで OVM を起動するのは無理のようでした。

OVM のディスクイメージのインポート

ダウンロードした OVM のディスクイメージを、Ravello VM Import Tool で Ravello にアップロードします。

Create a new VM by uploading existing disk files を選択して、「Next」。

f:id:gowatana:20160407211539p:plain

アップロードするディスクイメージを選択して、VM name を入力してから Upload をクリックします。Type は QCOW を選択しています。

f:id:gowatana:20160407211639p:plain

100% になるまで待ちます。

f:id:gowatana:20160407211657p:plain

Ravello の UI にログインすると、先ほど指定した VM name で Library に登録されています。VM として使用するためには、いったん「Edit & Verify VM」をクリックして設定を変更する必要があります。

f:id:gowatana:20160407212025p:plain

設定を編集して「Finish」で保存すると、Library から VM として配置できるようになります。

f:id:gowatana:20160407212245p:plain

OVM を独立した VM としてデプロイ

Ravello で、Nutanix CE と、Nutanix OVM をそれそれ 別の VM として配置しました。
OVM の VM は、下記のような設定をしています。

System の設定

割り当てすぎるとかえって遅くなりそうなので、あえて OVM の要件より少なめにしました。

  • 1 CPU
  • 8GB Memory

Network の設定

  • Device をデフォルトの E1000 から VirtIO に変更します。
    これは、CentOS で eth0 として認識させたいので、AHV に合わせました。
  • Nutanix CE と同じセグメントの IP アドレスを指定。
    ちょっと微妙なところがありますが・・・
  • Gateway、DNS も Nutanix CE のものに合わせます。

Services の設定

  • TCP 22 番ポートの SSH を開放。
  • TCP 443 番ポートの HTTPS を開放。これは Horizon Dashboard 用です。

Nutanix CE のとなりに、Library から OVM の VM を並べています。

f:id:gowatana:20160407224449p:plain

OVM の VM を選択して、System で CPU と メモリ容量を指定しています。

f:id:gowatana:20160408004440p:plain

Network の Devise で VirtIO を選択しています。

f:id:gowatana:20160408003832p:plain

Services では Supplied Services を 2つ設定しています。

f:id:gowatana:20160408004054p:plain

それぞれのメニューで設定を Save したら、「Publish」で起動します。
Optimize for では、Cost ではなく Performance(Nutanix CE OnDemand の推奨) を選択しています。

f:id:gowatana:20160408004640p:plain

5分 ~ 10分くらい待つと、OVM が起動するので Console でアクセスします。

f:id:gowatana:20160408005155p:plain

OVM は CentOS 7 ベースで、root ユーザ(初期状態パスワードは「admin」)でログインできます。この時点では、まだ NW 設定されていないため、コンソールから作業開始します。

f:id:gowatana:20160408005342p:plain

つづく。

 

Nutanix CE でディザスタリカバリ。Part9: Activate した Remote Site からの切り戻し

Nutanix CE で DR 環境を構成して、意図的に Main / DR 両方のサイトがアクティブになってしまっている状態にしてみました。

今回はその状態から、Main サイト側の Nutanix クラスタ(の Protection Domain)のみがアクティブの状態に戻してみます。

続きを読む
©2023 gowatana
クリエイティブ・コモンズ・ライセンスこの 作品 は クリエイティブ・コモンズ 表示 4.0 国際 ライセンスの下に提供されています。