【IT168 应用技巧】最近我在公司中尝试安装搭建了基于 Eucalyptus 云计算EC2兼容平台的测试环境。用一台作为控制器,一台作为虚拟机节点,在此感谢综合服务部老马的支持。
Eucalyptus 的组成说明
Euc 的组成可以分为5类组件,它们之间是通过 SOAP with WS-security进行通信。
通过下图我们可以看到基于顶层的是Cloud Controller(clc) 和 Walrus。我们将clc,walrus,sc,cc控制器称为前端节点,虚拟机控制器节点(nc)称为后端节点。
控制器(前端节点):
- the cloud controller (clc)
- the cluster controller (cc)
- walrus (the S3-like storage service)
- the storage controller (sc)
虚拟机节点(后端节点):
- 一个或多个node controller (nc)
组件描述:
- 云控制器(Cloud Controller: CLC) 是Java写的,提供给外界 ec2 兼容的Web SOAP Service 和query接口以及Web界面交互,用来管理所有的集群。执行高层对资源的规划和系统用户的管理。
- Walrus 是兼容Amazon S3的存储,也是java写的,为外界提供Key-Value存储服务。 顶层的cls和walrus可以汇集多个集群的资源。每一个集群需要一个集群控制器(cc)来管理计算节点(资源规划和网络控制),以及一个存储控制器(sc)。
- 存储控制器(Storage Controller)实现EBS(Amazon Elastic Block Store)类型的块存储:所有的image文件存放于此,sc是用java写的。
- 集群控制器Cluster controller (CC) - C 写的,提供对集群内部控制,在 Apache 內作为 Web services 來部署。
- 虚拟机节点控制器Node controller (NC) - C 写的,安在提供虚拟机服务的节点上,在 Apache 內作为 Web services 來部署。
安装
鉴于ubuntu最新的Server版本已经直接集成了Eucalyptus Cloud Server的支持,能够创建在 Amazon 的 EC2 基础设施上运行 Eucalyptus 的公共云和位于防火墙之后的数据中心内部的基础设施之上运行的私有云。这是到目前为止最为简单的安装和尝试使用 Eucalyptus 的方式。只需下载 CD 服务器版并将其安装在任何想要的地方。为了省事,所有机器安装 Ubuntu Server 10.04 LTS。
如前所述,控制器(前端节点 10.34.7.102)上需要安装云控制器(clc),集群控制器(cc),S3存储服务(Walrus),Image存储控制器(sc)。控制器的服务器建议配置如下:
Hardware | Minimum | Suggested | Notes |
CPU | 1GHz | 2 x 2GHz | for an all-in-one front end, it helps to have at least a dual core processor |
Memory | 2GB | 4GB | the Java web front end benefits from lots of available memory |
Disk | 5400rpm IDE | 7200rpm SATA | slower disks will work, but will yield much longer instance startup times |
Disk Space | 40GB | 200GB | 40GB is only enough space for only a single image, cache, etc., Eucalyptus does not like to run out of disk space |
Networking | 100Mbps | 1000Mbps | machine images are hundreds of MB, and need to be copied over the network to nodes |
虚拟机节点控制器的服务器建议配置为:
Hardware | Minimum | Suggested | Notes |
CPU | VT extensions | VT, 64-bit, Multicore | 64-bit can run both i386, and amd64 instances; by default, Eucalyptus will only run 1 VM per CPU core on a Node |
Memory | 1GB | 4GB | additional memory means more, and larger guests |
Disk | 5400rpm IDE | 7200rpm SATA or SCSI | Eucalyptus nodes are disk-intensive; I/O wait will likely be the performance bottleneck |
Disk Space | 40GB | 100GB | images will be cached locally, Eucalyptus does not like to run out of disk space |
Networking | 100Mbps | 1000Mbps | machine images are hundreds of MB, and need to be copied over the network to nodes |
OK,下载ubuntu 10.04 Server ISO并刻盘:
http://www.ubuntu.com/server/get-ubuntu/download