Before go into details on the topic I am gonna discuss, it is worth to
understand how Apache Stratos looks like. Apache Stratos consists of set
of core components and the diagram below depicts them.
Currently Apache Stratos internally uses 3 main communication protocols, namely AMQP, HTTP and Thrift.
AMQP protocol is mainly used to exchange topology information across
core components. 'Topology' explains the run-time state of the PaaS at a
given time such as existing services, service clusters, members etc.
HTTP protocol is used to perform SOAP service calls, among components.
Thrift protocol is used to publish various statistics to the Complex Event Processing Engine.
What does Apache Stratos (Incubator) core components capable of doing? Lakmal has explained this in .
In this first post of series of posts to come, I will roughly go through
the major work-flows you need to do perform, in order to bring up your
own PaaS, using Apache Stratos. Have a look at the below diagram;
As the sequence diagram explains, to build your own PaaS, in minimum, you need to follow the steps up to 'PaaS is ready!' state. Here, I am going to discuss the very first step you need to follow; that is 'Deploy Partitions'.
Let's understand the terminology first. What you deploy via a Partition
is a reference to a place in an IaaS (eg: Amazon EC2/ Openstack etc.),
which is capable of giving birth to a new instance (machine/node). Still
not quite understood? Don't panic, let me explain via a sample
The above JSON defines a partition. Partition has a globally unique
(among partitions) identifier ('id') and an essential element 'provider'
which points to the corresponding IaaS provider type. This sample has
two properties call 'region' and 'zone'. The properties you define here
should be meaningful in the context of relevant provider. For an
example, in Amazon EC2, there are regions and zones, hence you can
define your preferred region and zone, for this partition. So, in a nut
shell, what this partition references to is, ap-southeast-1a zone in ap-southeast-1 region of Amazon EC2
Similarly, if you take Openstack, they have regions and hosts.
Partition consists a minimum required instance count (partitionMin) and
maximum possible instance count (partitionMax) too.
Above sequence diagram explains the steps that get executed when you
deploy a partition. You can either use Stratos Manager REST API or
Apache Stratos CLI tool or Stratos Manager UI when deploying partitions.
Partition deployment is successful only if the partitions are validated
against their IaaS providers at Cloud Controller. Autoscaler is the
place where these Partitions get persisted and it is responsible for
selecting a Partition when it decides to start up a new instance.
Following is a sample CURL command to deploy partitions via REST API;