LoginSignup
12
18

More than 5 years have passed since last update.

OpenStack 環境構築メモ

Last updated at Posted at 2016-03-20

【概要:OpenStack 環境構築】

  • OpenStack 環境を構築するため作業手順を記載
  • RDO Packstack を使用。
  • 最新の liberty ではなく、kilo を使うこととする(2016年3月時点)

♢ OpenStack とは?

  • NASA主導のクラウド技術。Nova を始めとするコンポーネント群で構成されており、OpenStack を使うと仮想ネットワーク(SDN)や構成管理ツール(Ansible)等を簡単に導入出来る。
    Wikipedia: https://ja.wikipedia.org/wiki/OpenStack

♢ OpenStack アーキテクチャ

♢ RDO Packstack とは?

【環境】

♢ システムリソース

  • CPU: 3core
  • Mem: 3072GB
    RDO 公式サイトには少なくとも 4GB と記載あるがリソース余裕なし。。。

Machine with at least 4GB RAM, processors with hardware virtualization extensions, and at least one network adapter.
https://www.rdoproject.org/install/quickstart/

  • NIC: 2つ (業務LAN/管理LAN)

♢ OS

  • CentOS7.2

【インストール手順】

♢ 1. RDO Packstack リポジトリの登録

yum install https://www.rdoproject.org/repos/rdo-release.rpm

♢ 2. OpenStack(Kilo)インストール

a. インストール実行 (CentOS7)

  • 標準リポジトリに kilo パッケージが用意されていた。素晴らしい。
    遠慮なく使わせて頂く。
yum search centos-release-openstack
-----
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.riken.jp
 * extras: ftp.riken.jp
 * updates: ftp.riken.jp
===================================== N/S matched: centos-release-openstack ======================================
centos-release-openstack.noarch : OpenStack from the CentOS Cloud SIG repo configs
centos-release-openstack-kilo.noarch : OpenStack from the CentOS Cloud SIG repo configs
centos-release-openstack-liberty.noarch : OpenStack from the CentOS Cloud SIG repo configs

  Name and summary matches only, use "search all" for everything.
  • インストール実行
yum install centos-release-openstack-kilo

b. インストール実行(RHEL7)

yum install http://rdoproject.org/repos/openstack-kilo/rdo-release-kilo.rpm
  • オプションリポジトリ有効化
subscription-manager repos --enable rhel-7-server-optional-rpms
subscription-manager repos --enable rhel-7-server-extras-rpms
subscription-manager repos --enable=rhel-7-server-rh-common-rpms

♢ 3. openstack-packstack インストール

yum install epel-release openstack-packstack
  • epel も必要と Document に書いてある為、インストールしておく
  1. On RHEL and CentOS, enable the EPEL repository:
    http://docs.openstack.org/kilo/install-guide/install/yum/content/ch_basic_environment.html#basics-packages

♢ 4. システムアップデート実行

yum update

♢ 5. デプロイ実行

  • 10分程実行に時間がかかる。環境によりエラー報告もあるようだが無事終わることを祈る。
packstack --allinone --use-epel=y
----

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

Additional information:
 * A new answerfile was created in: /root/packstack-answers-20160320-182839.txt
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
 * Warning: NetworkManager is active on 10.0.2.15. OpenStack networking currently does not work on systems that have the Network Manager service enabled.
 * File /root/keystonerc_admin has been created on OpenStack client host 10.0.2.15. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://10.0.2.15/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
 * To use Nagios, browse to http://10.0.2.15/nagios username: nagiosadmin, password: 0156a1dda98a4ae9
 * The installation log file is available at: /var/tmp/packstack/20160320-182838-hvf94y/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20160320-182838-hvf94y/manifests

♢ 6. NetworkManager 無効化

  • インストール後のメッセージに書かれている通り、 OpenStack で NetworkManager の利用が推奨されていない為、停止する
systemctl disable NetworkManager && systemctl enable network
systemctl stop NetworkManager && systemctl restart network

♢ 7. 仮想サーバ設定の有効化

  • 仮想サーバで構築する際にはインスタンスを KVM モードで起動する設定と、vhost_net を有効化する。

1. nova 設定変更(KVM モード有効化)

sed -i s/virt_type=qemu/virt_type=kvm/g /etc/nova/nova.conf
cat /etc/nova/nova.conf | grep ^virt_type=

2. 設定反映

systemctl restart openstack-nova-compute.service

3. vhost_net 有効化

modprobe vhost_net

4. vhost_net 有効化確認

lsmod | grep vhost_net
12
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
18