LoginSignup
3
0

More than 3 years have passed since last update.

Eucalyptus 4.4.5 をFastStartでインストールする

Posted at

Eucalyptus環境を構築した際の備忘録.
Eucalyptusをインストールし, テストインスタンスにSSHします.
インストール方法は, Installation Guide を参照する方法と, スクリプトを使用した FastStart があります. 今回は後者で行います.

Eucalyptusとは

Eucalyptus(ユーカリプタス)とは、AWS互換のプライベートクラウドを構築するためのオープンソースソフトウェアです。

同じプライベートクラウドの OpenStack と比較すると, インストールが容易で, 可能な限り非侵入的に設計されているのが特徴です.
またAWSの EC2, S3, IAM, ELB, Auto Scaling, CloudFormation, そして CloudWatch と互換性のあるAPIを提供しています.
これにより, ハイブリッドクラウドを構築することも可能です.
ベースOSは CentOS7, RHEL7 の64bitのみサポートしています.

環境

システムリソース

  • メモリ 6G
  • ストレージ(HDD) 200GBくらい
  • CPU 4core

ネットワーク

  • 192.168.11.0/24
    VLSM環境では失敗しました
  • 192.168.11.1 (デフォルトゲートウェイ)
  • 192.168.11.2 (このマシン)
  • 192.168.11.200 - 192.168.11.240 (使用するIPアドレス範囲)

OS

  • CentOS 7.6 (1810) minimal
  • 言語 US
  • パーティション(LVM)
    • /boot
    • swap
    • /

インストール

※ 筆者は実機での検証でしたが, 仮想環境上でインストールする場合は, CPUの仮想化支援機能 をONにする必要があります(未検証)
作業は全て root で行います.

1. 先ずは最新の状態にしておく

yum update -y

2. NTPのインストール

設定はデフォルトのままでも大丈夫です

yum install chrony -y
systemctl start chronyd
systemctl enable chronyd
hwclock --systohc

3. ネットワークマネージャを削除

stop, disableだけではダメでしたので, 削除してしまいます

systemctl stop NetworkManager
systemctl disable NetworkManager
yum remove NetworkManager -y

4. ファイアウォールの無効化

systemctl stop firewalld
systemctl disable firewalld

5. SELinuxをPermissiveに変更

Disable だとコケました.
有効のままでも成功しました(後述)
/etc/selinux/configを編集して, enforcing を permissive に変更

/etc/selinux/config
7c7
< SELINUX=enforcing
---
> SELINUX=permissive

設定ファイルを書き換えた場合は再起動しないと反映されないので, 一度再起動

reboot
getenforce
> Permissive

6. FastStart

下記のコマンドでインストールスクリプトが走ります

bash <(curl -Ls https://eucalyptus.cloud/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
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.36 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets
[Precheck] OK, curl is up to date

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: 16G

Continue? [y/N]y  # ディスク容量が100GB未満の場合, 警告がでますがインストールは出来ます.
                  # 最終的にインスタンスを建てた後の使用量は12GB程度でした

package eucalyptus is not installed
[Precheck] Checking OS
[Precheck] OK, OS is supported

package PackageKit is not installed
package NetworkManager is not installed
[Precheck] Checking hardware virtualization
[Precheck] OK, processor supports virtualization

[Precheck] Checking SELinux setting
=====
WARNING: SELinux is Enforcing

Your /etc/selinux/config file is set to 'enforcing'.
Eucalyptus isn't ready for that yet, it can only handle Permissive mode.

Do you want me to switch SELinux from Enforcing to Permissive?
If you answer 'yes' I will change that for you.
Note that this lowers the level of security.
Proceed? [y/N]y  # SELinuxが有効のままの場合はyを選択するとPermissiveに変更されます

[Precheck] Identifying primary network interface

Found network device: em1

Active network interface em1 found
[Precheck] OK, network interfaces checked.

[Precheck] Precheck successful.

全ての事前チェックに成功したら, 対話形式でのインストールが始まります.
使用するIPアドレスの範囲指定以外, 基本的にそのまま空エンターで大丈夫です.
進捗度合としてオシャンteaなカップが全部で4つ出てきます (筆者は26分かかりました)

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 NTP server which we will update time from? (0.centos.pool.ntp.org)

NTP=0.centos.pool.ntp.org


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

NIC=em1

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

IPADDR=192.168.11.2

Using nip.io for wildcard dns.
What's the gateway for this host? (192.168.11.1)

GATEWAY=192.168.11.1

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

NETMASK=255.255.255.0

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

SUBNET=192.168.11.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?
192.168.11.200
What's the last address of your available IP range?
192.168.11.240
OK, IP range is good
  Public range will be:   192.168.11.200 - 192.168.11.220
  Private range will be   192.168.11.221 - 192.168.11.240

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]

OK, additional services will be installed.
[Chef] Checking if Chef Client is installed
which: no chef-client in (/usr/local/sbin:/usr/local/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 23103  100 23103    0     0   4042      0  0:00:05  0:00:05 --:--:--  5498
[Chef] OK, Chef Client is installed

[Chef] Removing old Chef templates
[Chef] Downloading necessary cookbooks from URL:
https://downloads.eucalyptus.cloud/software/eucalyptus/eucalyptus-cookbooks-4.4-5.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  388k  100  388k    0     0  60920      0  0:00:06  0:00:06 --:--:-- 98998

Binding Eucalyptus to device em1



[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-07.30.2019-20.25.00.log

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

[Yum Update] 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-07.30.2019-20.25.00.log

[Yum Update] Package update in progress...

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

[Yum Update] Full update of the OS completed.

Phase 0 (OS) completed successfully...getting a 2nd cup of tea and moving on to phase 1 (CLC).

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

Phase 1 (CLC) completed successfully...getting a 3rd cup of tea and moving on to phase 2 (main cloud components).

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


   ( (
     ) )
    ( (    pleted successfully...yes, in fact having that final cup of tea and moving on to phase 3 (create first resources).
  ........
  |      |]
  \      /
   ------

Phase 3 completed successfully.

[Config] Generating credentials

[Config] Enabling web console
[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:26:03
To log in to the Management Console, go to:
https://192.168.11.2/

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!

テストインスタンスへ接続

正常にインストールが完了した場合, マネジメントコンソールへのURLと, デフォルトの資格情報が表示されます (/etc/motd からも確認できます)

デフォルトの資格情報は下記の通りです

  • Account: eucalyptus
  • Username: admin
  • Password: password

ブラウザからアクセスすると, ログイン画面が表示されますので情報を入力しログインします.
login.png
Dashboard.png

Dashboard から Instance を選択
デフォルトのインスタンスとしてCirrOSが既に起動しています
Instances.png

CirrOS は、OpenStack Compute のようなクラウドでテストイメージとして使用するために設計された、最小の Linux ディストリビューションです。

NAME(ID) 列のIDをクリックすると, そのインスタンスの詳細ページが開きます
details_for_instance_test.png

IPアドレスを確認し /root ディレクトリに生成されている my-first-keypair.pem を使用してssh接続します

ssh -i /root/my-first-keypair.pem cirros@192.168.11.211

$ whoami
cirros
$ uname -a
Linux cirros 3.2.0-37-virtual #58-Ubuntu SMP Thu Jan 24 15:48:03 UTC 2013 x86_64 GNU/Linux

参考

公式ドキュメント

3
0
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
3
0