[[installing-eucalyptus-source-16]]

#contents
----
* ソースからののインストール [version 1.6] [#xae4a45b]
* ソースからのインストール [version 1.6] [#xae4a45b]

**1. Prerequisites [#w7546274]
**1. 前提条件 [#a29e14f6]

What follows is a comprehensive list of dependencies that must be satisfied before building Eucalyptus or running it. While we provide distribution-specific installation instructions that help satisfy these dependencies, this list should be useful if you are installing or building Eucalyptus on an unsupported distribution. NOTE - If you are upgrading from a Eucalyptus 1.6.1 or older installation, please consult the Upgrade Documentation for instructions that will explain how to preserve user account information, images, volumes and snapshots.
以下のリストはEucalyptusをビルドし実行するために必要な環境の一覧です。私たちはディストリビューション固有の依存性に配慮したインストールガイドを提供していますが、以下のリストはサポートされていないディストリビューション上でEucalyptusをインストール、実行する場合に役に立つでしょう。(注釈:もしEucalyptus1.6.1以前からアップグレードする場合は、ユーザアカウント、インスタンスのイメージ、ボリューム、スナップショットを保持するために[[アップグレードドキュメント>Eucalyptus-Upgrade-1.6.1]]を参照してください)

以下のリストはEucalyptusをビルドし実行するために必要な環境の一覧です。私たちはディストリビューション固有の依存性に配慮したインストールガイドを提供していますが、以下のリストはサポートされていないディストリビューション上でEucalyptusをインストール、実行する場合に役に立つでしょう。(注釈:もしEucalyptus1.6.1以前からアップグレードする場合は、ユーザアカウント、インスタンスのイメージ、ボリューム、スナップショットを保持するために[[アップグレードドキュメント>EucalyptusUpgrade_v1.6]]を参照してください)

***Prerequisites for compiling from source [#ldfed004]
***ソースコードコンパイルの前提条件 [#ef9672aa]
以下のリストはソースコードのコンパイルに必要なプログラムの一覧です

-C compilers
-C コンパイラ
-Java Developer Kit (SDK) version 1.6 or above
-Java 開発キット (SDK) version 1.6 以降
-Apache ant 1.6.5 or above
-Apache ant 1.6.5 以降
-libc development files
-Java 開発キット (SDK) version 1.6 以上
-Apache ant 1.6.5 以上
-libc 開発環境
-pthreads development files
-pthreads 開発環境
-libvirt development files
-libvirt 開発環境
-Axis2C and rampart development files (included with Eucalyptus)
-Axis2C and rampart 開発環境 (Eucalyptusに同梱)
-Curl development files
-Curl 開発環境
-openssl development files
-openssl 開発環境
-Optional: zlib development files
-オプション: zlib 開発環境

***Prerequisites for running Eucalyptus Eucalyptus [#kb5b3c91]
***実行の前提条件 [#aae9be32]

There are a few different Eucalyptus components that run on either the 'front-end or 'node'. There are different run-time dependencies for 'front-end' and 'node' components. One physical machine can play the role of the front-end and the node.

Eucalyptusではフロントエンドとノードで異なるコンポーネントが実行されます。従ってフロントエンドとノードとでは実行に必要な環境が異なります。1台の物理マシンでフロントエンドとノードを兼ねることも可能です。

***Front-end run-time dependencies [#q56b0115]
***フロントエンド実行環境 [#y7a664f2]

-[[Java 6:http://www.java.com/en/download/index.jsp]] is needed by the Eucalyptus components running on the front end. Note that GNU Compiler for Java (gcj), included by default with some Linux distributions, is not sufficient. Make sure that your JAVA_HOME environment variable is set to the location of your JDK.

-[[Java 6:http://www.java.com/en/download/index.jsp]]はフロントエンドにおけるEucalyptusコンポーネントの動作に必要です。また環境変数JAVA_HOMEがJDKのホームディレクトリを指すように設定してください。いくつかのディストリビューションでデフォルトでインストールされるGNU Compiler for Java (gcj)はEucalyptusコンポーネントの動作に適しません。

-[[Perl:http://www.perl.org/]] is used by helper scripts
-[[Perl:http://www.perl.org/]]はEucalyptusを手助けするスクリプトを実行するために必要です。

-[[Perl:http://www.perl.org/]]はEucalyptusのヘルパースクリプトを実行するために必要です
-ヘッドノードではクラウドのユーザのメールアドレスにメールを配送・リレーするためのサーバを、ポート25番で動作する必要があります。Sendmail, Exim, Postfixでもよいですが、メールを受信する仕組みが不要なため、もっとシンプルなものでもよいでしょう。多くのLinuxディストリビューションはこれらのプログラムは簡単にインストールすることができます。メール配送プログラムが正常に動作していることを確認するには端末から"mail"コマンドで自分のメール宛にメールを送るのがいいでしょう。

-The head node must run a server on port 25 that can deliver or relay email messages to cloud users' email addresses. This can be Sendmail, Exim, or postfix, or even something simpler, given that this server does not have to be able to receive incoming mail. Many Linux distributions satisfy this requirement out of the box. To test whether you have a properly functioning mail relay for localhost, try to send email to yourself from the terminal using "mail".

-ヘッドノードではクラウドのユーザのメールアドレスにメールを配送・リレーするためのサーバを、ポート25番で動作する必要があります。Sendmail, Exim, Postfixでもよいですが、受信する必要がないためもっとシンプルなものでもよいでしょう。多くのLinuxディストリビューションはこれらのプログラムは簡単にインストールすることができます。メール配送プログラムが正常に動作していることを確認するには端末から"mail"コマンドで自分のメール宛にメールを送るのがいいでしょう。

-Dependencies for network support differ depending on the mode used (see Eucalyptus Networking for details). For full functionality satisfy all of them:

-どのネットワークモードを使うかによって依存するプログラムは変わってきます(個々のネットワークモードの詳細は[[ネットワーク設定>EucalyptusNetworking_v1.6]]を参照してください)

--For all modes:
--全てのモード:

---iproute and iptables packages (ip and iptables commands must work) 
---iproute, iptablesパッケージ (ipコマンドと、iptablesコマンドが動作すること) 

--For all modes except SYSTEM:
--SYSTEMモード以外の全てのモード

+++ DHCP Server compatible with ISC DHCP Daemon version 3.0.X (dhcp3-server)
+++ ISC DHCP Daemon version 3.0.X 互換のDHCPサーバ

--For MANAGED and MANAGED-NOVLAN modes:
--MANAGEDモード、もしくはMANAGED-NOVLANモード:

+++ bridge-utils package (brctl command must work)
+++ bridge-utilsパッケージ (brctlコマンドが動作すること)

+++ vtun package, for multi-cluster configurations
+++ vtun package(マルチクラスター構成の場合必要)

--Additionally, for MANAGED mode:
--MANAGED モード:

+++ vlan package (vconfig command must work)
+++ vlan パッケージ (vconfig コマンドが動作すること)

-For persistent dynamic block storage (aka EBS) to work, the front end will need to have the following software packages installed:
-持続型ブロックストレージ(EBS)を動作させるために、フロントエンドには以下のパッケージがインストールされていることが必要です

--lvm2 package (e.g., command lvm should work)
--lvm2 パッケージ (lvm コマンドなどが動作すること)

--aoetools package. The aoe module needs to be loaded on the front end as well as all nodes (modprobe aoe). If your kernel does not have ATA-over-Ethernet support, you will have to add that.
--aoetools パッケージ。全てのノードと同様にフロントエンドにもaoeモジュールがロードされている必要があります。もし使用するカーネルがATA-over-Ethernetをサポートしていないようであれば、サポートするように変更する必要があります。

--vblade package 
--vblade パッケージ

***Node run-time dependencies [#y1f6e775]
***ノード実行環境 [#pce96ef7]

-Perl scripts are invoked by the Node Controller
-Two hypervisors are supported:
++Xen (version >= 3.0.x)
---Furthermore, xen-utils package is needed (xm command must work) 
++KVM 
-Dependencies for network support differ depending on the mode used (see Eucalyptus Networking for details). For full functionality satisfy all of them:
--For all modes:
                + iproute and iptables packages (ip and iptables commands must work) 
--For MANAGED and MANAGED-NOVLAN modes:
                + bridge-utils package (brctl command must work) 
--Additionally, for MANAGED mode:
                + vlan package (vconfig command must work) 
-libvirt package (potentially with libvirtd, depending on hypervisor configuration) 
-[[Perl:http://www.perl.org/]]実行環境は、ノード・コントローラでスクリプトを実行するために必要です

All Eucalyptus components
-2種類のハイパーバイザがサポートされています

-You must be root to install and start Eucalyptus components (by default they will run under a different user after start). This document assumes that all commands will be executed as root. 
++[[Xen:http://xen.org/]] 3.0.x以上
--xen-utilsパッケージが使用できる必要があります(xmコマンドが動作すること)

Attention CentOS users: The version of OpenJDK that is bundled with CentOS-5 cannot compile the version of GWT that comes with Eucalyptus as a dependency. You will need to install JDK 1.6.0 "manually". We use Sun's JDK, which can be found at http://java.sun.com/javase/downloads/index.jsp. Be sure to set your JAVA_HOME and PATH properly before running the Eucalyptus 'configure' script.
Distribution-specific examples
++[[KVM:http://www.linux-kvm.org/page/Main_Page]] 

What follows is a superset of all packages necessary for building and running Eucalyptus on each supported distribution:
-どのネットワークモードを使うかによって依存するプログラムは変わってきます(個々のネットワークモードの詳細は[[ネットワーク設定>EucalyptusNetworking_v1.6]]を参照してください)

-For Opensuse 11.1, download and install RPMs the appropriate OpenSUSE RPM dependency package from the Eucalyptus website, then run the following command to install all required dependency packages: 
--全てのモード:

yast2 -i bzr python-paramiko make gcc ant apache2 apache2-devel\
---iproute, iptablesパッケージ (ipコマンドと、iptablesコマンドが動作すること) 

--MANAGEDモード、もしくはMANAGED-NOVLANモード:

+++ bridge-utilsパッケージ (brctlコマンドが動作すること)

--MANAGED モード:

+++ vlan パッケージ (vconfig コマンドが動作すること)

-libvirtdパッケージ(基本的にはlibvirtdが動作することですが、ハイパーバイザの種類によって異なります)

***全てのEucalyptusコンポーネントに共通 [#g10e6aed]

-Eucalyptusコンポーネントのインストールと実行にはroot権限が必要です(デフォルトでは、実行後は別のユーザ権限で動作します)。このドキュメントでは全てのコマンドがroot権限で実行されると想定しています。

***CentOSユーザ向けの注意: [#we3af766]
CentOS 5 に同梱されているOpenJDKでは、Eucalyptusに同梱されているGWTをコンパイルできません。そのため、JDK1.6.0を「手作業で」インストールする必要があります。インストールにはSun MicrosystemsのJDKを用います。Sun MicrosystemsのJDKは次のURLから取得することができます。http://java.sun.com/javase/downloads/index.jsp


***ディストリビューション毎の例 [#na176c23]

以下は、それぞれのディストリビューションでビルドと実行に必要なパッケージをインストールする例です。

-Opensuse 11.1の場合、Eucalyptusのサイトから適切なRPMパッケージをダウンロード、インストールします。その後、以下のコマンドで全ての必要なパッケージをインストールします。

 yast2 -i bzr python-paramiko make gcc ant apache2 apache2-devel\
   java-1_6_0-openjdk java-1_6_0-openjdk-devel libvirt-devel libcurl-devel\
   vlan dhcp-server bridge-utils ant-contrib ant-nodeps curl libvirt

-For Ubuntu 9.04 and 9.10, run the following command to install all required dependency packages: 
-Ubuntu 9.04, 9.10の場合は、以下のコマンドで全ての必要なパッケージをインストールします。

apt-get install bzr gcc make apache2-threaded-dev ant openjdk-6-jdk\
 apt-get install bzr gcc make apache2-threaded-dev ant openjdk-6-jdk\
   libvirt-dev libcurl4-openssl-dev dhcp3-server vblade apache2 unzip curl vlan\
   bridge-utils libvirt-bin kvm vtun

-For CentOS 5, download and install RPMs the appropriate CentOS RPM dependency package from the Eucalyptus website, then run the following command to install all required dependency packages: 
-CentOS 5の場合、Eucalyptusのサイトから適切なRPMパッケージをダウンロード、インストールします。その後、以下のコマンドで全ての必要なパッケージをインストールします。

yum install -y java-1.6.0-openjdk-devel ant ant-nodeps libvirt-devel\
 yum install -y java-1.6.0-openjdk-devel ant ant-nodeps libvirt-devel\
   curl-devel httpd httpd-devel apr-devel openssl-devel dhcp 

-For Debian, run the following command to install all required dependency packages: 
-Debianの場合は、以下のコマンドで全ての必要なパッケージをインストールします。

apt-get install gcc make apache2-threaded-dev ant openjdk-6-jdk\
 apt-get install gcc make apache2-threaded-dev ant openjdk-6-jdk\
   libvirt-dev libcurl4-dev dhcp3-server vblade apache2 unzip curl vlan\
   bridge-utils libvirt-bin kvm sudo vtun

Please, consult the distribution-specific pages for detailed installation instructions.
Tools for interacting with Eucalyptus
詳細はディストリビューション毎のインストール手順を参照してください

To interact with Eucalyptus, you need to install EC2-compatible command-line tools. The instructions in Eucalyptus documentation rely on the euca2ools command-line tools distributed by the Eucalyptus Team. Many other third-party tools can also be used for some of the tasks, as described on the ecosystem page.
2. Download Eucalyptus and supplied dependencies
***Eucalyptus操作のためのツール [#a1bb5286]

In what follows substitute the desired version (e.g., 1.6.2) for $VERSION either manually or by setting a shell variable.
Eucalyptusを操作するためには、Amazon EC2互換のコマンドラインツールをインストールする必要があります。Eucalyptusの各ドキュメントでは、Eucalyptusチームが配布している[[euca2ools:http://open.eucalyptus.com/wiki/Euca2oolsGuide]]を使用する想定で記述されています。他にも各種のサードパーティ製のツールがあり、特定の用途ではそちらの方がよいかもしれません。詳細は[[Eucalyptusのエコシステム:http://open.eucalyptus.com/wiki/ToolsEcosystem]]ページを参照してください。

Download either
**2. Eucalyptusの各パッケージをダウンロードする [#n9e5ab3e]

-eucalyptus-$VERSION-src.tar.gz (Eucalyptus source with included java libraries) 
以下の記述の中の $VERSION は実際のバージョン番号(1.6.2など)に置き換えるか、事前に環境変数 $VERSION として実際のバージョン番号をセットするようにしてください

or
+まず以下の2つのパッケージのうちどちらかをダウンロードします
++eucalyptus-$VERSION-src.tar.gz (Eucalyptusのソースコードとjavaライブラリを含む) 
++eucalyptus-$VERSION-src-online.tar.gz (Eucalyptusのソースコードを含む。javaライブラリはコンパイル時にダウンロードされる) 
+次に以下のパッケージをダウンロードします
--eucalyptus-$VERSION-src-deps.tar.gz (EucalyptusのCライブラリ) 

-eucalyptus-$VERSION-src-online.tar.gz (Eucalyptus source that will download java libraries at build-time) 
全てのパッケージは以下のURLからたどることができます

and for both
http://open.eucalyptus.com/downloads 

-eucalyptus-$VERSION-src-deps.tar.gz (Eucalyptus C library dependency packages) 
+ソースコードを以下のコマンドで展開します

All packages can be found on the Eucalyptus Web site:
 tar zvxf eucalyptus-$VERSION-src.tar.gz

-http://open.eucalyptus.com/downloads 
展開すると、"eucalyptus-$VERSION"というディレクトリが作成されます。インストールを簡易に行うために、環境変数EUCALYPTUS_SRCをソースコードのディレクトリ、環境変数EUCALYPTUSをインストール先のディレクトリにセットします。(推奨は/opt/eucalyptusです)

Unpack the Eucalyptus source:
 cd eucalyptus-$VERSION
 export EUCALYPTUS_SRC=`pwd`
 export EUCALYPTUS=/opt/eucalyptus

tar zvxf eucalyptus-$VERSION-src.tar.gz
**3. 依存するパッケージをコンパイルする [#k0922749]
Eucalyptusをインストールするには、Eucalyptusが依存しているパッケージをコンパイルする必要があります。依存パッケージは上記にある、eucalyptus-$VERSION-src-deps.tar.gzです。以下の記述では、依存する全てのパッケージが"$EUCALYPTUS_SRC/eucalyptus-src-deps/"以下に展開されており、インストール先は"$EUCALYPTUS/packages"であることを想定しています。

Now you should have a directory eucalyptus-$VERSION. To simplify the remainder of the installation, define EUCALYPTUS_SRC environment variable to be the top of the source tree of eucalyptus and the variable EUCALYPTUS to be the directory where eucalyptus will be installed (we recommend using /opt/eucalyptus/):
パッケージを展開し、インストール先のディレクトリを作成します。

cd eucalyptus-$VERSION
export EUCALYPTUS_SRC=`pwd`
export EUCALYPTUS=/opt/eucalyptus
 cd $EUCALYPTUS_SRC
 tar zvxf ../eucalyptus-$VERSION-src-deps.tar.gz
 mkdir -p $EUCALYPTUS/packages/

3. Build Dependencies
パッケージをコンパイルし、インストールします。以下の手順はいくつかのLinuxディストリビューションでは動作しますが、全てのディストリビューションに共通ではありません。コンパイルにあたってはご使用のディストリビューションのドキュメントを参照してください。

To install Eucalyptus, you need to build packages that Eucalyptus depends on, which we provide in the above-mentioned package eucalyptus-$VERSION-src-deps.tar.gz. For the sake of this discussion, we are going to assume that all packages have been untarred inside "$EUCALYPTUS_SRC/eucalyptus-src-deps/" as above and will be installed in "$EUCALYPTUS/packages".
-a. Axis2

Unpack the dependencies and create the directory you'll use to install them:
 cd $EUCALYPTUS/packages
 tar zxvf $EUCALYPTUS_SRC/eucalyptus-src-deps/axis2-1.4.tgz

cd $EUCALYPTUS_SRC
tar zvxf ../eucalyptus-$VERSION-src-deps.tar.gz
mkdir -p $EUCALYPTUS/packages/
-b. Axis2/C

Build and install the dependencies. The following instructions work on some Linux distributions, but aren't universal. Please, consult the documentation for the specific packages for help with building them on your distribution.
a. Axis2
Axis2/Cをコンパイルするためには、ApacheとAPRのヘッダファイルを参照できることが必要です。いくつかのディストリビューションでは以下のように環境変数をセットします。

cd $EUCALYPTUS/packages
tar zxvf $EUCALYPTUS_SRC/eucalyptus-src-deps/axis2-1.4.tgz
Ubuntu, Debianの例

 export APACHE_INCLUDES=/usr/include/apache2
 export APR_INCLUDES=/usr/include/apr-1.0

b. Axis2/C
CentOS 5の例

To compile Axis2/C, you will need to locate development headers for Apache and for APR. On some distributions (e.g., Ubuntu and Debian) the following values should work:
 export APACHE_INCLUDES=/usr/include/httpd/
 export APR_INCLUDES=/usr/include/apr-1/

export APACHE_INCLUDES=/usr/include/apache2
export APR_INCLUDES=/usr/include/apr-1.0
OpenSuse 11の例

On CentOS 5, the headers should be in the following location:
 export APACHE_INCLUDES=/usr/include/apache2/
 export APR_INCLUDES=/usr/include/apr-1/

export APACHE_INCLUDES=/usr/include/httpd/
export APR_INCLUDES=/usr/include/apr-1/
環境変数をセットしたら、Axis2/Cをコンパイルします。

while on OpenSuse 11 you may find them at:
 export AXIS2C_HOME=$EUCALYPTUS/packages/axis2c-1.6.0
 cd $EUCALYPTUS_SRC/eucalyptus-src-deps/
 tar zvxf axis2c-src-1.6.0.tar.gz
 cd axis2c-src-1.6.0
 CFLAGS="-w" ./configure --prefix=${AXIS2C_HOME} --with-apache2=$APACHE_INCLUDES --with-apr=$APR_INCLUDES --enable-multi-thread=no
 make ; make install

export APACHE_INCLUDES=/usr/include/apache2/
export APR_INCLUDES=/usr/include/apr-1/
-c. Rampart/C

With the two environment variables set, you can build and install Axis2/C as follows:
 export AXIS2C_HOME=$EUCALYPTUS/packages/axis2c-1.6.0
 export LD_LIBRARY_PATH=${AXIS2C_HOME}/lib:$LD_LIBRARY_PATH
 cd $EUCALYPTUS_SRC/eucalyptus-src-deps/
 tar zvxf rampartc-src-1.3.0.tar.gz
 cd rampartc-src-1.3.0
 ./configure --prefix=${AXIS2C_HOME} --enable-static=no --with-axis2=${AXIS2C_HOME}/include/axis2-1.6.0
 make ; make install

export AXIS2C_HOME=$EUCALYPTUS/packages/axis2c-1.6.0
cd $EUCALYPTUS_SRC/eucalyptus-src-deps/
tar zvxf axis2c-src-1.6.0.tar.gz
cd axis2c-src-1.6.0
CFLAGS="-w" ./configure --prefix=${AXIS2C_HOME} --with-apache2=$APACHE_INCLUDES --with-apr=$APR_INCLUDES --enable-multi-thread=no
make ; make install
次に$AXIS2C_HOME/axis2.xmlをエディタで開き、以下のように修正します。

c. Rampart/C
"inflow"セクション内:

export AXIS2C_HOME=$EUCALYPTUS/packages/axis2c-1.6.0
export LD_LIBRARY_PATH=${AXIS2C_HOME}/lib:$LD_LIBRARY_PATH
cd $EUCALYPTUS_SRC/eucalyptus-src-deps/
tar zvxf rampartc-src-1.3.0.tar.gz
cd rampartc-src-1.3.0
./configure --prefix=${AXIS2C_HOME} --enable-static=no --with-axis2=${AXIS2C_HOME}/include/axis2-1.6.0
make ; make install

Next, change the following in $AXIS2C_HOME/axis2.xml. In the 'inflow' section, change:

変更前
        <!--phase name="Security"/-->

to

変更後
        <phase name="Security"/>
        <phase name="Rahas"/>

In the 'outflow' section, change:
'outflow'セクション内:

        <!--phase name="Security"/-->

to

変更後
        <phase name="Security"/>

4. Building Eucalyptus
**4. Eucalyptusをコンパイルする [#dfa11735]

Make sure JAVA_HOME is defined.
事前に環境変数JAVA_HOMEがセットされていることを確認してください。

cd $EUCALYPTUS_SRC
./configure --with-axis2=$EUCALYPTUS/packages/axis2-1.4 --with-axis2c=$EUCALYPTUS/packages/axis2c-1.6.0 --enable-debug --prefix=$EUCALYPTUS
make ; make install
 cd $EUCALYPTUS_SRC
 ./configure --with-axis2=$EUCALYPTUS/packages/axis2-1.4 --with-axis2c=$EUCALYPTUS/packages/axis2c-1.6.0 --enable-debug --prefix=$EUCALYPTUS
 make ; make install

5. Deploying Eucalyptus
**5. コンパイルしたEucalyptusをインストールする [#g1ac3e98]

a. At this point, if you plan to use Eucalyptus on more than one node, you're ready to push the software out to the other nodes (although not all software components are required on all nodes, it is simpler to just mirror everything and selectively enable components via start-up scripts). If you installed Eucalyptus in its own directory, you can just sync the entire package to all of the hosts listed above using whatever mechanism you typically use to push changes to nodes (rsync, for instance).
a. もしEucalyptusを複数のノードで稼働させる場合は、コンパイルしたEucalyptusソフトウェア、各パッケージを全てのノードに配布します。(全てのソフトウェアパッケージが全てのノードで必要という訳ではないのですが、ソフトウェアの配布は全て行い、どのプログラムを起動するか設定するファイルを編集する方が作業がシンプルです)パッケージをノードに配布するにはrsyncなどのソフトウェアを使います。以下は例です。

rsync -a $EUCALYPTUS/ root@{node-host-1}:$EUCALYPTUS/
rsync -a $EUCALYPTUS/ root@{node-host-1}:$EUCALYPTUS/
...
 rsync -a $EUCALYPTUS/ root@{node-host-1}:$EUCALYPTUS/
 rsync -a $EUCALYPTUS/ root@{node-host-1}:$EUCALYPTUS/
 ...

On installations without a root user, such as Ubuntu, it may be easier to pull the software from each node one at a time:
フロントエンドがrootユーザになれない環境(例えばUbuntuなど)であれば、個々のノードから以下のようにパッケージを取得した方が簡単です。

node1# rsync -a {user}@{front-end}:$EUCALYPTUS/ $EUCALYPTUS/
node2# rsync -a {user}@{front-end}:$EUCALYPTUS/ $EUCALYPTUS/
...
 node1# rsync -a {user}@{front-end}:$EUCALYPTUS/ $EUCALYPTUS/
 node2# rsync -a {user}@{front-end}:$EUCALYPTUS/ $EUCALYPTUS/
 ...

NOTE: Installing Eucalyptus in the same directory on all nodes will make it easier to manage it, so we strongly advise you to do so.
【注意】Eucalyptusを全てのノードで同じディレクトリにインストールすると管理が容易です。私たちはこれを強く推奨します。

6.) Configure hosts
a. Set up a 'eucalyptus' user on all machines
**6. ホストの設定 [#a49cb2b5]

Eucalyptus will run as regular user on your systems, which you'll need to add before running Eucalyptus (we will use eucalyptus) on all machines. For most distributions, this task is accomplished by running the command:
***a. 全てのホストで'eucalyptus'ユーザアカウントを作成 [#c0df0aab]
Eucalyptusは一般ユーザ権限で動作します。アカウントはeucalyptusになります。ほとんどのディストリビューションでは以下のコマンドでeucalyptusユーザアカウントを作成することができます。

useradd eucalyptus
 useradd eucalyptus

For OpenSUSE, use:
OpenSUSEでは以下のようにしてください。

groupadd eucalyptus
useradd eucalyptus -m -g eucalyptus
 groupadd eucalyptus
 useradd eucalyptus -m -g eucalyptus

b. Configure your hypervisor
***b. ハイパーバイザの設定 [#pf10a0d2]
eucalyptusユーザアカウントは、ノード上のハイパーバイザをlibvirt経由で制御できる必要があります。いくつかのディストリビューションではeucalyptusユーザアカウントをlibvirtグループに追加することでeucalyptusユーザアカウントはlibvirt経由でハイパーバイザを制御することができます。eucalyptusユーザアカウントをlibvirtグループに追加するためには/etc/groupファイルを編集します。お使いのディストリビューションのlibvirtドキュメントを参照してください。より詳細な情報は[[ハイパーバイザの設定>hypervisor-configuration]]を参照してください

Ensure that this user can control your hypervisor through libvirt on all compute nodes. On some distributions, this can be accomplished by adding eucalyptus to group libvirt or libvirtd in file /etc/group. Please, consult the documentation for libvirt on your distribution for instructions. For more detailed information, see Hypervisor Configuration for more information.
c. Configure your networking
***c. ネットワークの設定 [#g58ee645]
Eucalyptusではいくつかのネットワークモードを選ぶことができます。どのネットワークモードを選ぶかは、各ノード、クラスタを構成するLANの設定や提供できる機能、またEucalyptusクラウドでどのようなネットワーク形態を作るか、によって異なります。ほとんどのネットワークモードでは、各ノードのプライマリネットワークインターフェイスをbridgeモードに設定する必要があります(いくつかのディストリビューションのXen設定ではbridgeモードがデフォルトになっています)。詳細な情報とセットアップ手順は[[ネットワークモードの設定>EucalyptusNetworking_v1.6]]を参照してください。どのネットワークモードを使うかを決めたら、各ノードのプライマリネットワークインターフェイスのbridgeモードを設定する必要があります。サンプルのbridge設定は[[以下(Eucalyptusのネットワーク設定)>EucalyptusNetworking_v1.6]]から参照することができます

Eucalyptus provides several network configuration options from which to choose, depending on your local network setup, capabilities, and the networking features that you wish to take advantage of within Eucalyptus. Most networking options require that, on your node controllers, the primary interface is configured to be a bridge (this is the default configuration with some distribution's Xen hypervisor configuration). See Network Configuration for more information and set-up instructions. Once you have decided which network mode you will be using, you may be required to set up ethernet bridges on Eucalyptus component machines. Example bridge configuration steps can be found here.
d. Configure Eucalyptus components
***d. Eucalyptusコンポーネントの設定 [#y47ffb8b]
個々のノード・コントローラが動作するコンピュートノードで、仮想マシンイメージのキャッシュ用ディレクトリを作成します。仮想マシンイメージは仮想マシンがノードで起動している間そのディレクトリ以下にキャッシュされます。作成したディレクトリは必ず空にしてください。また仮想マシンイメージをキャッシュできるだけの十分な容量を確保してください。以下の例では/usr/local/eucalyptusを使用しています。

On your compute nodes, create a local directory where VM images are to be placed temporarily while VMs are running (images will be cached under the same path, too). It is important that the directory is empty as everything in it will be removed. Be sure to pick a partition with ample disk space as VM images can be large. We use /usr/local/eucalyptus in the example below.
ハイパーバイザの種類も含めた設定を、全てのノードの設定ファイルに書き込みます。この作業はeuca_confコマンドラインツールを使用して行います。

Place the mandatory parameters (including the type of hypervisor you plan to use) into the configuration file and set up the permissions on Eucalyptus files appropriately on all nodes. Both tasks can be accomplished with flags to euca_conf tool:
- -d オプションはEucalyptusのインストール先ディレクトリ($EUCALYPTUS)を指定します
- --hypervisor オプションはハイパーバイザの種類('xen' もしくは 'kvm')を指定します
- --instances オプションはノードの仮想マシンイメージのキャッシュディレクトリを指定します
- --user オプションはEucalyptusコンポーネントを実行するユーザアカウントを指定します
- --setup オプションを指定すると、euca_confツールは初回起動時設定を行います

- -d specifies the root of Eucalyptus installation ($EUCALYPTUS)
- --hypervisor specifies the hypervisor ('xen' or 'kvm')
- --instances specifies where, on compute nodes, instance files will be stored
- --user specifies the user that you created for running Eucalyptus
- --setup invokes the first-time setup tasks 
 $EUCALYPTUS/usr/sbin/euca_conf -d $EUCALYPTUS --hypervisor kvm --instances /usr/local/eucalyptus --user eucalyptus --setup

$EUCALYPTUS/usr/sbin/euca_conf -d $EUCALYPTUS --hypervisor kvm --instances /usr/local/eucalyptus --user eucalyptus --setup
***e. ディストリビューション固有の設定 [#ub70f2da]
いくつかのディストリビューションでは、Eucalyptusの実行前に追加で設定を行う必要があります。このセクションではディストリビューション毎に詳細を記述します。

Ubuntu 9.04 "Januty", 9.10 "Karmic"上で動作するapparmor((AppArmor http://ja.opensuse.org/AppArmor))の設定を変更し、dhcpd3がファイルシステムへの書き込みを許可するようにします。/etc/apparmor.d/usr.sbin.dhcpd3ファイルに以下の行を追加します。

e. Distribution-specific post configuration steps
 /opt/eucalyptus/var/run/eucalyptus/net/ r,
 /opt/eucalyptus/var/run/eucalyptus/net/** r,
 /opt/eucalyptus/var/run/eucalyptus/net/*.pid lrw,
 /opt/eucalyptus/var/run/eucalyptus/net/*.leases* lrw,
 /opt/eucalyptus/var/run/eucalyptus/net/*.trace lrw,

Some linux distributions require that the admin perform a few extra steps before bringing up Eucalyptus. This section details some of these steps:
上記の/opt/eucalyptusはEucalyptusのインストールディレクトリに置き換えてください。その後以下のコマンドでapparmorを再起動します。(【注意】変更がすぐに反映されない場合があります。その場合は少し待つか、システムを再起動してください)

For Ubuntu 9.04 "Jaunty" and 9.10 "Karmic", apparmor needs to be configured to allow dhcpd3 to write to the filesystem. Add the following lines to '/etc/apparmor.d/usr.sbin.dhcp3':
 /etc/init.d/apparmor stop
 /etc/init.d/apparmor start

/opt/eucalyptus/var/run/eucalyptus/net/ r,
/opt/eucalyptus/var/run/eucalyptus/net/** r,
/opt/eucalyptus/var/run/eucalyptus/net/*.pid lrw,
/opt/eucalyptus/var/run/eucalyptus/net/*.leases* lrw,
/opt/eucalyptus/var/run/eucalyptus/net/*.trace lrw,
また、UbuntuのDHCPデーモンはrootではなく'dhcpd'ユーザアカウントで動作するように設定されています。Eucalyptusのクラスタのヘッドノードの$EUCALYPTUS/etc/eucalyptus/eucalyptus.confを編集し、以下の2行を追加します。

where you substitute '/opt/eucalyptus' with the path to where you have chosen to install Eucalyptus. Then, restart apparmor (NOTE: sometimes changes don't take effect right away - either wait or reboot the system to be sure):
 VNET_DHCPDAEMON="/usr/sbin/dhcpd3"
 VNET_DHCPUSER="dhcpd"

/etc/init.d/apparmor stop
/etc/init.d/apparmor start
この時点でEucalyptusは起動準備ができましたが、ネットワークモードを設定するには[[ネットワークモードの設定>EucalyptusNetworking_v1.6]]を参照して設定を行う必要があります。

***f. スタートアップスクリプトの編集 [#g7da304b]
システムの起動時にEucalyptusサービスを起動したい場合は以下のコマンドで起動スクリプトのシンボリックリンクを作成します。

Also, since Ubuntu DHCP daemon is configured to run as 'dhcpd' and not root, ensure that the following two variables are set as follows in the $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf file on the Cluster head-node:
クラウド・コントローラ
 ln -sf $EUCALYPTUS/etc/init.d/eucalyptus-cloud /etc/init.d/eucalyptus-cloud
クラスタ・コントローラ
 ln -sf $EUCALYPTUS/etc/init.d/eucalyptus-cc /etc/init.d/eucalyptus-cc
ノード・コントローラ
 ln -sf $EUCALYPTUS/etc/init.d/eucalyptus-nc /etc/init.d/eucalyptus-nc

VNET_DHCPDAEMON="/usr/sbin/dhcpd3"
VNET_DHCPUSER="dhcpd"
そしてディストリビューション毎のブート手順に組み込みます。組み込み方はディストリビューションによって異なります。

At this point you should be ready to start Eucalyptus processes on all nodes but before doing so you may want to configure the Eucalyptus network: you can read more about it at Network Configuration.
f. Configure your startup scripts
update-rc.dディレクトリがある場合:
 update-rc.d eucalyptus-cloud defaults

If you want to have eucalyptus started automatically when your machines are (re)booted, you can add the following symlinks on the appropriate hosts: add eucalyptus-cloud on the Cloud head-node, add eucalyptus-cc on the Cluster head-node(s), and add eucalyptus-nc on the compute node(s)
chkconfigコマンドがある場合:
 chkconfig eucalyptus-cloud on

ln -sf $EUCALYPTUS/etc/init.d/eucalyptus-cloud /etc/init.d/eucalyptus-cloud
ln -sf $EUCALYPTUS/etc/init.d/eucalyptus-cc /etc/init.d/eucalyptus-cc
ln -sf $EUCALYPTUS/etc/init.d/eucalyptus-nc /etc/init.d/eucalyptus-nc
**7. Eucalyptusの実行 [#s1de6654]
Eucalyptusパッケージには設定の変更に使うためのeuca_confスクリプトが付属しています。ecua_confスクリプトから実行されるもののうち、いくつかは'$EUCALYPTUS/etc/eucalyptus/eucalyptus.conf'を書き換えます。'$EUCALYPTUS/etc/eucalyptus/eucalyptus.conf'設定ファイルはエディタを使用して編集することもできます。ecua_confスクリプトから実行されるものの中には、クラウド・コントローラのデータベースを操作します。euca_confスクリプトがクラウド・コントローラに対して実行する操作の多くはWebインターフェイスでも実装されています。詳細は後述します。

and then add the symlinks to the distribution's booting process. This process differs from distribution to distribution. For example if you have update-rc.d available you can run:
設定を変更することに加えて、euca_confスクリプトはx509証明書をEucalyptusクラウドの各ノード間で同期しようとします。同期にはrsyncとscpが使用されます。クラウドを構成する各ノードのrootアカウントをパスワードなしでsshログインできるように設定することを強くお勧めします。(設定がない場合、euca_conf実行時にrootのパスワードを聞いてきます)

update-rc.d eucalyptus-cloud defaults
[[Eucalyptus (ユーカリプタス) のインストール>EucalyptusInstall_v1.6]]にて説明した通り、Eucalyptusは5種類のコンポーネントから成り立っています。
+クラウド・コントローラ(CLC)
+Walrus
+クラスタ・コントローラ(CC)
+ストレージ・コントローラ(SC)
+ノード・コントローラ(NC)

or if you have chkconfig available you can run:
以下の説明ではノード・コントローラ以外の全てのコンポーネントが1つのシステム(フロントエンド)で動作していることを想定しています。ノード・コントローラが動作するシステムはコンピュート・ノードと呼ぶことにします。

chkconfig eucalyptus-cloud on
最初にEucalyptusの動作に必要なプログラムが全てインストールされ、動作するようにしてください。Eucalyptusの動作時に問題があった場合、全てのエラーは$EUCALYPTUS/var/log/eucalyptusに出力されます。

6. Running Eucalyptus
次にフロントエンド、各コンピュート・ノードの$EUCALYPTUS/etc/eucalyptus/eucalyptus.confの内容があなたの構築した環境に適合しているかを注意深く確認してください。

Eucalyptus comes with the euca_conf script for configuring Eucalyptus. For some requests it modifies the configuration file located in '$EUCALYPTUS/etc/eucalyptus/eucalyptus.conf' (which can also be edited manually), for other requests it modifies the database maintained by the Cloud Controller (much of that functionality is duplicated in the Web interface, to be described later).
全ての設定がで季節であれば、フロントエンドでクラウドサービスを開始します。その後、適切なシステム上で各コンポーネントの初期かスクリプトを実行します。ほとんどの場合、フロントエンドで実行するコマンドは以下のようになります。

In addition to modifying the configuration, euca_conf attempts to synchronize x509 credentials across the nodes of a Eucalyptus installation by relying on rsync and scp. We highly recommend setting up password-less SSH access for the root user across all nodes of your Eucalyptus installation (otherwise, euca_conf will prompt you for remote system passwords).
 # フロントエンドでクラウドサービスを有効にする
 $EUCALYPTUS/usr/sbin/euca_conf --enable cloud --enable walrus --enable sc
 
 # フロントエンドでクラウドサービスを開始する
 $EUCALYPTUS/etc/init.d/eucalyptus-cloud start
 
 # クラスタ・コントローラを開始する
 $EUCALYPTUS/etc/init.d/eucalyptus-cc start

As explained in the overview, a Eucalyptus installation consists of five types of components: cloud controller (CLC), Walrus, cluster controller (CC), storage controller (SC), and the node controller(s) (NCs). In following instructions we assume that all components except the NCs are co-located on a machine that we will refer to as the front end and that NCs run on compute nodes.
各コンピュート・ノードで実行するコマンドは以下のようになります。

First, make sure that you have all of the runtime dependencies of Eucalyptus installed, based on your chosen set of configuration parameters. If there is a problem with runtime dependencies (for instance, if Eucalyptus cannot find/interact with them), all errors will be reported in log files located in $EUCALYPTUS/var/log/eucalyptus.
 $EUCALYPTUS/etc/init.d/eucalyptus-nc start

Next, inspect the contents of $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf carefully, on each machine, to make sure that the settings are appropriate for your environment.
各コンポーネントを停止するには上記コマンドの'start'を'stop'に置き換えて実行します。

Once everything is configured properly, enable the cloud services that you wish to run on your front-end, then use the init-scripts to start each component on the appropriate host. Most likely, on the front-end you would run:
【注意】後に$EUCALYPTUS/etc/eucalyptus/eucalyptus.confを変更した結果、クラスタ・コントローラに変更を反映させるには上記コマンドのstart/stop/restartではなく、cleanstart/cleanstop/cleanrestartを使用してください。これを使用すると、クラスタ・コントローラは内部で保持している設定を破棄し、設定ファイルから設定を再度読み込みます。

# enable services on the front-end
$EUCALYPTUS/usr/sbin/euca_conf --enable cloud --enable walrus --enable sc
戻る:[[Eucalyptus (ユーカリプタス) のインストール>EucalyptusInstall_v1.6]]

# start enabled front-end services
$EUCALYPTUS/etc/init.d/eucalyptus-cloud start
進む:[[ディストリビューション別のパッケージからのインストール>installation-distribution-specific-binary-packages]]

# start the cluster controller

$EUCALYPTUS/etc/init.d/eucalyptus-cc start

And on each of the compute nodes you would run:

$EUCALYPTUS/etc/init.d/eucalyptus-nc start

To stop them you call the script with stop instead of start.

NOTE: if you later decide to make changes to $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf that will effect the cluster-controller, make sure to use the 'cleanstart', 'cleanstop', and/or 'cleanrestart' directives to the init scripts (as opposed to start/stop/restart). This will both remove all existing CC state, and will cause it to re-read the configuration file.

« Installing Eucalyptus (1.6) UP Installation from distribution-specific binary packages »


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS