MonkeyMan – a Perl5 framework for Apache CloudStack automation
What do we like in Apache CloudStack?
Manageability
• unified management portal;
• browser-compatible VNC-interface;
• powerful API.
Omnivorousness
• hypervisors: KVM, LXC, XEN, VMWare, Hyper-V;
• storages: any filesystems, including clustered filesystems that could be accessed by a shared-
mountpoint GlusterFS, Ceph, NFS, SMB, GFS2, OCFS2.
Security
• encrypted networking (IPSec, HTTPS);
• firewalls and load-balancers (internal VR, NetScaler, F5, FortiGate, pfSense and other beasts);
• open source ideology.
https://cloudstack.apache.org/
What else do we like in Apache CloudStack?
Reliablity
• clusterisation, live migration;
• high-availability, affinity groups;
• volume and VM snapshots.
Rapid deployment
• ISO-images and templates;
• OS preferences for the host;
• host and storage tags, which can be used in the service and storage offerings.
Flexible access policies
• domains, accounts, users;
• resouce limits;
• LDAP support.
https://cloudstack.apache.org/
MonkeyMan: the cloud manager
MonkeyMan - the automation framework
Implemented in Perl5 with Moose
All ACS objects are Perl objects
Flexible API vocabularies
XML and XPath
Pluggable and replaceable modules
http://monkeyman.tucha.ua/
MonkeyMan: Perl5 & Moose
# Use Moose and be happy :)
use Moose::Role;
has 'monkeyman' => (
is => 'ro',
isa => 'MonkeyMan',
reader => 'get_monkeyman',
writer => '_set_monkeyman',
predicate => '_has_monkeyman',
required => 1
);
Why use Moose?
Attributes
Accessors
Validation
Roles
Subclasses
Syntax extentions
Art by www.animalcrewshop.com
http://monkeyman.tucha.ua/
MonkeyMan: some of utilities
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan: a sample ACS query
my $api = $monkeyman->get_cloudstack('PRIMARY')->get_api;
my $virtualmachine = $api->perform_action(
type => 'VirtualMachine',
action => 'create',
requested => { 'element' => 'element' },
parameters => {
zoneid => 'f09fe8dd-3567-4ff6-ac3a-2f85dec2636d',
templateid => '8b53dc6a-084d-4b5a-8ac5-3f88301c6703',
serviceofferingid => '97d74503-d609-4edb-8633-748d400aad5e',
# ...skipped...
}
);
http://monkeyman.tucha.ua/
MonkeyMan: API vocabularies (composing a request)
package MonkeyMan::CloudStack::API::Element::VirtualMachine;
with 'MonkeyMan::CloudStack::API::Roles::Element';
# ...skipped...
our %vocabulary_tree = (
type => 'VirtualMachine', name => 'virtual machine', entity_node => 'virtualmachine',
actions => {
create => {
request => {
command => 'deployVirtualMachine',
async => 1, paged => 0,
parameters => {
zoneid => {
required => 1,
command_parameters => { 'zoneid' => '<%VALUE%>' },
},
templateid => {
required => 1,
command_parameters => { 'templateid' => '<%VALUE%>' },
},
serviceofferingid => {
required => 1,
command_parameters => { 'serviceofferingid' => '<%VALUE%>' },
}, # ...skipped...
}, # ...skipped...
}, # ...skipped...
}, # ...skipped...
},
);
http://monkeyman.tucha.ua/
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan: ACS vocabularies (parsing a response)
package MonkeyMan::CloudStack::API::Element::VirtualMachine;
with 'MonkeyMan::CloudStack::API::Roles::Element';
# ...skipped...
our %vocabulary_tree = (
type => 'VirtualMachine', name => 'virtual machine', entity_node => 'virtualmachine',
actions => {
create => {
response => {
response_node => 'queryasyncjobresultresponse',
results => {
element => {
return_as => [ qw( dom element id ) ],
queries => [ '/<%OUR_RESPONSE_NODE%>/jobresult/<%OUR_ENTITY_NODE%>' ],
required => 0,
multiple => 1
},
id => {
return_as => [ qw( value ) ],
queries => [ '/<%OUR_RESPONSE_NODE%>/jobresult/<%OUR_ENTITY_NODE%>/id' ],
required => 0,
multiple => 1
}, # ...skipped...
}, # ...skipped...
}, # ...skipped...
}, # ...skipped...
},
);
http://monkeyman.tucha.ua/
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan: logging and debugging
http://monkeyman.tucha.ua/
$logger->debugf(’The %s %s is %s‘,
$vm_object,
$vm_object->get_type(noun => 1),
$vm_object->qxp(’/status’)
);
MonkeyMan – a Perl5 framework for Apache CloudStack automation
MonkeyMan – a Perl5 framework for Apache CloudStack automation
Thanks for your interest!
http://monkeyman.tucha.ua/

More Related Content

PPTX
Building of a redundant management cluster for your Cloud
PDF
Introducing Vault
PDF
Deploying VMware vCloud Hybrid Service with Puppet - PuppetConf 2013
PDF
Cloud: Container Service In Action, por Heitor Vidal
ODP
Puppet and Apache CloudStack
PPTX
Ansible MySQL MHA
PDF
Scaling WordPress On A Small Budget
ODP
ansible why ?
Building of a redundant management cluster for your Cloud
Introducing Vault
Deploying VMware vCloud Hybrid Service with Puppet - PuppetConf 2013
Cloud: Container Service In Action, por Heitor Vidal
Puppet and Apache CloudStack
Ansible MySQL MHA
Scaling WordPress On A Small Budget
ansible why ?

What's hot (20)

PDF
MySQL High Availability Deep Dive
PPTX
Designing High Availability for HashiCorp Vault in AWS
PPTX
Openstack glance
PDF
Sails.js Model / ORM introduce
PDF
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
DOCX
Terraform bootstrap code_execute
PDF
Shield talk elasticsearch meetup Zurich 27.05.2015
PDF
Cassandra and security
PDF
A Introduction of Packer
PDF
Slides Cassandra
PPT
Node.js
PPTX
PPTX
N:1 Replication meets MHA
PDF
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
PDF
MySQL NDB 8.0 clusters in your laptop with dbdeployer
ODP
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
PPTX
OpenStack Glance
PDF
Secret Management with Hashicorp’s Vault
PPTX
MongoDB on Azure - Tips, Tricks and Examples
PDF
Test complex database systems in your laptop with dbdeployer
MySQL High Availability Deep Dive
Designing High Availability for HashiCorp Vault in AWS
Openstack glance
Sails.js Model / ORM introduce
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
Terraform bootstrap code_execute
Shield talk elasticsearch meetup Zurich 27.05.2015
Cassandra and security
A Introduction of Packer
Slides Cassandra
Node.js
N:1 Replication meets MHA
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
MySQL NDB 8.0 clusters in your laptop with dbdeployer
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
OpenStack Glance
Secret Management with Hashicorp’s Vault
MongoDB on Azure - Tips, Tricks and Examples
Test complex database systems in your laptop with dbdeployer
Ad

Similar to MonkeyMan – a Perl5 framework for Apache CloudStack automation (20)

PPTX
Monkey man
KEY
Using Apache as an Application Server
PDF
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
PDF
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
PDF
Securing Microservices using Play and Akka HTTP
PDF
AWS Lambda with Serverless Framework and Java
PDF
Secure Kafka at scale in true multi-tenant environment ( Vishnu Balusu & Asho...
PDF
StackWatch: A prototype CloudWatch service for CloudStack
PPTX
Reusable, composable, battle-tested Terraform modules
PDF
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
PPTX
App fabric introduction
PDF
Create a Varnish cluster in Kubernetes for Drupal caching - DrupalCon North A...
PPTX
AWS as platform for scalable applications
PDF
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
PDF
Securing your Pulsar Cluster with Vault_Chris Kellogg
PDF
Running an openstack instance
KEY
Nodejs web,db,hosting
PDF
Обмен учетными данными между iOS 8 приложениями и вебом, Константин Чернухо, ...
PPTX
Monitoring on Kubernetes using prometheus
PDF
Monitoring on Kubernetes using Prometheus - Chandresh
Monkey man
Using Apache as an Application Server
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Securing Microservices using Play and Akka HTTP
AWS Lambda with Serverless Framework and Java
Secure Kafka at scale in true multi-tenant environment ( Vishnu Balusu & Asho...
StackWatch: A prototype CloudWatch service for CloudStack
Reusable, composable, battle-tested Terraform modules
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
App fabric introduction
Create a Varnish cluster in Kubernetes for Drupal caching - DrupalCon North A...
AWS as platform for scalable applications
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
Securing your Pulsar Cluster with Vault_Chris Kellogg
Running an openstack instance
Nodejs web,db,hosting
Обмен учетными данными между iOS 8 приложениями и вебом, Константин Чернухо, ...
Monitoring on Kubernetes using prometheus
Monitoring on Kubernetes using Prometheus - Chandresh
Ad

More from Cloud IaaS Provider Tucha (20)

PPT
Вся правда об облаках, или Облачные мифы, давайте, до свидания!
PPTX
Безопасность в облаке: что она включает в себя и как её обеспечить?
PDF
Быль о частных облаках и зря потраченных ресурсах. Владимир мельник, СТО Tucha
PPTX
Публичный IaaS на базе ПО с открытым кодом
PPT
Облачный сервис - безопасен ли он для адвокатской деятельности?
PDF
Построение облачной СХД на базе ПО с открытым кодом (Ceph). Бюджетно и надёжно
PPT
Построение собственного вычислительного облака на базе программного обеспечен...
PPT
Безболезненная миграция высоконагруженных веб-приложений с хостинга на хостинг
PPT
Забег на скорость: насколько быстро можно реально перенести облачную инфрастр...
PPTX
Эволюция онлайн. Как из «скрипта-обезьянки» вырастить полноценного помощника
PPTX
Совмещение матриц. Можно ли из технаря сделать управленца и наоборот?
PPTX
Дрейф у суміжні області: де та як може додатково заробляти фрілансер.
PDF
Табор уходит в небо, или Переход в облачный офис как способ повысить эффектив...
PPTX
TuchaHost - хостинг серверов в облаке
PPTX
Вебинар "Как организовать мобильный офис незаметно от окружающих"
PPTX
Онлайн-сервис Yaware для учёта рабочего времени
PPTX
Эволюция лени, Владимир Мельник, Tucha
PPTX
Цена секунды, или Влияние скорости работы сервиса на его коммерческую эффекти...
PPTX
Сайт неваляшка, Владимир Мельник, Tucha
Вся правда об облаках, или Облачные мифы, давайте, до свидания!
Безопасность в облаке: что она включает в себя и как её обеспечить?
Быль о частных облаках и зря потраченных ресурсах. Владимир мельник, СТО Tucha
Публичный IaaS на базе ПО с открытым кодом
Облачный сервис - безопасен ли он для адвокатской деятельности?
Построение облачной СХД на базе ПО с открытым кодом (Ceph). Бюджетно и надёжно
Построение собственного вычислительного облака на базе программного обеспечен...
Безболезненная миграция высоконагруженных веб-приложений с хостинга на хостинг
Забег на скорость: насколько быстро можно реально перенести облачную инфрастр...
Эволюция онлайн. Как из «скрипта-обезьянки» вырастить полноценного помощника
Совмещение матриц. Можно ли из технаря сделать управленца и наоборот?
Дрейф у суміжні області: де та як може додатково заробляти фрілансер.
Табор уходит в небо, или Переход в облачный офис как способ повысить эффектив...
TuchaHost - хостинг серверов в облаке
Вебинар "Как организовать мобильный офис незаметно от окружающих"
Онлайн-сервис Yaware для учёта рабочего времени
Эволюция лени, Владимир Мельник, Tucha
Цена секунды, или Влияние скорости работы сервиса на его коммерческую эффекти...
Сайт неваляшка, Владимир Мельник, Tucha

Recently uploaded (20)

PDF
STKI Israel Market Study 2025 version august
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Five Habits of High-Impact Board Members
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPT
Geologic Time for studying geology for geologist
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPT
What is a Computer? Input Devices /output devices
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
The various Industrial Revolutions .pptx
PDF
A review of recent deep learning applications in wood surface defect identifi...
PPTX
Tartificialntelligence_presentation.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
CloudStack 4.21: First Look Webinar slides
STKI Israel Market Study 2025 version august
NewMind AI Weekly Chronicles – August ’25 Week III
Hindi spoken digit analysis for native and non-native speakers
O2C Customer Invoices to Receipt V15A.pptx
DP Operators-handbook-extract for the Mautical Institute
A novel scalable deep ensemble learning framework for big data classification...
Five Habits of High-Impact Board Members
Developing a website for English-speaking practice to English as a foreign la...
Geologic Time for studying geology for geologist
sustainability-14-14877-v2.pddhzftheheeeee
What is a Computer? Input Devices /output devices
Enhancing emotion recognition model for a student engagement use case through...
The various Industrial Revolutions .pptx
A review of recent deep learning applications in wood surface defect identifi...
Tartificialntelligence_presentation.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Benefits of Physical activity for teenagers.pptx
Assigned Numbers - 2025 - Bluetooth® Document
CloudStack 4.21: First Look Webinar slides

MonkeyMan – a Perl5 framework for Apache CloudStack automation

  • 2. What do we like in Apache CloudStack? Manageability • unified management portal; • browser-compatible VNC-interface; • powerful API. Omnivorousness • hypervisors: KVM, LXC, XEN, VMWare, Hyper-V; • storages: any filesystems, including clustered filesystems that could be accessed by a shared- mountpoint GlusterFS, Ceph, NFS, SMB, GFS2, OCFS2. Security • encrypted networking (IPSec, HTTPS); • firewalls and load-balancers (internal VR, NetScaler, F5, FortiGate, pfSense and other beasts); • open source ideology. https://cloudstack.apache.org/
  • 3. What else do we like in Apache CloudStack? Reliablity • clusterisation, live migration; • high-availability, affinity groups; • volume and VM snapshots. Rapid deployment • ISO-images and templates; • OS preferences for the host; • host and storage tags, which can be used in the service and storage offerings. Flexible access policies • domains, accounts, users; • resouce limits; • LDAP support. https://cloudstack.apache.org/
  • 4. MonkeyMan: the cloud manager MonkeyMan - the automation framework Implemented in Perl5 with Moose All ACS objects are Perl objects Flexible API vocabularies XML and XPath Pluggable and replaceable modules http://monkeyman.tucha.ua/
  • 5. MonkeyMan: Perl5 & Moose # Use Moose and be happy :) use Moose::Role; has 'monkeyman' => ( is => 'ro', isa => 'MonkeyMan', reader => 'get_monkeyman', writer => '_set_monkeyman', predicate => '_has_monkeyman', required => 1 ); Why use Moose? Attributes Accessors Validation Roles Subclasses Syntax extentions Art by www.animalcrewshop.com http://monkeyman.tucha.ua/
  • 6. MonkeyMan: some of utilities
  • 9. MonkeyMan: a sample ACS query my $api = $monkeyman->get_cloudstack('PRIMARY')->get_api; my $virtualmachine = $api->perform_action( type => 'VirtualMachine', action => 'create', requested => { 'element' => 'element' }, parameters => { zoneid => 'f09fe8dd-3567-4ff6-ac3a-2f85dec2636d', templateid => '8b53dc6a-084d-4b5a-8ac5-3f88301c6703', serviceofferingid => '97d74503-d609-4edb-8633-748d400aad5e', # ...skipped... } ); http://monkeyman.tucha.ua/
  • 10. MonkeyMan: API vocabularies (composing a request) package MonkeyMan::CloudStack::API::Element::VirtualMachine; with 'MonkeyMan::CloudStack::API::Roles::Element'; # ...skipped... our %vocabulary_tree = ( type => 'VirtualMachine', name => 'virtual machine', entity_node => 'virtualmachine', actions => { create => { request => { command => 'deployVirtualMachine', async => 1, paged => 0, parameters => { zoneid => { required => 1, command_parameters => { 'zoneid' => '<%VALUE%>' }, }, templateid => { required => 1, command_parameters => { 'templateid' => '<%VALUE%>' }, }, serviceofferingid => { required => 1, command_parameters => { 'serviceofferingid' => '<%VALUE%>' }, }, # ...skipped... }, # ...skipped... }, # ...skipped... }, # ...skipped... }, ); http://monkeyman.tucha.ua/
  • 14. MonkeyMan: ACS vocabularies (parsing a response) package MonkeyMan::CloudStack::API::Element::VirtualMachine; with 'MonkeyMan::CloudStack::API::Roles::Element'; # ...skipped... our %vocabulary_tree = ( type => 'VirtualMachine', name => 'virtual machine', entity_node => 'virtualmachine', actions => { create => { response => { response_node => 'queryasyncjobresultresponse', results => { element => { return_as => [ qw( dom element id ) ], queries => [ '/<%OUR_RESPONSE_NODE%>/jobresult/<%OUR_ENTITY_NODE%>' ], required => 0, multiple => 1 }, id => { return_as => [ qw( value ) ], queries => [ '/<%OUR_RESPONSE_NODE%>/jobresult/<%OUR_ENTITY_NODE%>/id' ], required => 0, multiple => 1 }, # ...skipped... }, # ...skipped... }, # ...skipped... }, # ...skipped... }, ); http://monkeyman.tucha.ua/
  • 23. MonkeyMan: logging and debugging http://monkeyman.tucha.ua/ $logger->debugf(’The %s %s is %s‘, $vm_object, $vm_object->get_type(noun => 1), $vm_object->qxp(’/status’) );
  • 26. Thanks for your interest! http://monkeyman.tucha.ua/