Skip to content

Latest commit

 

History

History
87 lines (63 loc) · 3.48 KB

3-adv.md

File metadata and controls

87 lines (63 loc) · 3.48 KB

Advanced CloudStack Development

CloudStack Bootstrapping

Building blocks: spring, managed-context, api, component-api

Manager, ManagerBase Adapter, AdapterBase ComponentLifecycle, ComponentLifecycleBase, ComponentContext

Deployment descriptor: WEB-INF/web.xml

The web.xml has:

  • Servlets (CloudStartupServlet, ApiServlet, ConsoleProxyServlet)
  • Configuration (classpath:log4j-cloud.xml)
  • Listeners (CloudStackContextLoaderListener)
  • Mappings or filters (what url for what servlet)
  • Error pages
  • Security constraints

The CloudStartupServlet's init() runs ComponentContext.initComponentsLifeCycle() that kickstart the management server module/component loading, registration, configuration and start.

(Related: see how usage server starts in UsageServer.java)

The framework/spring/module implements a spring based module framework that discovers and constructs the hierarchy of CloudStack module based on the module.properties file (defined in most CloudStack maven projects). It is initialized via the CloudStackContextLoaderListener.

https://cwiki.apache.org/confluence/display/CLOUDSTACK/Putting+CloudStack+together

Jobs Framework

AsyncJobManager

RPC Framework

Cluster and Agent framework CloudStack clustering, agent LB etc. Agent/Cluster manager

SystemVMs

SystemVM Template and systemvm.iso

Packer, build etc. https://cwiki.apache.org/confluence/display/CLOUDSTACK/SystemVm.iso

CPVM and SSVM

Virtual Routers

How it builds, programs etc. VR python codebase

Self Study

  • API framework:
    • API handling and execution: ApiServlet, ApiServer/ApiServerService, DispatchWorker, DispatchTask, ApiResponseSerializer
    • API jobs execution: ApiDispatcher, ApiAsyncJobDispatcher
    • API security: APIAuthenticationManager, APIAuthenticator, UserAuthenticator, APIChecker
    • Misc: CallContext, LogContext, ManagedContext, ManagedThreadLocal
  • DB framework: GenericDao, GenericDaoBase, TransactionCallback, TransactionLegacy, StateMachine, GenericQueryBuilder, GenericSearchBuilder, Filter, EntityManagerImpl
  • CA framework: CAProvider, RootCAProvider, Link, TLS v1.2, TLS v1.3
  • Orchestration engine:
    • Agent related: AgentAttache, ConnectedAgentAttache, DirectAgentAttache, ClusteredAgentAttache, ClusteredDirectAgentAttache, AgentManagerImpl, ClusteredAgentManagerImpl
    • Cluster related: ClusterBasedAgentLoadBalancerPlanner, ClusteredAgentRebalanceService
    • VM related: ClusteredVirtualMachineManagerImpl, VirtualMachineManagerImpl, VirtualMachinePowerStateSyncImpl, VmWork (cloud-engine-components-api)
  • Misc Plugin Development:

Misc links: