アットウィキロゴ

OpenStack環境構築(シングルサーバー)

CentOS 各種事前設定

CentOS 6.4 minimalインストール後の作業

とりあえずupdate

# yum -y update

SELinuxを無効化

# vi /etc/selinux/config
SELINUX=enforcing => SELINUX=disabled

iptabled無効化

# service iptables stop
# chkconfig iptables off

X Windowの追加

# yum -y groupinstall "X Window System" "Desktop" "General Purpose Desktop" "Japanese Support"
ランレベルを変更
# sed -i "s/id:3:initdefault:/id:5:initdefault:/g" /etc/inittab

OpenStackをインストールする

ユーザー作成

# useradd stack
# passwd password

OpenStackコンポーネント連携パッケージのインストール

  • データベースのバックエンドにはNova、Glance、Keystone、Horizonその他も全てMySQLを利用する
  • またMQにはApache Qpidを利用します。CentOS6.4だとminimalインストールでも予めインストールされている

外部リポジトリの追加

# rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
# cd /etc/yum.repos.d/
# vi openstack-grizzly.repo
[epel-openstack-grizzly]
name=OpenStack Grizzly Repository for EPEL 6
baseurl=http://repos.fedorapeople.org/repos/openstack/openstack-grizzly/epel-$releasever/
enabled=1
skip_if_unavailable=1
gpgcheck=0
念のためUPDATE
# yum update -y

MySQL、memcachedのインストール

# yum install -y mysql-server memcached
  • MySQLの起動及びパスワード設定
# service mysqld start
# chkconfig mysqld on
# mysql -uroot -e "set password for root@localhost=password('nova');"
# mysql -uroot -pnova -e "set password for [email protected]=password('nova');"
# mysql -uroot -pnova -e "set password for root@ostack01=password('nova');"
  • memcachedの起動と自動起動設定
# service memcached start
# chkconfig memcached on

Apache Qpidのインストール

  • 認証はオフでインストール
# yum install qpid-cpp-server -y
# sed -i 's/auth=yes/auth=no/' /etc/qpidd.conf
# service qpidd restart
# chkconfig qpidd on

仮想化関連パッケージ(KVM)のインストール

# yum install -y iscsi-initiator-utils qemu-kvm libvirt bridge-utils libvirt-python avahi
# service messagebus restart
# service avahi-daemon restart
# service libvirtd restart

Identity Service(Keystone)のインストール

  • Keystoneはユーザ、テナント(プロジェクト)などOpenStackのコンポーネント全ての共通認証・認可を一括管理するコンポーネント
  • Keystoneをインストールすることによって各々のコンポーネントで認証・認可を行う必要がなくなる

Keystoneのインストール

# yum install -y openstack-keystone

Keystoneのコンフィグ

  • バックアップをディレクトリごととる
# cp -a /etc/keystone /etc/keystone_bak
  • /etc/keystone/keystone.confの編集
# diff /etc/keystone/keystone.conf /etc/keystone_bak/keystone.conf
4c4<
admin_token = ADMIN
      • >
# admin_token = ADMIN
7c7<
bind_host = 0.0.0.0
      • >
# bind_host = 0.0.0.0
10c10<
public_port = 5000
      • >
# public_port = 5000
13c13<
admin_port = 35357
      • >
# admin_port = 35357
21c21<
compute_port = 8774
      • >
# compute_port = 8774
24c24<
policy_file = policy.json
      • >
# policy_file = policy.json
42d41<
debug = True
46d44<
verbose = True
82c80<
connection = mysql://keystone:password@ostack01/keystone?charset=utf8
      • >
# connection = sqlite:///keystone.db
85c83<
idle_timeout = 200
      • >
# idle_timeout = 200
138d135<
token_format = UUID
227,230c224,225<
#password = keystone.auth.plugins.password.Password
<
#token = keystone.auth.plugins.token.Token
<
password = keystone.auth.methods.password.Password
<
token = keystone.auth.methods.token.Token
      • >
password = keystone.auth.plugins.password.Password

token = keystone.auth.plugins.token.Token
最終更新:2013年10月24日 18:39