apache stratos incubator - hangout 2
TRANSCRIPT
Apache Stratos Hangout II
Dive into Cloud Controller..
Nirmal FernandoApache Committer and PPMC member of Apache Stratos Incubator.
Senior Software Engineer, WSO2 Inc.
Outline
● What is Cloud Controller (CC)?● How does the architecture look like?● What is a Service Topology?● How does the service topology get built?● What is the Service Interface of Cloud
Controller?● What IaaS providers CC supports by
default?● How easy it is to provide support for a new
IaaS provider?
What is Cloud Controller (CC)?Cloud Controller plays a vital role in Apache Stratos and here is a list of its capabilities and duties.
Cloud Controller,
● is acting as a bridge between application level and Infrastructure as a Service (IaaS) level via jclouds API.
● enables your system to scale across multiple IaaS providers.
● is the central location where the service topology resides.
Cloud Controller,
● is responsible for sharing the up-to-date service topology among other Stratos core services, instantly and periodically.
● supports hot update and deployment of its configuration files.
● has inbuilt support for AWS EC2 IaaS provider, Openstack Nova IaaS provider, vCloud IaaS provider.
● enables you to cloud burst your system into multiple IaaS providers.
● allows you to plug an implementation of any IaaS provider supports by jclouds, very easily.
Cloud Controller,
● enables you to spawn new service instances, while associating a public IP automatically, in order to reduce the instance boot-up time.
● enables you to terminate an already started instance of a particular service cluster.
● can be configured to tackle many scenarios, using its well-thought-out configuration files.
How does the architecture look like?
What is a Service Topology?
Service topology is the information about the different service clusters of your Cloud environment.
Service Topology ...services {
php {domains {
my1.php.domain {hosts my1.php.com;tenant_range *;min_app_instances 1;max_app_instances 1;
} my2.php.domain {
hosts my2.php.com;tenant_range *;min_app_instances 1;max_app_instances 1;
}}
}mysql {
domains {my1.mysql.domain {
hosts my1.mysql.comtenant_range *;min_app_instances 1;max_app_instances 3;max_requests_per_second 10;
}}
}}
How does the service topology get built?
What is the Service Interface of Cloud Controller?
Let’s have a look at this interface.
What IaaS providers CC supports by default?
● Theoretically we support any IaaS provider that is supported by jclouds.
● Currently, we support,○ AWS EC2○ Openstack○ vCloud
IaaSes.
How easy it is to provide support for a new IaaS provider?
You are few steps away, look closely!
1. Your IaaS provider implementation (say org.apache.stratos.cloud.controller.iaas.ABCIaas.java) should extend the Iaas abstract class (org.apache.stratos.cloud.controller.interfaces.Iaas) provided by Cloud Controller.
Let’s have a look at this Iaas class.
How easy it is to provide support for a new IaaS provider?
2. You should wrap the implementation in an OSGi bundle and it should be a fragment bundle of Cloud Controller. You can do this via your bundle's pom file.
Add following line as a configuration instruction of maven bundle plugin: <Fragment-Host>org.apache.stratos.cloud.controller</Fragment-Host>
How easy it is to provide support for a new IaaS provider?
3. Also, it is pretty obvious that you need to add 'cloud-controller' component as a dependency in your bundle’s pom file.
4. Next, you can drop the built bundle into '${ApacheStratos-CC}/repository/components/dropins/' folder.
How easy it is to provide support for a new IaaS provider?
5. Finally, in Cloud Controller's cloud-controller.xml, you need to define the IaasProvider you are going to add and fully qualified name of the implementation class.eg: <iaasProvider type="vcloud" name="vcloud specific details"> <className>org.apache.stratos.cloud.controller.iaas.ABCIaas.java</className> ….........
</iaasProvider>
Now you can start using the newly added IaaS, in your Cartridge!
?
Next week ....
● What are the configuration files used by Cloud Controller and where are they reside?
● Explain each configuration file in detail.
● Does Cloud Controller supports hot update and hot deployment of its configuration files?
For more information …..
http://stratos.incubator.apache.org/
Follow us on Twitter: https://twitter.com/ApacheStratos