Slides used for Apache Stratos (incubating) Fourth Hangout. Hangout video can be found at http://youtu.be/VtF9DVGKbTQ
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
Boost PC performance: How more available memory can improve productivity
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
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
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