apache stratos incubator - hangout 2

18
Apache Stratos Hangout II Dive into Cloud Controller.. Nirmal Fernando Apache Committer and PPMC member of Apache Stratos Incubator. Senior Software Engineer, WSO2 Inc.

Upload: nirmal-fernando

Post on 08-Jul-2015

3.564 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Apache Stratos Incubator - hangout   2

Apache Stratos Hangout II

Dive into Cloud Controller..

Nirmal FernandoApache Committer and PPMC member of Apache Stratos Incubator.

Senior Software Engineer, WSO2 Inc.

Page 2: Apache Stratos Incubator - hangout   2

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?

Page 3: Apache Stratos Incubator - hangout   2

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.

Page 4: Apache Stratos Incubator - hangout   2

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.

Page 5: Apache Stratos Incubator - hangout   2

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.

Page 6: Apache Stratos Incubator - hangout   2

How does the architecture look like?

Page 7: Apache Stratos Incubator - hangout   2

What is a Service Topology?

Service topology is the information about the different service clusters of your Cloud environment.

Page 8: Apache Stratos Incubator - hangout   2

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;

}}

}}

Page 9: Apache Stratos Incubator - hangout   2

How does the service topology get built?

Page 10: Apache Stratos Incubator - hangout   2

What is the Service Interface of Cloud Controller?

Let’s have a look at this interface.

Page 11: Apache Stratos Incubator - hangout   2

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.

Page 12: Apache Stratos Incubator - hangout   2

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.

Page 13: Apache Stratos Incubator - hangout   2

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>

Page 14: Apache Stratos Incubator - hangout   2

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.

Page 15: Apache Stratos Incubator - hangout   2

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!

Page 16: Apache Stratos Incubator - hangout   2

?

Page 17: Apache Stratos Incubator - hangout   2

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?

Page 18: Apache Stratos Incubator - hangout   2

For more information …..

http://stratos.incubator.apache.org/

Follow us on Twitter: https://twitter.com/ApacheStratos