Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Services like Kubernetes, Cloud Foundry, DBaaS require integration support from underlying cloudstackCloudStack. This support includes Grouping Vms, Scaling, Monitoring. Rather than making changes every time to support various services in ACS, a generic framework has to be developed.

Not only but predominantly As an example container technologies are gaining quite a momentum and changing the way how application are traditionally deployed in the public and private clouds. Gaining interest in micro services based architecture is also fostering adooption adoption of container technologies. Much like how cloud orchestration platforms enable the provisioning of VM's VMs and adjacent services, container orchestration platforms like Kubernetes [3], docker swarm [1], mesos [2] are emerging to enable orchestration of containers. Container orchestration platforms typically can be run any where and be used to provision containers. A popular choice of running containers has been running them on the IAAS IaaS provisioned VM'sVMs. AWS and GCE provide native functionality to launch containers abstracting out the underlying consumption of VM'sVMs. A container orchestration platform can be provisioned on top of CloudStack using development tools, (see [6]), but they are not an out of the box solution. Given the momentum of container technologies, micro-services etc it make sense to provide a native functionality in CloudStack which is available out-of-the-box for users.

Purpose

Another example are DBaaS installations. These have different sets of roles then the above mentioned container services with different number of nodes in each role. Those two have usually only two roles but for instance sdn solutions might have three roles; switch-, controlplane- and configuration-machines.

Apache Cloudstack should not involve itself with how virtual machines are used, though plugins for CloudStack might be written that do configure sets of VMs for certain uses (like kubernetes in [8]). The intention of this functionality is to provide teh organisation of sets of VMs with roles to be used as a single application, be it a container cluster or a database or a SDN facility.

Purpose

Purpose of this document is present the functional requirements for supporting generic vm cluster Purpose of this document is present the functional requirements for supporting generic vm cluster service functionality in CloudStack

...

PaaS - Platform as a service

Functional specification

...

Application Cluster

CloudStack vm VM cluster service shall introduce the notion of application cluster. A 'application cluster' shall be first class CloudStack entity that will be a composite of existing CloudStack entities like virtual machines, network, network rules etc.

The application cluster service shall stitch together cluster resources, and deploys cluster resources. Any enhancements or plugins can call it to do further deploys of the chosen cluster manager like application like a manager and nodes in Kubernetes, Mesos, docker swarm etc, to provide the managers manager's service type, like AWS ECS, Google container service etc to the CloudStack users.

...

Container service shall provide following container cluster life-cycle operations. 

  • create application cluster: provision cluster resources, and brings the cluster in to operational readiness state. Resources provisioned shall depend on provisioning shall be the responsibility of the caller, that can act according to the cluster manager used. All the cluster VM's shall be launched in to a dedicated network for the cluster. API end point of cluster manager shall can be exposed by the caller through creating a port forwarding rule on source nat ip of the network dedicated for the cluster.
  • delete application cluster: destroy all the resources provisioned for the application cluster. Post delete, a application cluster can not be performed any operations on it.
  • start application cluster: Starting a cluster will start the VM's VMs and possibly start the network.
  • stop application cluster: Stopping a cluster will shutdown all the resources consumed by the application cluster. User can start the cluster at a later point with Start operation.
  • recovering a cluster: Due to possible faults (like VM's VMs that got stopped due to failures, or malfunctioning cluster manager etc) application cluster can end up in Alert state. Recover is used to revive application cluster to a sane running state.
  • cluster resizing (scale-in/out): increase or decrease the size of the clusterthe cluster on a per role basis
  • list application cluster: list all the application clusters

provisioning service orchestrator

As The provisioning of the service is out of scope for the application cluster. A calling plugin or external tool add value by calling, as part of its creation , application cluster shall be responsible for plan, any setting up of a control plane of the service type that was chosen. How a service will be setup is dependent on the chosen service type.

Design

API changes

Following API shall be introduced with application cluster:

  • createApplicationCluster
    • name: name of the application cluster
    • description: description of application cluster
    • type: service type - Kubernetes, CloudFoundry, Mesos etc
    • zoneid: uuid of the zone in which application cluster will be provisionedwill be provisioned
    • a list of
      • role: the name for this type of VM
      • serviceofferingid: service offering with which cluster
      VM's
      • VMs of this role shall be provisioned
      • cluster: size of the cluster or number of
      VM's
      • VMs of this role to be provisioned
    • accountname: account for which application cluster shall be created
    • domainid: domain of the account for which application cluster shall be created
    • networkid: uuid of the network in to which application cluster VM's will be provisioned. If not specified cluster service shall provision a new isolated network with default isolated network offering with source nat service.
  • deleteApplicationCluster
    • id: uuid of application cluster
  • startApplicationCluster
    • id: uuid of application cluster
  • stopApplicationCluster
    • id: uuid of application cluster
  • addNodeToCluster (Not planned yet)
    • id: uuid of application cluster
    • role: the name for the type of node to be added
  • removeNodeFromCluster (not planned yet)
    • id: uuid of the node
    • clusterid: uuid of application cluster
  • listApplicationClusters
    • id: uuid of application cluster
  • listClusterNodes
    • id: uuid of application cluster

 

New reponse 'applicationclusterreponse' shall be added with below details:

  • name
  • description
  • zoneid
  • list of
    • role
    • serviceofferingid
    • size
  • networkid
  • clustersize
  • endpoint: URL of the application cluster manger API server endpoint

...

Each of the life cycle operation is a workflow resulting in either provisioning or deleting multiple CloudStack resources. There is no guarantee a workflow of a life cycle operation will succeed due to lack of 2PC like model of resource reservation followed by provisioning semantics. Also there is no guarantee of a rollback getting succeededsucceeding. For e.g. instance, while provisioning a cluster of size 10 VM'sVMs, deployment may run out of capacity to provision any more VM's VMs after provisioning 5 Vm's the first five Vms. In which case as rollback provisioned VM's action, the provisioned VMs can be destroyed. But there can be cases where deleting a provisioned VM is not possible temporarily like disconnected hosts . For instance when a host is disconnected etc. So its not possible to achieve strong consistency and this will not be a focus in this phase of the development.

Below approach is followed while performing life cycle operations..

...

[7] https://github.com/kubernetes/kubernetes/tree/master/cluster/rackspace/cloud-config

[8] https://github.com/shapeblue/ccs