SlideShare a Scribd company logo
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
PDF
Puppet and the HashiStack
PDF
Rohit yadav cloud stack internals
PPTX
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
PDF
Infrastructure as code with Puppet and Apache CloudStack
PDF
ApacheCloudStack
PDF
Cloud APIs Overview Tucker
ODP
Puppetpreso
PDF
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlue
ODP
CloudStack, jclouds and Whirr!
PPTX
How to add a new hypervisor to CloudStack:Lessons learned from Hyper-V effort
PDF
Test driven infrastructure
ODP
Developingapiplug insforcs-151112204727-lva1-app6891
PDF
CloudOps CloudStack Days, Austin April 2015
PDF
Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15
PDF
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
PDF
2013 05-openstack-israel-heat
PDF
What’s New and What’s Upcoming in Apache CloudStack, Giles Sirett, ShapeBlue
PPTX
Getting Started with Apache CloudStack
PPTX
Taking the open cloud to 11
Monkey man
Puppet and the HashiStack
Rohit yadav cloud stack internals
How to add a new hypervisor to CloudStack - Lessons learned from Hyper-V effort
Infrastructure as code with Puppet and Apache CloudStack
ApacheCloudStack
Cloud APIs Overview Tucker
Puppetpreso
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlue
CloudStack, jclouds and Whirr!
How to add a new hypervisor to CloudStack:Lessons learned from Hyper-V effort
Test driven infrastructure
Developingapiplug insforcs-151112204727-lva1-app6891
CloudOps CloudStack Days, Austin April 2015
Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
2013 05-openstack-israel-heat
What’s New and What’s Upcoming in Apache CloudStack, Giles Sirett, ShapeBlue
Getting Started with Apache CloudStack
Taking the open cloud to 11
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)

PPTX
TLE Review Electricity (Electricity).pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Mushroom cultivation and it's methods.pdf
TLE Review Electricity (Electricity).pptx
Encapsulation_ Review paper, used for researhc scholars
Digital-Transformation-Roadmap-for-Companies.pptx
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
1. Introduction to Computer Programming.pptx
Web App vs Mobile App What Should You Build First.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
1 - Historical Antecedents, Social Consideration.pdf
A novel scalable deep ensemble learning framework for big data classification...
WOOl fibre morphology and structure.pdf for textiles
Enhancing emotion recognition model for a student engagement use case through...
Zenith AI: Advanced Artificial Intelligence
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Group 1 Presentation -Planning and Decision Making .pptx
A Presentation on Artificial Intelligence
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Mushroom cultivation and it's methods.pdf

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/