読者です 読者をやめる 読者になる 読者になる

Eucalyptus Advent Calendar 2014 12-20(昼の部+夜の部)

Eucalyptus Advent Calendar 2014(昼の部)

普段は赤いStackに属している、しがないPythonistaの僕ですが、なぜか異様に盛り上がっているEucalyptus Advent Calendar 2014の12/20を担当することになりました。

いま、土曜日のオフィスでこの記事を書いています。同僚がひとり寝ています。起こさないように静かに書こう。

おれのゆーかり初体験

まずはインストール

@giraffeforestgさんが担当した12/2の記事を参考にEucalyptus 4をインストールしてみます。

環境はVMWare Fusion仮想マシンで準備

仮想マシン環境

- 母艦: MacOSX 10.10.1 / VMWare Fusion 7.1.0 (2314774)
- CPU x 4
- MEM 8GB
- NIC x 1
- HDD 100GB

サーバ情報

- OS: CentOS6.6
- hostname: eucalyptus
- networking: eth0:172.16.100.10/24 GW:172.16.100.2

インストール前の準備

1. selinuxの無効化

いしかわさんごめんなさい && いしかわさんごめんなさい && いしかわさんごめんなさい

# sed -i --follow-symlinks -e s/=enforcing/=disabled/ /etc/sysconfig/selinux
# reboot
2. パッケージ更新
# yum update
# reboot
3. 細々した設定
  • /etc/hosts に自身のアドレスを記載(OSG-IPも忘れずに!)
172.16.100.10    eucalyptus OSG-IP

インストール実施

FastStartインストーラの実行
  • Proxyの内側にいる場合は http_proxy の設定を忘れずに!
  • Proxyの内側にいる場合は no_proxy に 127.0.0.1,172.16.100.10,OSG-IP を設定しておくのを忘れずに!
  • /var には 100GB 以上の領域割り当てを推奨されるが、粗食で鍛える方針なので無視する。
  • OSG-IPを/etc/hostsに登録しておくのを忘れずに!
  • インストール自体はchef-soloで実施しているっぽいので、きっと冪等性が担保されているはず。失敗してもやり直せばちゃんと動きそう。 <-だめだったのでスナップショットから戻してもう一回
# bash <(curl -Ls eucalyptus.com/install)
NOTE: if you're running on a laptop, you might want to make sure that
you have turned off sleep/ACPI in your BIOS.  If the laptop goes to sleep,
virtual machines could terminate.

Continue? [Y/n] ※<= Y[Enter]
Y

WARNING: we recommend at least 100G of disk space available
in /var for a Eucalyptus Faststart installation.  Running with
less disk space may result in issues with image and volume
management, and may dramatically reduce the number of instances
your cloud can run simultaneously.

Your free space is: 91G

Continue? [y/N] ※<= Y[Enter]
Y

<...>

Welcome to the Faststart installer!

We're about to turn this system into a single-system Eucalyptus cloud.

Note: it's STRONGLY suggested that you accept the default values where
they are provided, unless you know that the values are incorrect.

What's the physical NIC that will be used for bridging? (eth0) ※<=インタラクション

NIC=eth0

What's the IP address of this host? (172.16.100.10) ※<= [Enter]

IPADDR=172.16.100.10

What's the gateway for this host? (172.16.100.2) ※<= [Enter]

GATEWAY=172.16.100.2

What's the netmask for this host? (255.255.255.0) ※<= [Enter]

NETMASK=255.255.255.0

What's the subnet for this host? (172.16.100.0) ※<= [Enter]

SUBNET=172.16.100.0

You must now specify a range of IP addresses that are free
for Eucalyptus to use.  These IP addresses should not be
taken up by any other machines, and should not be in any
DHCP address pools.  Faststart will split this range into
public and private IP addresses, which will then be used
by Eucalyptus instances.  Please specify a range of at least
10 IP addresses.

What's the first address of your available IP range?
172.16.100.129 ※<= ゲストOS用アドレスレンジの先頭アドレス
What's the last address of your available IP range?
172.16.100.190 ■<= ゲストOS用アドレスレンシの末尾アドレス
OK, IP range is good
Public range will be:   172.16.100.129 - 172.16.100.159
Private range will be   172.16.100.160 - 172.16.100.190

Do you wish to install the optional load balancer and image
management services? This add 10-15 minutes to the installation.
Install additional services? [Y/n] ※<= N[Enter]
N
OK, additional services will not be installed.


[Installing Eucalyptus]

If you want to watch the progress of this installation, you can check the
log file by running the following command in another terminal:

tail -f /var/log/euca-install-12.21.2014-00.10.23.log

Your cloud-in-a-box should be installed in 30-45 minutes. Go have a cup of coffee!


   ( (
    ) )
  ........
  |      |]
  \      /
   ------

   [FATAL] Eucalyptus installation failed
   
   Eucalyptus installation failed. Please consult /var/log/euca-install-12.20.2014-17.53.24.log for details.
   
   Please try to run the installation again. If your installation fails again,
   you can ask the Eucalyptus community for assistance:
   
   https://groups.google.com/a/eucalyptus.com/forum/#!forum/euca-users
   
   Or find us on IRC at irc.freenode.net, on the #eucalyptus channel.

おおおおうぅぅ

インストール時のエラー対応

なんだろうねこりゃ。ちょっと時間かけてやってみようかな。でもいいったい何がなんだかわからねぇ。

これがライムグリーンの洗礼か...(夜の部につづく)

Eucalyptus Advent Calendar 2014(夜の部)

ということで日があらたまったあたりで夜の部開始。 オフィスのProxy配下の牢獄ではなく、自宅のネットワークからテストしてみた。

環境はVMWare Fusion仮想マシンで準備

自前MBA11を使って、仮想マシン環境をVMWare Fusionで構築。

- 母艦: MacOSX 10.10.1 / VMWare Fusion 7.1.0 (2314774)
- CPU x 1
- MEM 5632GB
- NIC x 1
- HDD 128GB

インストール開始

どうもeucalyptus-load-balancer-image-1.1.3-0.90.36.el6のダウンロード(300MBくらいある)で、インストーラが利用しているchef-soloがタイムアウトしてしまう...

そこで、Install additional services? [Y/n]は、あきらめてNにした。

そして!そしてついにインストール成功!おれやった、よはぶかさん!

f:id:pyde:20141221163851p:plain

# bash <(curl -Ls eucalyptus.com/install)
NOTE: if you're running on a laptop, you might want to make sure that
you have turned off sleep/ACPI in your BIOS.  If the laptop goes to sleep,
virtual machines could terminate.

Continue? [Y/n]
^C
[root@eucalyptus ~]# yum search eucaly
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.jaist.ac.jp
 * extras: ftp.jaist.ac.jp
 * updates: ftp.jaist.ac.jp
================================= 一致: eucaly =================================
python-boto.noarch : A simple, lightweight interface to Amazon Web Services
[root@eucalyptus ~]# bash <(curl -Ls eucalyptus.com/install)
NOTE: if you're running on a laptop, you might want to make sure that
you have turned off sleep/ACPI in your BIOS.  If the laptop goes to sleep,
virtual machines could terminate.

Continue? [Y/n]
Y

[Precheck] Checking root
[Precheck] OK, running as root

[Precheck] Checking curl version
[Precheck] OK, curl is up to date

パッケージ eucalyptus はインストールされていません。
[Precheck] Checking OS
[Precheck] OK, OS is supported

パッケージ PackageKit はインストールされていません。
パッケージ NetworkManager はインストールされていません。
[Precheck] Checking hardware virtualization
[Precheck] OK, processor supports virtualization

[Precheck] Checking if Chef Client is installed
which: no chef-solo in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
=====
[INFO] Chef not found. Installing Chef Client


  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 18285  100 18285    0     0   4544      0  0:00:04  0:00:04 --:--:-- 18507
警告: /tmp/install.sh.1176/chef-12.0.3-1.x86_64.rpm: ヘッダ V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
[Precheck] OK, Chef Client is installed

[Precheck] Identifying primary network interface
wlan0: error fetching interface information: Device not found
em1: error fetching interface information: Device not found
Active network interface eth0 found
[Precheck] OK, network interfaces checked.

[Precheck] OK, running a full update of the OS. This could take a bit; please wait.
To see the update in progress, run the following command in another terminal:

  tail -f /var/log/euca-install-12.21.2014-15.38.59.log

[Precheck] Package update in progress...
読み込んだプラグイン:fastestmirror
更新処理の設定をしています
Loading mirror speeds from cached hostfile
 * base: ftp.jaist.ac.jp
 * extras: ftp.jaist.ac.jp
 * updates: ftp.jaist.ac.jp
更新と設定されたパッケージがありません。
[Precheck] Precheck successful.


[Prep] Removing old Chef templates
[Prep] Downloading necessary cookbooks
警告: RPMDB は yum 以外で変更されました。
~/cookbooks ~
remote: Counting objects: 3126, done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 3126 (delta 14), reused 2 (delta 0)
Receiving objects: 100% (3126/3126), 573.02 KiB | 228 KiB/s, done.
Resolving deltas: 100% (2068/2068), done.
remote: Counting objects: 1490, done.
remote: Total 1490 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1490/1490), 312.19 KiB | 173 KiB/s, done.
Resolving deltas: 100% (653/653), done.
remote: Counting objects: 197, done.
remote: Total 197 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (197/197), 31.16 KiB, done.
Resolving deltas: 100% (99/99), done.
remote: Counting objects: 967, done.
remote: Total 967 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (967/967), 204.30 KiB | 181 KiB/s, done.
Resolving deltas: 100% (395/395), done.
~
[Prep] Tarring up cookbooks
=====

Welcome to the Faststart installer!

We're about to turn this system into a single-system Eucalyptus cloud.

Note: it's STRONGLY suggested that you accept the default values where
they are provided, unless you know that the values are incorrect.

What's the physical NIC that will be used for bridging? (eth0)

NIC=eth0

What's the IP address of this host? (172.16.0.10)

IPADDR=172.16.0.10

What's the gateway for this host? (172.16.0.2)

GATEWAY=172.16.0.2

What's the netmask for this host? (255.255.255.0)

NETMASK=255.255.255.0

What's the subnet for this host? (172.16.0.0)

SUBNET=172.16.0.0

You must now specify a range of IP addresses that are free
for Eucalyptus to use.  These IP addresses should not be
taken up by any other machines, and should not be in any
DHCP address pools.  Faststart will split this range into
public and private IP addresses, which will then be used
by Eucalyptus instances.  Please specify a range of at least
10 IP addresses.

What's the first address of your available IP range?
172.16.0.129
What's the last address of your available IP range?
172.16.0.190
OK, IP range is good
  Public range will be:   172.16.0.129 - 172.16.0.159
  Private range will be   172.16.0.160 - 172.16.0.190

Do you wish to install the optional load balancer and image
management services? This add 10-15 minutes to the installation.
Install additional services? [Y/n]
N
OK, additional services will not be installed.



[Installing Eucalyptus]

If you want to watch the progress of this installation, you can check the
log file by running the following command in another terminal:

  tail -f /var/log/euca-install-12.21.2014-15.38.59.log

Your cloud-in-a-box should be installed in 15-20 minutes. Go have a cup of coffee!


   ) )
    ( (
  ........
  |      |]
  \      /
   ------


[Config] Enabling web console
EUARE_URL environment variable is deprecated; use AWS_IAM_URL instead
[Config] Adding ssh and http to default security group
GROUP   default
PERMISSION  default ALLOWS  tcp 22  22  FROM    CIDR    0.0.0.0/0
GROUP   default
PERMISSION  default ALLOWS  tcp 80  80  FROM    CIDR    0.0.0.0/0


[SUCCESS] Eucalyptus installation complete!
Time to install: 0:34:34
To log in to the Management Console, go to:
http://172.16.0.10:8888/

User Credentials:
  * Account: eucalyptus
  * Username: admin
  * Password: password

If you are new to Eucalyptus, we strongly recommend that you run
the Eucalyptus tutorial now:

  cd /root/cookbooks/eucalyptus/faststart/tutorials
  ./master-tutorial.sh

Thanks for installing Eucalyptus!

まとめ

  1. DevStackは偉大である
  2. PackStackも偉大である
  3. つまりOpenStackは偉大である それでは、みなさんよいお年を:)