11. 第2日 講義資料 No.1
Keystoneのコマンド操作例 (3)
■
各コマンドラインツールは、「helpサブコマンド」でサブコマンドの一覧や各サブコマ
ンドの詳細が確認できます。
# keystone help
# keystone help user-list
← サブコマンドの一覧
← サブコマンド「user-list」の詳細説明
11
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
12. 第2日 講義資料 No.1
Glanceへのテンプレートイメージ登録 (1)
■
起動ディスクのテンプレートイメージをGlanceに登録することで、Novaから利用でき
るようになります。
Keystone
(ユーザ認証)
Neutron
(仮想ネットワーク)
Horizon
(ダッシュボード)
Cinder
(ブロックボリューム)
Nova
(仮想マシン)
Glance
(テンプレート)
12
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
13. 第2日 講義資料 No.1
Glanceへのテンプレートイメージ登録 (2)
■
次は、一般ユーザ「demo_user」で、テンプレートイメージをインターネットからダウ
ンロードして登録する例です。
このファイルは
自分で用意します。
一般ユーザの場合は
ポート番号5000
# cat keystonerc_demo_user
export OS_USERNAME=demo_user
export OS_TENANT_NAME=demo
export OS_PASSWORD=passw0rd
export OS_AUTH_URL=http://172.16.1.11:5000/v2.0/
export PS1='[u@h W(keystone_demouser)]$ '
# . keystonerc_demo_user
# glance image-create --name "Fedora19"
--disk-format qcow2 --container-format bare --is-public true
--copy-from http://cloud.fedoraproject.org/fedora-19.x86_64.qcow2
# glance image-list
+--------------------------------------+----------+-------------+------------------+-----------+--------+
| ID
| Name
| Disk Format | Container Format | Size
| Status |
+--------------------------------------+----------+-------------+------------------+-----------+--------+
| 702d0c4e-b06c-4c15-85e5-9bb612eb6414 | Fedora19 | qcow2
| bare
| 237371392 | active |
+--------------------------------------+----------+-------------+------------------+-----------+--------+
13
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
14. 第2日 講義資料 No.1
Neutronによる仮想ネットワーク作成
■
NeutronのAPIを通して、プロジェクトごとに独立した仮想ネットワークを用意します。
- Neutronのコマンド操作の詳細は、「第2日 講義資料 No.2」で説明します。
Keystone
(ユーザ認証)
Neutron
(仮想ネットワーク)
Horizon
(ダッシュボード)
Cinder
(ブロックボリューム)
Nova
(仮想マシン)
Glance
(テンプレート)
コマンド名は旧名称のquantumです。
Havanaではneutronに変わります。
# . keystonerc_demo_user
# quantum net-list
+--------------------------------------+-------------+-------------------------------------------------------+
| id
| name
| subnets
|
+--------------------------------------+-------------+-------------------------------------------------------+
| 843a1586-6082-4e9f-950f-d44daa83358c | private01
| 9888df89-a17d-4f4c-b427-f28cffe8fed2 192.168.101.0/24 |
| d3c763f0-ebf0-4717-b3fc-cda69bcd1957 | private02
| 23b26d98-2277-4fb5-8895-3f42cde7e1fd 192.168.102.0/24 |
| d8040897-44b0-46eb-9c51-149dfe351bbe | ext-network | 1b8604a4-f39d-49de-a97c-3e40117a7516 192.168.199.0/24 |
+--------------------------------------+-------------+-------------------------------------------------------+
14
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
15. 第2日 講義資料 No.1
Novaによる仮想マシンインスタンス起動
■
NovaのAPIに仮想マシンインスタンスの起動を指示すると、Glance / Netronと連携し
て、インスタンスの起動と仮想ネットワーク接続の処理が行われます。
- Novaは、Glance APIを通じて、テンプレートイメージをコンピュートノードにコピーします。
- 同じく、Neutron APIを通じて、仮想マシンインスタンスを仮想ネットワークに接続します。
Keystone
(ユーザ認証)
Neutron
(仮想ネットワーク)
Horizon
(ダッシュボード)
Cinder
(ブロックボリューム)
Nova
(仮想マシン)
Glance
(テンプレート)
仮想ネットワークへの接続
テンプレートイメージ
のダウンロード
15
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
41. 第2日 講義資料 No.1
ネットワークノードの分離構成 (1)
■
ネットワークノードを独立させて、ネットワーク処理の性能を確保します。
- ネットワークノード自身をスケールアウトさせる際は、外部のSDNコンポーネントの利用が必要
です。OpenStack標準機能としてのネットワークノードのスケールアウト機能は、現在開発計画
中です。
コントローラノード
●
●
●
●
APIサービス群
Horizonダッシュボード
データベース (MySQL)
メッセージング (QPID)
コンピュートノード
●
●
●
KVMハイパーバイザ
Nova Compute
L2 Agent
ネットワークノード
●
L2/L3/DHCP Agent
コンピュートノード
●
●
●
KVMハイパーバイザ
Nova Compute
L2 Agent
スケールアウト
41
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
42. 第2日 講義資料 No.1
ネットワークノードの分離構成 (2)
■
下図は、ネットワークノードを分離した場合のネットワーク構成例です。
パブリックネットワーク
プライベートネットワーク
eth0
eth0
IP
IP
eth1
eth2
br-ex
br-priv
br-int
NAT
コントローラノード
ネットワークノード
eth0
IP
eth1
br-priv
eth0
IP
eth1
br-priv
br-int
br-int
VM
・・・
VM
コンピュートノード
42
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
46. 第2日 講義資料 No.1
HA/ロードバランス構成の参考資料
■
HAクラスタのロードバランサの具体的な設定は、次の資料が参考になります。
- RDO HighlyAvailable and LoadBalanced Control Services
●
http://openstack.redhat.com/RDO_HighlyAvailable_and_LoadBalanced_Control_Services
46
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
63. 第2日 講義資料 No.1
(付録)OpenStack 主要APIリスト
(参考)OpenStack API Reference http://api.openstack.org/api-ref.html
63
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
64. 第2日 講義資料 No.1
Keystone API
■
一般ユーザ向けAPI
64
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
65. 第2日 講義資料 No.1
Keystone API
■
管理ユーザ向けAPI
65
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
66. 第2日 講義資料 No.1
Glance API
66
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
67. 第2日 講義資料 No.1
Neutron API
■
Network API
■
Subnet API
67
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
68. 第2日 講義資料 No.1
Neutron API
■
Ports API
68
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
69. 第2日 講義資料 No.1
Nova API
■
Versions API
■
Extensions API
■
Limits API
69
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
70. 第2日 講義資料 No.1
Nova API
■
Server API
■
Server Metadata API
70
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
71. 第2日 講義資料 No.1
Nova API
■
Server Address API
■
Server Actions API
71
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
72. 第2日 講義資料 No.1
Nova API
■
Flavors API
■
Images API
■
Image Metadata API
72
Copyright (C) 2014 National Institute of Informatics, All rights reserved.
73. 第2日 講義資料 No.1
Cinder API
73
Copyright (C) 2014 National Institute of Informatics, All rights reserved.