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
 
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
 
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
 
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.pdfRed Hat
 
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
 
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
 
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
 

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

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 

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