简易搭建一个私有云平台

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

简易搭建一个私有云平台

众说周知Amazon E2是一个公共云的计算平台,属于IaaS(基础设施即服务)这类.

现在有一款开源的项目Eucalyptus(Elastic Utility Computing Architecture for Linking Your Programs To Useful Systems),同样实现了Amazon EC2的功能,由于其开源性,注定了搭建一个私有的云计算平台成为可能. 更方便的是Ubuntu9.10服务器版已经集成了Eucalyptus这个开源软件,使的搭建企业私有的云计算平台变得方便而简单.

下面我们将一步步来搭建这个私有的云计算平台.

一准备工作

1) 至少准备两台机器, 当然我这里是用虚拟机软件(Sun VirtualBox)来虚拟出两台实际的机器

(如果你也采用Sun VirtualBox,有些注意事项,可以参见后面的附录一)

2) 底层操作系统: Ubuntu9.10 服务器版(/cloud)

3) 云服务环境: Eucalyptus , ( Ubuntu9.10 服务器版内置) /

4) Eucalyptus 命令行客户端

5) Eucalyptus客户端: Elastic Fox ,这是一个firefox插

件: /connect/entry.jspa?externalID=609

--------------------------------------------------------------------------

二云计算服务的搭建(使用Ubuntu自带的向导,十分简单的哦)

1) 一台机器, 作为Cluster(Front End) , 命名为: ubuntu-cluster , 它包含了如下部分

1.Cloud Controller (clc)

2.Cluster Controller (cc)

3.Walrus (the S3-like storage service)

4.Storage Controller (sc)

5.

2) 至少一台机器作为Node, 命名为: ubuntu-node1,它包含了如下部分

Node Controller (nc)

3) 在作为Cluster的机器上(Front end),安装基本系统: Ubuntu9.10 服务器版

1.安装引导时,要选择"Install Ubuntu Enterprise Cloud"

2. 安装过程中,如果提示"Cluster" 还是"Node",一定要选择Cluster

3.安装过程中,提示"Configure postfix" 时选择internet Site

4. 安装过程中,提示"Name your cluster" 时,请取一个合适的名字,比如我取之为: cluster1

5. 安装过程中,提示"a list of available IP addresses on your network", 一定要选择一个可用的公共IP段. 例如:e.g. 192.168.1.200-192.168.1.249

4) 在作为Node的机器上,也安装基本系统: Ubuntu9.10 服务器版

Node安装很简单,但一定要保证此时的cluster正在运行,并且Node要和安装cluster 的机器联网,否则后面Node在cluster上不能注册成功

1.安装引导时,要选择"Install Ubuntu Enterprise Cloud"

2. 安装过程中,如果提示"Cluster" 还是"Node",一定要选择Node, (如果Cluster正在运行,这一步可能不会出现,自

动会选择Node

3.安装完一个节点后,,后续的节点可以采用克隆方法,参见后面的附录二

如果使用UEC/PackageInstall安装,则需要执行下列操作。(不过我们一般使用的不是Package安装,而是CD安装,所以下面的a到e通常可以直接略过。)

a. a. Public SSH keys have been exchanged properly

b.The services are configured properly

c.The services are publishing their existence

d.The appropriate uec-component-listener is running

e.Verify Registration.

a. Exchange Public SSH Keys

The Cloud Controller's eucalyptus user needs to have SSH access to the Walrus Controller, Cluster Controller, and Storage Controller as the eucalyptus user. Install the Cloud Controller's eucalyptus user's public ssh key by:

∙On the target controller, temporarily set a password for the eucalyptus user:

sudo passwd eucalyptus

∙Then, on the Cloud Controller:

sudo -u eucalyptus ssh-copy-id -i ~eucalyptus/.ssh/id_rsa.pub eucalyptus@

∙You can now remove the password of the eucalyptus account on the target controller, if you wish:

∙sudo passwd -d eucalyptus

b. Configure the Services

On the Cloud Controller:

∙For the Cluster Controller Registration:

o Define the shell variable CC_NAME in /etc/eucalyptus/eucalyptus-cc.conf

o Define the shell variable CC_IP_ADDR in /etc/eucalyptus/eucalyptus-ipaddr.conf, as a space separated list of one or more IP addresses.

∙For the Walrus Controller Registration:

o Define the shell variable WALRUS_IP_ADDR in /etc/eucalyptus/eucalyptus-ipaddr.conf, as a single IP address.

On the Cluster Controller:

∙For Storage Controller Registration:

o Define the cluster name in the shell variable CC_NAME in /etc/eucalyptus/eucalyptus-cc.conf

o Define the shell variable SC_IP_ADDR in /etc/eucalyptus/eucalyptus-ipaddr.conf, as a space separated list of one or more IP addresses.

c. Publish

Now start the publication services.

∙Walrus Controller:

sudo start eucalyptus-walrus-publication

∙Cluster Controller:

sudo start eucalyptus-cc-publication

∙Storage Controller:

sudo start eucalyptus-sc-publication

∙Node Controller

相关文档
最新文档