SlideShare a Scribd company logo
1 of 25
Download to read offline
Apache Stratos
(Incubating)
Hangout IV
Stratos Controller and CLI Internals
13 August 2013
M. Isuru Tharanga Chrishantha Perera.
Committer & PPMC Member of Apache Stratos (Incubating),
Senior Software Engineer at WSO2, Inc.
Agenda
โ— What is Stratos Controller?
โ— How does Stratos Controller communicate
with Cloud Controller?
โ— Auto-scaling policies configuration
โ— How does the Artifact Distribution
Coordinator work?
โ— How CLI works?
2
High Level Architecture
3
Stratos Controller
Workflow
4
So, What is Stratos
Controller (SC)?
โ— Basically, itโ€™s Carbon + Set of Features
5
What is SC? (Cont.)
โ— Mainly consists of User Interface
โ—‹ Tenant Management
โ—‹ Cartridge Subscription
โ— Artifact Distribution Coordinator
โ—‹ Responsible for distribution of artifacts
โ— Configuring Auto-Scaling Policies
โ—‹ Configuring policies.xml in
<SC_HOME>/repository/conf
6
SC Components
โ”œโ”€โ”€ components
โ”‚ โ”œโ”€โ”€ org.apache.stratos.adc.mgt
โ”‚ โ”œโ”€โ”€ org.apache.stratos.cartridge.mgt.ui
โ”‚ โ”œโ”€โ”€ ...
โ”‚ โ””โ”€โ”€ org.apache.stratos.tenant.mgt.ui
โ”œโ”€โ”€ features
โ”‚ โ”œโ”€โ”€ adc
โ”‚ โ”œโ”€โ”€ ...
โ”‚ โ””โ”€โ”€ manager
โ”œโ”€โ”€ products
โ”‚ โ””โ”€โ”€ stratos-controller
โ””โ”€โ”€ service-stubs
โ”œโ”€โ”€ org.apache.stratos.adc.mgt.stub
โ””โ”€โ”€ org.apache.stratos.lb.cartridge.autoscaler.service.stub
7
SC Features
โ— Register a Tenant.
โ— View list of available Cartridges.
โ— View list of subscribed Cartridges.
โ— Subscribe to a Cartridge.
โ— Unsubscribe from a Cartridge.
โ— Connect to a data Cartridge while
subscribing to a Cartridge.
โ— View subscribed Cartridge detailed
information.
8
SC Features (Cont.)
โ— Add domain mapping.
โ— Remove domain mapping.
โ— Synchronize repository.
โ— Monitor logs of Cartridge instances.
9
Application Management
Service methods
Artifact Id: org.apache.stratos.adc.mgt
Class: org.apache.stratos.adc.mgt.service.ApplicationManagementService
/**
* Get Available Cartridges
*
* @return Available Cartridges
*/
public Cartridge[] getAvailableCartridges(boolean multiTenant)
throws ADCException;
/**
* Get Subscribed Cartridges
*
* @return Subscribed Cartridges
*/
public Cartridge[] getSubscribedCartridges() throws ADCException;
public Cartridge getCartridgeInfo(String alias)
throws ADCException, NotSubscribedException;
public PolicyDefinition[] getPolicyDefinitions();
public void synchronizeRepository(String cartridgeAlias)
throws ADCException, NotSubscribedException;
10
Application Management
Service methods (Cont.)
/**
* Subscribe to a cartridge
*/
public SubscriptionInfo subscribe(String cartridgeType,
String alias, String policy, String repoURL, boolean privateRepo,
String repoUsername, String repoPassword, String dataCartridgeType,
String dataCartridgeAlias) throws ADCException, PolicyException,
UnregisteredCartridgeException, InvalidCartridgeAliasException,
DuplicateCartridgeAliasException, RepositoryRequiredException,
AlreadySubscribedException, RepositoryCredentialsRequiredException,
InvalidRepositoryException, RepositoryTransportException;
/**
* Unsubscribing the cartridge
*
* @param alias name of the cartridge to be unsubscribed
*/
public void unsubscribe(String alias) throws ADCException,
NotSubscribedException;
public String addDomainMapping(String mappedDomain,
String cartridgeAlias) throws ADCException,
DomainMappingExistsException, NotSubscribedException;
public void removeDomainMapping(String cartridgeAlias)
throws ADCException, NotSubscribedException;
11
SC Cartridge Subscription
12
What happens when you
subscribe?
13
Current Database Schema
14
Auto-scaling policies
โ— Defined in <SC_HOME>/repository/conf/policies.xml
<policies>
<policy name="single" isDefault="true">
<description>Single - Instances: Min 1, Max 1</description>
<min_app_instances>1</min_app_instances>
<max_app_instances>1</max_app_instances>
<max_requests_per_second>5</max_requests_per_second>
<alarming_upper_rate>0.7</alarming_upper_rate>
<alarming_lower_rate>0.2</alarming_lower_rate>
<scale_down_factor>0.25</scale_down_factor>
<rounds_to_average>2</rounds_to_average>
</policy>
<policy name="elastic" isDefault="false">
<description>Elastic - Instances: Min 1, Max 4</description>
<min_app_instances>1</min_app_instances>
<max_app_instances>4</max_app_instances>
<max_requests_per_second>5</max_requests_per_second>
<alarming_upper_rate>0.7</alarming_upper_rate>
<alarming_lower_rate>0.2</alarming_lower_rate>
<scale_down_factor>0.25</scale_down_factor>
<rounds_to_average>2</rounds_to_average>
</policy>
</policies>
15
Artifact Distribution
Coordinator
โ— Responsible for distribution of artifacts
โ— Uses Git as the Code Repository
16
How ADC works
17
How does Git Repo notify
the ADC?
โ— Add a service hook to the Git Repository
โ— For example: GitHub
18
Interactive CLI Tool
โ— Used by tenants to manage subscriptions.
โ— Same functions as the UI, except:
โ—‹ Tenant registering
โ—‹ Monitoring logs of Cartridge instances.
19
CLI Modes
โ— Interactive mode
$export STRATOS_URL= https://demo.stratos.incubator.apache.org:9445
$./stratos.sh -u <username> -p <password>
stratos>
โ— Single command line mode
โ—‹ User can execute commands in one line.
โ—‹ It will not show the stratos> prompt
โ—‹ The user can export the username and password to
the environment and execute commands.
$export STRATOS_USERNAME=<username>
$export STRATOS_PASSWORD=<password>
$ stratos.sh -u [username] -p [password] [action commands]
20
CLI Tool Technology
โ— Supports following features via jline 2
โ—‹ Command history
โ—‹ Auto-completion of commands
โ—‹ Character masking (for passwords)
โ— Apache Commons CLI
โ— Connects to SC
โ— Artifact Id: org.apache.stratos.cli
21
CLI Design
22
CLI Commands
23
Questions?
24
Join us!
Website: http://stratos.incubator.apache.org
Mailing List:
Subscribe: dev-subscribe@stratos.incubator.apache.org
Post (after subscription): dev@stratos.incubator.apache.org
Social Media:
Google+: https://plus.google.com/103515557134069849802
Twitter: https://twitter.com/ApacheStratos
Facebook: https://www.facebook.com/apache.stratos
LinkedIn: http://www.linkedin.com/groups?home=&gid=5131436
25

More Related Content

What's hot

Building your own PaaS using Apache Stratos
Building your own PaaS using Apache Stratos Building your own PaaS using Apache Stratos
Building your own PaaS using Apache Stratos WSO2
ย 
Openstack heat & How Autoscaling works
Openstack heat & How Autoscaling worksOpenstack heat & How Autoscaling works
Openstack heat & How Autoscaling worksCoreStack
ย 
Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos Rahul Kumar
ย 
OpenStack Ceilometer
OpenStack CeilometerOpenStack Ceilometer
OpenStack Ceilometeropenstackindia
ย 
An Introduction to OpenStack Heat
An Introduction to OpenStack HeatAn Introduction to OpenStack Heat
An Introduction to OpenStack HeatMirantis
ย 
Heat - keep the clouds up
Heat - keep the clouds upHeat - keep the clouds up
Heat - keep the clouds upKiran Murari
ย 
Zabbix at scale with Elasticsearch
Zabbix at scale with ElasticsearchZabbix at scale with Elasticsearch
Zabbix at scale with ElasticsearchLeandro Totino Pereira
ย 
Openstack Heat
Openstack HeatOpenstack Heat
Openstack HeatArun prasath
ย 
Real time data pipeline with spark streaming and cassandra with mesos
Real time data pipeline with spark streaming and cassandra with mesosReal time data pipeline with spark streaming and cassandra with mesos
Real time data pipeline with spark streaming and cassandra with mesosRahul Kumar
ย 
Best Practice for Deploying Application with Heat
Best Practice for Deploying Application with HeatBest Practice for Deploying Application with Heat
Best Practice for Deploying Application with HeatEthan Lynn
ย 
How to Autoscale in Apache Cloudstack using LiquiD AutoScaler
How to Autoscale in Apache Cloudstack using LiquiD AutoScalerHow to Autoscale in Apache Cloudstack using LiquiD AutoScaler
How to Autoscale in Apache Cloudstack using LiquiD AutoScalerBob Bennink
ย 
Apache Kafkaยฎ Security Overview
Apache Kafkaยฎ Security OverviewApache Kafkaยฎ Security Overview
Apache Kafkaยฎ Security Overviewconfluent
ย 
KSQL Intro
KSQL IntroKSQL Intro
KSQL Introconfluent
ย 
Learning spark ch10 - Spark Streaming
Learning spark ch10 - Spark StreamingLearning spark ch10 - Spark Streaming
Learning spark ch10 - Spark Streamingphanleson
ย 
From Ceilometer to Telemetry: not so alarming!
From Ceilometer to Telemetry: not so alarming!From Ceilometer to Telemetry: not so alarming!
From Ceilometer to Telemetry: not so alarming!Nicolas (Nick) Barcet
ย 
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...QCloudMentor
ย 
Template Languages for OpenStack - Heat and TOSCA
Template Languages for OpenStack - Heat and TOSCATemplate Languages for OpenStack - Heat and TOSCA
Template Languages for OpenStack - Heat and TOSCACloud Native Day Tel Aviv
ย 
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, ScalaLambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, ScalaHelena Edelson
ย 
Akka at Enterprise Scale: Performance Tuning Distributed Applications
Akka at Enterprise Scale: Performance Tuning Distributed ApplicationsAkka at Enterprise Scale: Performance Tuning Distributed Applications
Akka at Enterprise Scale: Performance Tuning Distributed ApplicationsLightbend
ย 
Container Orchestrator Smackdown @ContinousLifecycle
Container Orchestrator Smackdown @ContinousLifecycleContainer Orchestrator Smackdown @ContinousLifecycle
Container Orchestrator Smackdown @ContinousLifecycleMichael Mueller
ย 

What's hot (20)

Building your own PaaS using Apache Stratos
Building your own PaaS using Apache Stratos Building your own PaaS using Apache Stratos
Building your own PaaS using Apache Stratos
ย 
Openstack heat & How Autoscaling works
Openstack heat & How Autoscaling worksOpenstack heat & How Autoscaling works
Openstack heat & How Autoscaling works
ย 
Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos
ย 
OpenStack Ceilometer
OpenStack CeilometerOpenStack Ceilometer
OpenStack Ceilometer
ย 
An Introduction to OpenStack Heat
An Introduction to OpenStack HeatAn Introduction to OpenStack Heat
An Introduction to OpenStack Heat
ย 
Heat - keep the clouds up
Heat - keep the clouds upHeat - keep the clouds up
Heat - keep the clouds up
ย 
Zabbix at scale with Elasticsearch
Zabbix at scale with ElasticsearchZabbix at scale with Elasticsearch
Zabbix at scale with Elasticsearch
ย 
Openstack Heat
Openstack HeatOpenstack Heat
Openstack Heat
ย 
Real time data pipeline with spark streaming and cassandra with mesos
Real time data pipeline with spark streaming and cassandra with mesosReal time data pipeline with spark streaming and cassandra with mesos
Real time data pipeline with spark streaming and cassandra with mesos
ย 
Best Practice for Deploying Application with Heat
Best Practice for Deploying Application with HeatBest Practice for Deploying Application with Heat
Best Practice for Deploying Application with Heat
ย 
How to Autoscale in Apache Cloudstack using LiquiD AutoScaler
How to Autoscale in Apache Cloudstack using LiquiD AutoScalerHow to Autoscale in Apache Cloudstack using LiquiD AutoScaler
How to Autoscale in Apache Cloudstack using LiquiD AutoScaler
ย 
Apache Kafkaยฎ Security Overview
Apache Kafkaยฎ Security OverviewApache Kafkaยฎ Security Overview
Apache Kafkaยฎ Security Overview
ย 
KSQL Intro
KSQL IntroKSQL Intro
KSQL Intro
ย 
Learning spark ch10 - Spark Streaming
Learning spark ch10 - Spark StreamingLearning spark ch10 - Spark Streaming
Learning spark ch10 - Spark Streaming
ย 
From Ceilometer to Telemetry: not so alarming!
From Ceilometer to Telemetry: not so alarming!From Ceilometer to Telemetry: not so alarming!
From Ceilometer to Telemetry: not so alarming!
ย 
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
AWS Study Group - Chapter 10 - Matching Supply and Demand [Solution Architect...
ย 
Template Languages for OpenStack - Heat and TOSCA
Template Languages for OpenStack - Heat and TOSCATemplate Languages for OpenStack - Heat and TOSCA
Template Languages for OpenStack - Heat and TOSCA
ย 
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, ScalaLambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
ย 
Akka at Enterprise Scale: Performance Tuning Distributed Applications
Akka at Enterprise Scale: Performance Tuning Distributed ApplicationsAkka at Enterprise Scale: Performance Tuning Distributed Applications
Akka at Enterprise Scale: Performance Tuning Distributed Applications
ย 
Container Orchestrator Smackdown @ContinousLifecycle
Container Orchestrator Smackdown @ContinousLifecycleContainer Orchestrator Smackdown @ContinousLifecycle
Container Orchestrator Smackdown @ContinousLifecycle
ย 

Similar to Apache Stratos (incubating) Hangout IV - Stratos Controller and CLI Internals

PG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangas
PG Day'14 Russia, PostgreSQL System Architecture, Heikki LinnakangasPG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangas
PG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangaspgdayrussia
ย 
CloudStack Meetup Santa Clara
CloudStack Meetup Santa Clara CloudStack Meetup Santa Clara
CloudStack Meetup Santa Clara NetApp
ย 
Storage Plug-ins
Storage Plug-ins Storage Plug-ins
Storage Plug-ins buildacloud
ย 
Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0Sandesh Rao
ย 
Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0Gareth Chapman
ย 
Troubleshooting Apache Cloudstack
Troubleshooting Apache CloudstackTroubleshooting Apache Cloudstack
Troubleshooting Apache CloudstackRadhika Puthiyetath
ย 
MySQL 8.0 GIS Overview
MySQL 8.0 GIS OverviewMySQL 8.0 GIS Overview
MySQL 8.0 GIS OverviewNorvald Ryeng
ย 
Artem Storozhuk "Building SQL firewall: insights from developers"
Artem Storozhuk "Building SQL firewall: insights from developers"Artem Storozhuk "Building SQL firewall: insights from developers"
Artem Storozhuk "Building SQL firewall: insights from developers"Fwdays
ย 
Oleksandr Valetskyy - DI vs. IoC
Oleksandr Valetskyy - DI vs. IoCOleksandr Valetskyy - DI vs. IoC
Oleksandr Valetskyy - DI vs. IoCOleksandr Valetskyy
ย 
How to lock a Python in a cage? Managing Python environment inside an R project
How to lock a Python in a cage?  Managing Python environment inside an R projectHow to lock a Python in a cage?  Managing Python environment inside an R project
How to lock a Python in a cage? Managing Python environment inside an R projectWLOG Solutions
ย 
Get SaaSy with Red Hat OpenShift on AWS (CON305-S) - AWS re:Invent 2018
Get SaaSy with Red Hat OpenShift on AWS (CON305-S) - AWS re:Invent 2018Get SaaSy with Red Hat OpenShift on AWS (CON305-S) - AWS re:Invent 2018
Get SaaSy with Red Hat OpenShift on AWS (CON305-S) - AWS re:Invent 2018Amazon Web Services
ย 
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfLuca Mattia Ferrari
ย 
Solid fire cloudstack storage overview - CloudStack European User Group
Solid fire cloudstack storage overview - CloudStack European User GroupSolid fire cloudstack storage overview - CloudStack European User Group
Solid fire cloudstack storage overview - CloudStack European User GroupShapeBlue
ย 
CloudStack Meetup London - Primary Storage Presentation by SolidFire
CloudStack Meetup London - Primary Storage Presentation by SolidFire CloudStack Meetup London - Primary Storage Presentation by SolidFire
CloudStack Meetup London - Primary Storage Presentation by SolidFire NetApp
ย 
Struts2 - 101
Struts2 - 101Struts2 - 101
Struts2 - 101Munish Gupta
ย 
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeBoost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeMarco Gralike
ย 
NET Systems Programming Learned the Hard Way.pptx
NET Systems Programming Learned the Hard Way.pptxNET Systems Programming Learned the Hard Way.pptx
NET Systems Programming Learned the Hard Way.pptxpetabridge
ย 
Oracle RAC features on Exadata
Oracle RAC features on ExadataOracle RAC features on Exadata
Oracle RAC features on ExadataAnil Nair
ย 

Similar to Apache Stratos (incubating) Hangout IV - Stratos Controller and CLI Internals (20)

PG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangas
PG Day'14 Russia, PostgreSQL System Architecture, Heikki LinnakangasPG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangas
PG Day'14 Russia, PostgreSQL System Architecture, Heikki Linnakangas
ย 
CloudStack Meetup Santa Clara
CloudStack Meetup Santa Clara CloudStack Meetup Santa Clara
CloudStack Meetup Santa Clara
ย 
Scope Stack Allocation
Scope Stack AllocationScope Stack Allocation
Scope Stack Allocation
ย 
Storage Plug-ins
Storage Plug-ins Storage Plug-ins
Storage Plug-ins
ย 
Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0
ย 
Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0
ย 
Troubleshooting Apache Cloudstack
Troubleshooting Apache CloudstackTroubleshooting Apache Cloudstack
Troubleshooting Apache Cloudstack
ย 
MySQL 8.0 GIS Overview
MySQL 8.0 GIS OverviewMySQL 8.0 GIS Overview
MySQL 8.0 GIS Overview
ย 
Artem Storozhuk "Building SQL firewall: insights from developers"
Artem Storozhuk "Building SQL firewall: insights from developers"Artem Storozhuk "Building SQL firewall: insights from developers"
Artem Storozhuk "Building SQL firewall: insights from developers"
ย 
Oleksandr Valetskyy - DI vs. IoC
Oleksandr Valetskyy - DI vs. IoCOleksandr Valetskyy - DI vs. IoC
Oleksandr Valetskyy - DI vs. IoC
ย 
How to lock a Python in a cage? Managing Python environment inside an R project
How to lock a Python in a cage?  Managing Python environment inside an R projectHow to lock a Python in a cage?  Managing Python environment inside an R project
How to lock a Python in a cage? Managing Python environment inside an R project
ย 
Get SaaSy with Red Hat OpenShift on AWS (CON305-S) - AWS re:Invent 2018
Get SaaSy with Red Hat OpenShift on AWS (CON305-S) - AWS re:Invent 2018Get SaaSy with Red Hat OpenShift on AWS (CON305-S) - AWS re:Invent 2018
Get SaaSy with Red Hat OpenShift on AWS (CON305-S) - AWS re:Invent 2018
ย 
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdf
ย 
Solid fire cloudstack storage overview - CloudStack European User Group
Solid fire cloudstack storage overview - CloudStack European User GroupSolid fire cloudstack storage overview - CloudStack European User Group
Solid fire cloudstack storage overview - CloudStack European User Group
ย 
CloudStack Meetup London - Primary Storage Presentation by SolidFire
CloudStack Meetup London - Primary Storage Presentation by SolidFire CloudStack Meetup London - Primary Storage Presentation by SolidFire
CloudStack Meetup London - Primary Storage Presentation by SolidFire
ย 
Struts2 - 101
Struts2 - 101Struts2 - 101
Struts2 - 101
ย 
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeBoost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
ย 
NET Systems Programming Learned the Hard Way.pptx
NET Systems Programming Learned the Hard Way.pptxNET Systems Programming Learned the Hard Way.pptx
NET Systems Programming Learned the Hard Way.pptx
ย 
Struts2
Struts2Struts2
Struts2
ย 
Oracle RAC features on Exadata
Oracle RAC features on ExadataOracle RAC features on Exadata
Oracle RAC features on Exadata
ย 

More from Isuru Perera

Java Threads: Lightweight Processes
Java Threads: Lightweight ProcessesJava Threads: Lightweight Processes
Java Threads: Lightweight ProcessesIsuru Perera
ย 
Software Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and FlamegraphsSoftware Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and FlamegraphsIsuru Perera
ย 
Java in flames
Java in flamesJava in flames
Java in flamesIsuru Perera
ย 
Software Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaSoftware Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaIsuru Perera
ย 
Using Flame Graphs
Using Flame GraphsUsing Flame Graphs
Using Flame GraphsIsuru Perera
ย 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderIsuru Perera
ย 
Java Performance & Profiling
Java Performance & ProfilingJava Performance & Profiling
Java Performance & ProfilingIsuru Perera
ย 
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...Isuru Perera
ย 
Java Colombo Meetup: Java Mission Control & Java Flight Recorder
Java Colombo Meetup: Java Mission Control & Java Flight RecorderJava Colombo Meetup: Java Mission Control & Java Flight Recorder
Java Colombo Meetup: Java Mission Control & Java Flight RecorderIsuru Perera
ย 
Using Java Mission Control & Java Flight Recorder
Using Java Mission Control & Java Flight RecorderUsing Java Mission Control & Java Flight Recorder
Using Java Mission Control & Java Flight RecorderIsuru Perera
ย 
Building your own PaaS using Apache Stratos - Webinar 2014-04-10
Building your own PaaS using Apache Stratos - Webinar 2014-04-10Building your own PaaS using Apache Stratos - Webinar 2014-04-10
Building your own PaaS using Apache Stratos - Webinar 2014-04-10Isuru Perera
ย 
Cloud foundry
Cloud foundryCloud foundry
Cloud foundryIsuru Perera
ย 

More from Isuru Perera (12)

Java Threads: Lightweight Processes
Java Threads: Lightweight ProcessesJava Threads: Lightweight Processes
Java Threads: Lightweight Processes
ย 
Software Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and FlamegraphsSoftware Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and Flamegraphs
ย 
Java in flames
Java in flamesJava in flames
Java in flames
ย 
Software Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaSoftware Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in Java
ย 
Using Flame Graphs
Using Flame GraphsUsing Flame Graphs
Using Flame Graphs
ย 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight Recorder
ย 
Java Performance & Profiling
Java Performance & ProfilingJava Performance & Profiling
Java Performance & Profiling
ย 
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
ย 
Java Colombo Meetup: Java Mission Control & Java Flight Recorder
Java Colombo Meetup: Java Mission Control & Java Flight RecorderJava Colombo Meetup: Java Mission Control & Java Flight Recorder
Java Colombo Meetup: Java Mission Control & Java Flight Recorder
ย 
Using Java Mission Control & Java Flight Recorder
Using Java Mission Control & Java Flight RecorderUsing Java Mission Control & Java Flight Recorder
Using Java Mission Control & Java Flight Recorder
ย 
Building your own PaaS using Apache Stratos - Webinar 2014-04-10
Building your own PaaS using Apache Stratos - Webinar 2014-04-10Building your own PaaS using Apache Stratos - Webinar 2014-04-10
Building your own PaaS using Apache Stratos - Webinar 2014-04-10
ย 
Cloud foundry
Cloud foundryCloud foundry
Cloud foundry
ย 

Recently uploaded

#StandardsGoals for 2024: Whatโ€™s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: Whatโ€™s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: Whatโ€™s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: Whatโ€™s new for BISAC - Tech Forum 2024BookNet Canada
ย 
๐Ÿฌ The future of MySQL is Postgres ๐Ÿ˜
๐Ÿฌ  The future of MySQL is Postgres   ๐Ÿ˜๐Ÿฌ  The future of MySQL is Postgres   ๐Ÿ˜
๐Ÿฌ The future of MySQL is Postgres ๐Ÿ˜RTylerCroy
ย 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
ย 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
ย 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
ย 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
ย 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
ย 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
ย 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
ย 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
ย 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
ย 
FULL ENJOY ๐Ÿ” 8264348440 ๐Ÿ” Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY ๐Ÿ” 8264348440 ๐Ÿ” Call Girls in Diplomatic Enclave | DelhiFULL ENJOY ๐Ÿ” 8264348440 ๐Ÿ” Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY ๐Ÿ” 8264348440 ๐Ÿ” Call Girls in Diplomatic Enclave | Delhisoniya singh
ย 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
ย 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
ย 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
ย 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
ย 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
ย 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
ย 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
ย 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
ย 

Recently uploaded (20)

#StandardsGoals for 2024: Whatโ€™s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: Whatโ€™s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: Whatโ€™s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: Whatโ€™s new for BISAC - Tech Forum 2024
ย 
๐Ÿฌ The future of MySQL is Postgres ๐Ÿ˜
๐Ÿฌ  The future of MySQL is Postgres   ๐Ÿ˜๐Ÿฌ  The future of MySQL is Postgres   ๐Ÿ˜
๐Ÿฌ The future of MySQL is Postgres ๐Ÿ˜
ย 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
ย 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
ย 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
ย 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
ย 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
ย 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
ย 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
ย 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
ย 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
ย 
FULL ENJOY ๐Ÿ” 8264348440 ๐Ÿ” Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY ๐Ÿ” 8264348440 ๐Ÿ” Call Girls in Diplomatic Enclave | DelhiFULL ENJOY ๐Ÿ” 8264348440 ๐Ÿ” Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY ๐Ÿ” 8264348440 ๐Ÿ” Call Girls in Diplomatic Enclave | Delhi
ย 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
ย 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
ย 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
ย 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
ย 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
ย 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
ย 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
ย 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ย 

Apache Stratos (incubating) Hangout IV - Stratos Controller and CLI Internals

  • 1. Apache Stratos (Incubating) Hangout IV Stratos Controller and CLI Internals 13 August 2013 M. Isuru Tharanga Chrishantha Perera. Committer & PPMC Member of Apache Stratos (Incubating), Senior Software Engineer at WSO2, Inc.
  • 2. Agenda โ— What is Stratos Controller? โ— How does Stratos Controller communicate with Cloud Controller? โ— Auto-scaling policies configuration โ— How does the Artifact Distribution Coordinator work? โ— How CLI works? 2
  • 5. So, What is Stratos Controller (SC)? โ— Basically, itโ€™s Carbon + Set of Features 5
  • 6. What is SC? (Cont.) โ— Mainly consists of User Interface โ—‹ Tenant Management โ—‹ Cartridge Subscription โ— Artifact Distribution Coordinator โ—‹ Responsible for distribution of artifacts โ— Configuring Auto-Scaling Policies โ—‹ Configuring policies.xml in <SC_HOME>/repository/conf 6
  • 7. SC Components โ”œโ”€โ”€ components โ”‚ โ”œโ”€โ”€ org.apache.stratos.adc.mgt โ”‚ โ”œโ”€โ”€ org.apache.stratos.cartridge.mgt.ui โ”‚ โ”œโ”€โ”€ ... โ”‚ โ””โ”€โ”€ org.apache.stratos.tenant.mgt.ui โ”œโ”€โ”€ features โ”‚ โ”œโ”€โ”€ adc โ”‚ โ”œโ”€โ”€ ... โ”‚ โ””โ”€โ”€ manager โ”œโ”€โ”€ products โ”‚ โ””โ”€โ”€ stratos-controller โ””โ”€โ”€ service-stubs โ”œโ”€โ”€ org.apache.stratos.adc.mgt.stub โ””โ”€โ”€ org.apache.stratos.lb.cartridge.autoscaler.service.stub 7
  • 8. SC Features โ— Register a Tenant. โ— View list of available Cartridges. โ— View list of subscribed Cartridges. โ— Subscribe to a Cartridge. โ— Unsubscribe from a Cartridge. โ— Connect to a data Cartridge while subscribing to a Cartridge. โ— View subscribed Cartridge detailed information. 8
  • 9. SC Features (Cont.) โ— Add domain mapping. โ— Remove domain mapping. โ— Synchronize repository. โ— Monitor logs of Cartridge instances. 9
  • 10. Application Management Service methods Artifact Id: org.apache.stratos.adc.mgt Class: org.apache.stratos.adc.mgt.service.ApplicationManagementService /** * Get Available Cartridges * * @return Available Cartridges */ public Cartridge[] getAvailableCartridges(boolean multiTenant) throws ADCException; /** * Get Subscribed Cartridges * * @return Subscribed Cartridges */ public Cartridge[] getSubscribedCartridges() throws ADCException; public Cartridge getCartridgeInfo(String alias) throws ADCException, NotSubscribedException; public PolicyDefinition[] getPolicyDefinitions(); public void synchronizeRepository(String cartridgeAlias) throws ADCException, NotSubscribedException; 10
  • 11. Application Management Service methods (Cont.) /** * Subscribe to a cartridge */ public SubscriptionInfo subscribe(String cartridgeType, String alias, String policy, String repoURL, boolean privateRepo, String repoUsername, String repoPassword, String dataCartridgeType, String dataCartridgeAlias) throws ADCException, PolicyException, UnregisteredCartridgeException, InvalidCartridgeAliasException, DuplicateCartridgeAliasException, RepositoryRequiredException, AlreadySubscribedException, RepositoryCredentialsRequiredException, InvalidRepositoryException, RepositoryTransportException; /** * Unsubscribing the cartridge * * @param alias name of the cartridge to be unsubscribed */ public void unsubscribe(String alias) throws ADCException, NotSubscribedException; public String addDomainMapping(String mappedDomain, String cartridgeAlias) throws ADCException, DomainMappingExistsException, NotSubscribedException; public void removeDomainMapping(String cartridgeAlias) throws ADCException, NotSubscribedException; 11
  • 13. What happens when you subscribe? 13
  • 15. Auto-scaling policies โ— Defined in <SC_HOME>/repository/conf/policies.xml <policies> <policy name="single" isDefault="true"> <description>Single - Instances: Min 1, Max 1</description> <min_app_instances>1</min_app_instances> <max_app_instances>1</max_app_instances> <max_requests_per_second>5</max_requests_per_second> <alarming_upper_rate>0.7</alarming_upper_rate> <alarming_lower_rate>0.2</alarming_lower_rate> <scale_down_factor>0.25</scale_down_factor> <rounds_to_average>2</rounds_to_average> </policy> <policy name="elastic" isDefault="false"> <description>Elastic - Instances: Min 1, Max 4</description> <min_app_instances>1</min_app_instances> <max_app_instances>4</max_app_instances> <max_requests_per_second>5</max_requests_per_second> <alarming_upper_rate>0.7</alarming_upper_rate> <alarming_lower_rate>0.2</alarming_lower_rate> <scale_down_factor>0.25</scale_down_factor> <rounds_to_average>2</rounds_to_average> </policy> </policies> 15
  • 16. Artifact Distribution Coordinator โ— Responsible for distribution of artifacts โ— Uses Git as the Code Repository 16
  • 18. How does Git Repo notify the ADC? โ— Add a service hook to the Git Repository โ— For example: GitHub 18
  • 19. Interactive CLI Tool โ— Used by tenants to manage subscriptions. โ— Same functions as the UI, except: โ—‹ Tenant registering โ—‹ Monitoring logs of Cartridge instances. 19
  • 20. CLI Modes โ— Interactive mode $export STRATOS_URL= https://demo.stratos.incubator.apache.org:9445 $./stratos.sh -u <username> -p <password> stratos> โ— Single command line mode โ—‹ User can execute commands in one line. โ—‹ It will not show the stratos> prompt โ—‹ The user can export the username and password to the environment and execute commands. $export STRATOS_USERNAME=<username> $export STRATOS_PASSWORD=<password> $ stratos.sh -u [username] -p [password] [action commands] 20
  • 21. CLI Tool Technology โ— Supports following features via jline 2 โ—‹ Command history โ—‹ Auto-completion of commands โ—‹ Character masking (for passwords) โ— Apache Commons CLI โ— Connects to SC โ— Artifact Id: org.apache.stratos.cli 21
  • 25. Join us! Website: http://stratos.incubator.apache.org Mailing List: Subscribe: dev-subscribe@stratos.incubator.apache.org Post (after subscription): dev@stratos.incubator.apache.org Social Media: Google+: https://plus.google.com/103515557134069849802 Twitter: https://twitter.com/ApacheStratos Facebook: https://www.facebook.com/apache.stratos LinkedIn: http://www.linkedin.com/groups?home=&gid=5131436 25