cloudstack二次开发内部培训
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1 Cloudstack介绍及基础
1.1什么是cloudstack
官方:CloudStack is an open source cloud compute platform used to deliver Infrastructure-as-a-Service
CloudStack is open source software written in java that is designed to deploy and manage large networks of virtual machines, as a highly available, scalable cloud computing platform. CloudStack current supports the most popular hypervisors VMware, Oracle VM, KVM, XenServer and Xen Cloud Platform
1.2 Cloudstack组成部分
1.3什么是Primary Storage
Primary storage is associated with a cluster, and it stores the disk volumes for all the VMs running on hosts in that cluster.
1.4什么是Second Storage
Secondary storage is associated with a zone, and it stores the following:
➢ Templates – OS images that can be used to boot VMs and can include additional configuration information, such as installed applications
➢ ISO images – disc images containing data or bootable media for operating systems
➢ Disk volume snapshots – saved copies of VM data which can be used for data recovery or to create new templates
2架构
2.1组件级架构
2.2 部署架构
3工程结构
3.1工程依赖关系
说明:util是各个工程的基础工具包,给它们提高诸如网络连接、数据库访问、日志等服务;
Api 提供了接口服务;
Agent 主要与物理主机交互并完成与server的通信;
Server 管理端,将管理的资源持久化,提供UI管理;
Core 核心业务实现;
Cloud-ovm、cloud-vmware-base 分别为oracle vm及 vmware实现,agent-simulator为
测试的模拟器;
3.2 工程作用
No Project Package
Name
Purpose Notes priority
1utils cloud-util.jar utilities methods
that can be used in
any project
B
2api cloud-api.jar REST API, Agent
API, and Java API
definitions
A
3core cloud-core.jar ServerResource
implementations.Remember that each ServerResource should
be deployable in both a management server
and in a remote agent container.
A
Core is also being converted to be one project per ServerResource, as how ovm is done today.
4server cloud-
server.jar Management
Server
Server端主要工程A
5agent cloud-
agent.jar
Agent Container A
6ovm cloud-ovm.jar ServerResource for
Oracle VM The future of ServerResource packaging.
_
7agent-
simulator Simulated
ServerResource for
scale and
regression test.
Will be very useful if
your work does not
involve
_
8vmware-base ServerResource for
VmWare
_
9 UI Management 界面
工程
包含了 js css images
jsp等
B
10 Console-
proxy
界面控制台代理工
程
B
11Usage使用记录工程B
12Build构建工程主要是ant脚本
13Deps依赖包工程主要是系统运行依赖的
第三方包
_ 14Daemaonize Agent的守护进程C语言构成_
15Scripts脚本工程安装系统时或者系统运
行时的shell及python
脚本
_
16Setup安装时资源工程包含了 css xls images
shell脚本 db脚本
_
17Client部署
managenment
server 的web工程包含了部署server的一
些资源文件 web.xml等
_
18Test测试工程_ 19Debian系统虚拟机脚本_ 20Tools工具类包含 ant工具 gcc waf_