A Eucalyptus cloud setup consists of three types of components – the cloud
controller, the cluster controller(s), and the node controller(s). The cloud
controller is a Java program that, in addition to high-level resource
scheduling and system accounting, offers a Web services interface and a Web
interface to the outside world. Cluster controller and node controller are
written in C and deployed as Web services inside Apache.
Eucalyptus使用了 Axis2 ,啥是Axis2或者说Axis2有啥用。Axis就是快速发布web
service的工具,提供了SOAP协议的封装,方便于client端于webservice通信。
log机制使用了log4j。
使用X509认证。
class AbstractIsomorph ,注释为MappedSuperclass,个人认为是一个保存用户信息和状态的抽象类。
class AbstractKeyStore ,这个抽象类很有意思,其静态方法调用了子类的构造函数。并且子类GenericKeyStore是其内部类。感觉设计得不好。其意图是让这个类含有几个抽象的方法,但是这几个抽象方法有一个默认的实现。AbstractKeyStore主要是为了添加证书查找证书,并查找用户名对应的password来认证。并且将alias,cert添加到某一文件中。并将此alias对应的password放入到keystore中。
class AbstractNamedRegistry ,这个抽象类将存放、更新某种继承自HasName接口的对象的两种状态。一种是active,一种是disable,这两种状态放在ConcurrentNavigableMap中,并且以对象的名作为key,value就是对象自身。
class AbstractOperation ,这个抽象类是操作的抽象,并认为凡是操作就应该有request和reply,并且request和reply继承自EucalyptusMessage
class AccessDeniedException ,就是一个禁止访问的异常,继承自EucalyptusCloudException。
class Address ,这是一个address类(废话),存放地址id, 地址名(?? 个人认为可能是真实地址) ,cluster的地址,使用者的用户名,实例地址等(其实就是一个描述实例所需要的属性。)并使用高性能锁ReentrantReadWriteLock加以控制。 加锁是为了将实例assign出去,或者收回。不过我个人觉得ReentrantReadWriteLock可能使用的有问题。以为我看到函数release()中有this.canHas.writeLock().lock();,并在之后调用了unassign()方法,而unassign()方法中也有this.canHas.writeLock().lock();…难道可以对同一写锁加两次lock?不过我没有研究过ReentrantReadWriteLock。
class Addresses, 这个类继承了 AbstractNamedRegistry, 并且可以填入 Address .这就是说,这个类是用来active,disable一个address的。另外它是用来单实例模式,也就是整个cloud中只有这一份实例。( 这里会不会崩溃后无法恢复的问题? )
class AddressManager ,继承了org.mule.api.lifecycle.Startable类, Startable可能是处理生命周期吧 ..不过这个类是和地址相关的,是用来分配,释放,将address和vm关联起来的类。
class AddressUpdateCallback 继承了QueuedEventCallback并且实现了Runnable,也就是说它可以作为一个线程类。另外它sleep的时间好像有点过长了51000.这个类的作用好像是将用户名封装到msg中,然后发送给cluster队列来处理。之后睡一个51000秒,然后再醒来看看是否有cluster的回复,然后根据回复设置实例的地址。这里采用线程,是因为需要一直监督address的更新。可以看成是守护线程。
add_key.pl,这个是perl文件,看不太明白,应该是加入了ssh的public key.不过中间为啥使用loop
device,并且将图片加载到loop device上就不得而知了。后来发现,这里image的含义不是图片的意思,而是镜像,也就是将镜像加载到loop
device上。
add_key~add_wsdllocation.pl都是perl写成的。
class Admin 是用来创建EucalyptusMessage的类。
admin.xml 用来配置www的conf的。
interface Allocator ,这接口用来分配的,根据String requestId, String userName, String vmtype, int min, int max, SortedSet
class AlreadyExistsException 继承了RuntimeException
class AOEManager 继承了StorageExportManager,是用来导出存储容量的?
interface AppMessages 继承了Messages,从其函数中看,是一个与页面控件事件相关的类。
class AssignAddressCallback ,分配地址的cluster,发送回消息后就会将network configure更新。
class AttachedVolumeInfo 这是一个将附加逻辑磁盘id,逻辑磁盘名,实例id,设备名,状态和添加时间合成的类。如果其为一行,那么一张表就是AttachedVolumes
interface Authenticator 是将X509证书和EucalyptusMessage中信息来生成是否授权的Msg的接口。
aws-base.xml~aws-zones.xml 是将java类映射为XML,是否为Hibernate就不得而知了。
Axis2.xml~class AxisHttpResponseImpl 可以认为是和Axis2打交道的东西。可以以后再研究下。