SlideShare a Scribd company logo
@remibergsma
CloudStack
Collaboration
Conference
October 9th, 2015
Dublin, Ireland
Operating CloudStack
easy way.the
@remibergsma
Remi Bergsma
I am
Engineer with a passion for automation.
Apache CloudStack Committer & PMC member.
@remibergsma
@remibergsma
@remibergsma
Mission Critical Cloud
@remibergsma
Mission Critical Automation
@remibergsma
CloudStackOps:
Operating
CloudStack
made easy.
https://github.com/schubergphilis/cloudstackOps
@remibergsma
What runs where? Overview!
@remibergsma
$ ./listVirtualMachines.py
--config-profile -c <name>
--domainname -d <name>
--oncluster -o <name>
--pod <podname>
--zone -z <zonename>
--filter -f <keyword>
--only-routers
--only-routers-to-be-upgraded
--no-routers
--router-nic-count -n <number>
--nic-count-is-minimum
--nic-count-is-maximum
--projectname -p
--is-projectvm
--ignore-domains <list>
--non-admin-credentials
--summary
--no-summary
--debug
--exec
Overview of runningVMs:
What is running on this cluster, POD, zone, etc..
@remibergsma
$ ./listVirtualMachines.py --config-profile mccx_admin --domain rbergsma
Welcome to CloudStackOps
+----------+---------+------------------+--------+-------+----------------+----------+----------+
| VM | Storage | Router nic count | Memory | Cores | Instance | Host | Domain |
+----------+---------+------------------+--------+-------+----------------+----------+----------+
| tiny | 60 GB | - | 1 GB | 1 | i-625-30809-VM | mccxvm13 | rbergsma |
| remi | 60 GB | - | 1 GB | 1 | i-625-30808-VM | mccxvm16 | rbergsma |
| rb (vpc) | - | 3 nics | 128 MB | 1 | r-25490-VM | mccxvm14 | rbergsma |
+----------+---------+------------------+--------+-------+----------------+----------+----------+
Summary 'MCCX-XEN-21':
Total number of VMs:3
Total allocated RAM: 2.125 GB
Total allocated cores: 3
Result for single domain:
optionally able to re-use existing CloudMonkey config profile
@remibergsma
Filtering on keyword:
$ ./listVirtualMachines.py --config-profile mccx_admin --domain rbergsma 
--filter tiny --no-routers
Welcome to CloudStackOps
+---------+---------+------------------+--------+-------+----------------+----------+----------+
| VM | Storage | Router nic count | Memory | Cores | Instance | Host | Domain |
+---------+---------+------------------+--------+-------+----------------+----------+----------+
| tiny | 60 GB | - | 1 GB | 1 | i-625-30809-VM | mccxvm13 | rbergsma |
+---------+---------+------------------+--------+-------+----------------+----------+----------+
Summary 'MCCX-XEN-21':
Total number of VMs: 1
Total allocated RAM: 1 GB
Total allocated cores: 1
@remibergsma
Getting routers only:
$ ./listVirtualMachines.py --config-profile mccx_admin --domain rbergsma 
--only-routers
Welcome to CloudStackOps
+----------+---------+------------------+--------+-------+----------------+----------+----------+
| VM | Storage | Router nic count | Memory | Cores | Instance | Host | Domain |
+----------+---------+------------------+--------+-------+----------------+----------+----------+
| rb (vpc) | - | 2 nics | 128 MB | 1 | r-25490-VM | mccxvm14 | rbergsma |
+----------+---------+------------------+--------+-------+----------------+----------+----------+
Summary 'MCCX-XEN-21':
Total number of VMs: 1
Total allocated RAM: 0.125 GB
Total allocated cores: 1
@remibergsma
Getting a single field:
$ ./listVirtualMachines.py --config-profile mccx_admin 
--oncluster MCCX-XEN-21 --no-summary | grep '-VM' | cut -d| -f7
i-555-192384-VM
i-434-6228-VM
i-225-17237-VM
i-225-3722-VM
i-722-24820-VM
i-117-4543-VM
i-527-20315-VM
i-323-18225-VM
i-514-11243-VM
i-625-18698-VM
i-267-5777-VM
i-388-2071-VM
i-688-1656-VM
i-27-20784-VM
i-441-31300-VM
Just Bash, nothing new here ;-)
@remibergsma
Everything
you need
to make
selections.
@remibergsma
Tried
migrating a
routerVM
to another
cluster?
@remibergsma
Only between hosts
from the same cluster!
(mccx) 🐵 > migrate systemvm virtualmachineid=xx hostid=xxx
Async job 8bd5b108-5fc2-426e-88f1-92fb53a72a63 failed
Error 530, Cannot migrate the VM,
destination host is not in the same cluster as current host of the VM
cmd = org.apache.cloudstack.api.command.admin.systemvm.MigrateSystemVMCmd
@remibergsma
@remibergsma
Cluster
POD 1
Cluster
POD 2
rVM migration
rVM
r-1234-VM
rVM
ROOT-1234
ROOT disk migration
r-1234-VM
ROOT-1234
It can be done!
@remibergsma
Migrating a router:
$ ./migrateRouterVM.py
--config-profile -c <profilename>
--routerinstance-name -r <instancename>
--tocluster -t <clustername>
--mysqlserver -s <mysql hostname>
--mysqlpassword <passwd>
--is-projectrouter
--debug
--exec
Cluster
POD 1
Cluster
POD 2
migration
rVMrVM
@remibergsma
Upgrading CloudStack
upgrading
systemVMs
user impact.
@remibergsma
Upgrading a router:
$ ./upgradeRouterVM.py
--config-profile -c <profilename>
--routerinstance-name -r <instancename>
--is-projectrouter
--debug
--exec
@remibergsma
$ ./listVirtualMachines.py -c mccx_admin --only-routers-to-be-upgraded 
--pod MCCX-POD-12 | grep r- | cut -d| -f7 | 
awk {'print "./upgradeRouterVM.py -c mccx_admin -r " $1 " --exec 
>> " $1 ".log 2>&1 "'} | sh
./upgradeVirtualRouter.py -c mccx_admin -r r-192384-VM >> r-30656-VM.log 2>&1
./upgradeVirtualRouter.py -c mccx_admin -r r-6228-VM >> r-6228-VM.log 2>&1
./upgradeVirtualRouter.py -c mccx_admin -r r-17237-VM >> r-17237-VM.log 2>&1
./upgradeVirtualRouter.py -c mccx_admin -r r-3722-VM >> r-3722-VM.log 2>&1
Flexible automated upgrading:
Dear Remi Bergsma,
We have upgraded the virtual router VM that belongs to your
domain ‘rbergsma’ (r-1234-VM).
Please contact us in case of any problems.
Kind Regards, 



The Iaas Team
Dear Remi Bergsma,
We will now upgrade the virtual router VM that belongs to your
domain 'rbergsma' (r-1234-VM).
During this reboot your VMs will have no network connectivity.
Expected downtime is 1~3 minutes.
Please contact us in case of any problems.
Kind Regards, 



The Iaas Team
Either Cluster, POD, Zone or custom selection.
Output of each upgrade is
captured in its own log file.
Executed sequentially.
@remibergsma
Parallel upgrades:
$ ./listVirtualMachines.py -c mccp_admin --only-routers-to-be-upgraded
 --router-nic-count=2 --ignore-domains REMI,TEST | grep r- | cut -d| 

-f7 | awk {'print "./upgradeRouterVM.py -c mccx_admin -r " $1 " 
>> " $1 ".log 2>&1 "'} > migrations.txt
$ cat migrations.txt
./upgradeVirtualRouter.py -c mccx_admin -r r-192384-VM >> r-30656-VM.log 2>&1
./upgradeVirtualRouter.py -c mccx_admin -r r-6228-VM >> r-6228-VM.log 2>&1
$ nohup cat migrations.txt | 
xargs -n 1 -P 10 -I {} bash -c {} 2>&1 >/dev/null &
Migrations are sent to background and run in parallel (10 at a time).
Make any selection here.
@remibergsma
Sequential vs Parallel
@remibergsma
XenServer patching
automation.
@remibergsma
Easy XenServer patching
"xen_patching": {
"patches": ["XS62ESP1013", "XS62ESP1014",
"XS62ESP1017", "XS62ESP1020",
"XS62ESP1026" ]
},
@remibergsma
Easy XenServer patching
$./xenserver_rolling_reboot.py --name MCCT-XEN-01
@remibergsma
Easy XenServer patching
@remibergsma
Easy XenServer patching
Demo time…
@remibergsma
@remibergsma
WhichVMs were running
on that hypervisor that
just crashed?
@remibergsma
Hypervisor down?
$ ./listHAWorkers.py --mysqlserver dbserver1 --hostname mccxvm19
Welcome to CloudStackOps
+------------------+--------------------+----------+---------------------+---------------+------------+
| VM | Type | VM state | Created (-2H) | Step | Mgt server |
+------------------+--------------------+----------+---------------------+---------------+------------+
| Desktop | User | Stopped | 2015-03-14 18:57:29 | Scheduled | None |
| vm123 | User | Running | 2015-03-14 18:57:30 | Done | xapp2 |
| vm001 | User | Stopped | 2015-03-14 18:57:29 | Scheduled | None |
| host1 | User | Running | 2015-03-14 18:57:30 | Investigating | None |
| testing101 | User | Stopped | 2015-03-14 18:57:30 | Scheduled | None |
| mobile | User | Stopped | 2015-03-14 18:57:28 | Scheduled | None |
| mx | User | Running | 2015-03-14 18:57:29 | Done | xapp1 |
| mobile222 | User | Running | 2015-03-14 18:57:29 | Done | xapp2 |
| r-17845-VM | DomainRouter | Starting | 2015-03-14 18:57:29 | Scheduled | xapp1 |
| r-17847-VM | DomainRouter | Starting | 2015-03-14 18:57:29 | Scheduled | xapp1 |
+------------------+--------------------+----------+---------------------+---------------+------------+
Note: Found 10 HA workers.
Here you can monitor the recovery of your VMs.
Filtering on hostname is optional, but usually what you need.
@remibergsma
What is CloudStack
doing right now?
@remibergsma
Running CloudStack jobs:
$ ./listRunningJobs.py --mysqlserver dbserver1
Welcome to CloudStackOps
+----------+----------------+-------------------------------------------------------------------+
| username | account_name | job_cmd |
+----------+----------------+-------------------------------------------------------------------+
| system | rbergsma_admin | com.cloud.storage.VmWorkTakeVolumeSnapshot |
| system | rbergsma_admin | com.cloud.storage.VmWorkTakeVolumeSnapshot |
| system | rbergsma_admin | org.apache.cloudstack.api.command.user.snapshot.CreateSnapshotCmd |
| system | rbergsma_admin | org.apache.cloudstack.api.command.user.snapshot.CreateSnapshotCmd |
| system | system | com.cloud.vm.VmWorkStart |
| system | system | com.cloud.vm.VmWorkStop |
+----------+----------------+-------------------------------------------------------------------+
Note: Found 6 running jobs.
Snapshots are being created…
@remibergsma
CloudStackOps:
Operating
CloudStack
made easy.
https://github.com/schubergphilis/cloudstackOps
@remibergsma
Getting started:
$ git clone https://github.com/schubergphilis/cloudstackOps
$ cd cloudstackOps
$ cp -pr config.sample config
$ vim config
$ pip install -Iv marvin/Marvin-0.1.0.tar.gz
$ pip install -Iv clint
$ pip install -Iv prettytable
# Config file for CloudStack Operations scripts
[cloudstackOps]
organization = The Iaas Team
[mail]
smtpserver = localhost
mail_from = rbergsma@schubergphilis.com
errors_to = rbergsma@schubergphilis.com
[config]
apikey = whMTYFZ…gqlETPEile4_A
url = http://127.0.0.1:8080/client/api
expires = 600
secretkey = 9Z0S5-ry…Qj-tVhkn9tFv1Q
timeout = 3600
[dbserver1]
password = mypass
You can omit this section when using --config-profile
Get in touch!
blog.remibergsma.com
@remibergsma
remi@apache.org
Follow me on Twitter.
The slides have just been
automatically posted.
@remibergsma
Thank you!
@remibergsma
Credits
Nexenta logo http://www.hpcwire.com/wp-content/uploads/2011/03/nexenta.png
NetApp logo http://www.valuewalk.com/wp-content/uploads/2013/05/NetApp-logo.jpg
Automation http://jewishcurrents.org/wp-content/uploads/2014/02/Firing-employees-and-hiring-robots-
Minimum-wage-rise-to-spark-automation-age-says-All-Bake-Technologies_strict_xxl.jpg
Knife http://www.vanslobbe.nl/assets/cache/img/normal_a_a_ae8170826274ac75ec1c99cc01a74ded.jpg
Flag https://cdn4.iconfinder.com/data/icons/SUPERVISTA/business/png/400/checkered_flag.png
Parallel swimmers http://wowpics.in/wp-content/uploads/2012/03/alicia.jpg
Audit http://www.philexmining.com.ph/images/articles/1396260177_Audit_Hero.jpg
Toolbox http://tripleseo.com/wp-content/uploads/2013/08/wooden_tool_box.jpg
Magic http://globe-views.com/dcim/dreams/magic/magic-01.jpg
Commodoties http://i.telegraph.co.uk/multimedia/archive/01870/basket_1870914b.jpg
Bottles http://images.wisegeek.com/bottles-on-assembly-line.jpg
2012 http://www.zipconomy.nl/wp-content/uploads/2011/12/2012-markt-trends.jpg
@remibergsma
License
This work is licensed under a Creative Commons Attribution-
ShareAlike 4.0 International License.

More Related Content

What's hot

Boris Stoyanov - some new features in Apache cloudStack
Boris Stoyanov - some new features in Apache cloudStackBoris Stoyanov - some new features in Apache cloudStack
Boris Stoyanov - some new features in Apache cloudStackShapeBlue
 
Running Cloud Foundry for 12 months - An experience report | anynines
Running Cloud Foundry for 12 months - An experience report | anyninesRunning Cloud Foundry for 12 months - An experience report | anynines
Running Cloud Foundry for 12 months - An experience report | anyninesanynines GmbH
 
One-click Hadoop Cluster Deployment on OpenPOWER Systems
One-click Hadoop Cluster Deployment on OpenPOWER SystemsOne-click Hadoop Cluster Deployment on OpenPOWER Systems
One-click Hadoop Cluster Deployment on OpenPOWER SystemsPradeep Kumar
 
OSv at Cassandra Summit
OSv at Cassandra SummitOSv at Cassandra Summit
OSv at Cassandra SummitDon Marti
 
Cloud Foundry on OpenStack - An Experience Report | anynines
Cloud Foundry on OpenStack - An Experience Report | anynines Cloud Foundry on OpenStack - An Experience Report | anynines
Cloud Foundry on OpenStack - An Experience Report | anynines anynines GmbH
 
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...Severalnines
 
(SDD419) Amazon EC2 Networking Deep Dive and Best Practices | AWS re:Invent 2014
(SDD419) Amazon EC2 Networking Deep Dive and Best Practices | AWS re:Invent 2014(SDD419) Amazon EC2 Networking Deep Dive and Best Practices | AWS re:Invent 2014
(SDD419) Amazon EC2 Networking Deep Dive and Best Practices | AWS re:Invent 2014Amazon Web Services
 
Monitor PowerKVM using Ganglia, Nagios
Monitor PowerKVM using Ganglia, NagiosMonitor PowerKVM using Ganglia, Nagios
Monitor PowerKVM using Ganglia, NagiosPradeep Kumar
 
Openstack study-nova-02
Openstack study-nova-02Openstack study-nova-02
Openstack study-nova-02Jinho Shin
 
Experience Report: Cloud Foundry Open Source Operations | anynines
Experience Report: Cloud Foundry Open Source Operations | anyninesExperience Report: Cloud Foundry Open Source Operations | anynines
Experience Report: Cloud Foundry Open Source Operations | anyninesanynines GmbH
 
Delivering a production Cloud Foundry Environment with Bosh | anynines
Delivering a production Cloud Foundry Environment with Bosh | anyninesDelivering a production Cloud Foundry Environment with Bosh | anynines
Delivering a production Cloud Foundry Environment with Bosh | anyninesanynines GmbH
 
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...Vietnam Open Infrastructure User Group
 
Creating CentOS Template For CloudStack
Creating CentOS Template For CloudStackCreating CentOS Template For CloudStack
Creating CentOS Template For CloudStackShanker Balan
 
[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...
[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...
[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...OpenStack Korea Community
 
Autoscaled Distributed Automation using AWS at Selenium London MeetUp
Autoscaled Distributed Automation using AWS at Selenium London MeetUpAutoscaled Distributed Automation using AWS at Selenium London MeetUp
Autoscaled Distributed Automation using AWS at Selenium London MeetUparagavan
 
Performance Tuning a Cloud Application: A Real World Case Study
Performance Tuning a Cloud Application: A Real World Case StudyPerformance Tuning a Cloud Application: A Real World Case Study
Performance Tuning a Cloud Application: A Real World Case Studyshane_gibson
 
Monitoring Large-scale Cloud Infrastructures with OpenNebula
Monitoring Large-scale Cloud Infrastructures with OpenNebulaMonitoring Large-scale Cloud Infrastructures with OpenNebula
Monitoring Large-scale Cloud Infrastructures with OpenNebulaNETWAYS
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Serversupertom
 
[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network TroubleshootingOpen Source Consulting
 

What's hot (20)

Boris Stoyanov - some new features in Apache cloudStack
Boris Stoyanov - some new features in Apache cloudStackBoris Stoyanov - some new features in Apache cloudStack
Boris Stoyanov - some new features in Apache cloudStack
 
Running Cloud Foundry for 12 months - An experience report | anynines
Running Cloud Foundry for 12 months - An experience report | anyninesRunning Cloud Foundry for 12 months - An experience report | anynines
Running Cloud Foundry for 12 months - An experience report | anynines
 
One-click Hadoop Cluster Deployment on OpenPOWER Systems
One-click Hadoop Cluster Deployment on OpenPOWER SystemsOne-click Hadoop Cluster Deployment on OpenPOWER Systems
One-click Hadoop Cluster Deployment on OpenPOWER Systems
 
OSv at Cassandra Summit
OSv at Cassandra SummitOSv at Cassandra Summit
OSv at Cassandra Summit
 
Cloud Foundry on OpenStack - An Experience Report | anynines
Cloud Foundry on OpenStack - An Experience Report | anynines Cloud Foundry on OpenStack - An Experience Report | anynines
Cloud Foundry on OpenStack - An Experience Report | anynines
 
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
 
(SDD419) Amazon EC2 Networking Deep Dive and Best Practices | AWS re:Invent 2014
(SDD419) Amazon EC2 Networking Deep Dive and Best Practices | AWS re:Invent 2014(SDD419) Amazon EC2 Networking Deep Dive and Best Practices | AWS re:Invent 2014
(SDD419) Amazon EC2 Networking Deep Dive and Best Practices | AWS re:Invent 2014
 
Monitor PowerKVM using Ganglia, Nagios
Monitor PowerKVM using Ganglia, NagiosMonitor PowerKVM using Ganglia, Nagios
Monitor PowerKVM using Ganglia, Nagios
 
Openstack study-nova-02
Openstack study-nova-02Openstack study-nova-02
Openstack study-nova-02
 
Experience Report: Cloud Foundry Open Source Operations | anynines
Experience Report: Cloud Foundry Open Source Operations | anyninesExperience Report: Cloud Foundry Open Source Operations | anynines
Experience Report: Cloud Foundry Open Source Operations | anynines
 
How to monitor NGINX
How to monitor NGINXHow to monitor NGINX
How to monitor NGINX
 
Delivering a production Cloud Foundry Environment with Bosh | anynines
Delivering a production Cloud Foundry Environment with Bosh | anyninesDelivering a production Cloud Foundry Environment with Bosh | anynines
Delivering a production Cloud Foundry Environment with Bosh | anynines
 
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
 
Creating CentOS Template For CloudStack
Creating CentOS Template For CloudStackCreating CentOS Template For CloudStack
Creating CentOS Template For CloudStack
 
[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...
[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...
[2018.10.19] Andrew Kong - Tunnel without tunnel (Seminar at OpenStack Korea ...
 
Autoscaled Distributed Automation using AWS at Selenium London MeetUp
Autoscaled Distributed Automation using AWS at Selenium London MeetUpAutoscaled Distributed Automation using AWS at Selenium London MeetUp
Autoscaled Distributed Automation using AWS at Selenium London MeetUp
 
Performance Tuning a Cloud Application: A Real World Case Study
Performance Tuning a Cloud Application: A Real World Case StudyPerformance Tuning a Cloud Application: A Real World Case Study
Performance Tuning a Cloud Application: A Real World Case Study
 
Monitoring Large-scale Cloud Infrastructures with OpenNebula
Monitoring Large-scale Cloud Infrastructures with OpenNebulaMonitoring Large-scale Cloud Infrastructures with OpenNebula
Monitoring Large-scale Cloud Infrastructures with OpenNebula
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Server
 
[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting
 

Similar to Operating CloudStack: the easy way (automation!)

[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법Open Source Consulting
 
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...Continuent
 
Ganglia Monitoring Tool
Ganglia Monitoring ToolGanglia Monitoring Tool
Ganglia Monitoring Toolsudhirpg
 
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Nelson Calero
 
CoreOS in anger : firing up wordpress across a 3 machine CoreOS cluster
CoreOS in anger : firing up wordpress across a 3 machine CoreOS cluster CoreOS in anger : firing up wordpress across a 3 machine CoreOS cluster
CoreOS in anger : firing up wordpress across a 3 machine CoreOS cluster Shaun Domingo
 
The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016effie mouzeli
 
Malware Detection with OSSEC HIDS - OSSECCON 2014
Malware Detection with OSSEC HIDS - OSSECCON 2014Malware Detection with OSSEC HIDS - OSSECCON 2014
Malware Detection with OSSEC HIDS - OSSECCON 2014Santiago Bassett
 
Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...
Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...
Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...Continuent
 
The Road to End-to-End Encryption in Jitsi Meet
The Road to End-to-End Encryption in Jitsi MeetThe Road to End-to-End Encryption in Jitsi Meet
The Road to End-to-End Encryption in Jitsi MeetSaúl Ibarra Corretgé
 
16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboards16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboardsDenis Ristic
 
Percona University - ProxySQL para MySQL
Percona University - ProxySQL para MySQLPercona University - ProxySQL para MySQL
Percona University - ProxySQL para MySQLMarcelo Altmann
 
Bare-metal and Virtual Provisioning with Razor
Bare-metal and Virtual Provisioning with RazorBare-metal and Virtual Provisioning with Razor
Bare-metal and Virtual Provisioning with RazorKristian Reese
 
Trouble shooting apachecloudstack
Trouble shooting apachecloudstackTrouble shooting apachecloudstack
Trouble shooting apachecloudstackSailaja Sunil
 
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean WinnCouch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean WinnTrevor Roberts Jr.
 
Incrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern AutomationIncrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern AutomationSean Chittenden
 

Similar to Operating CloudStack: the easy way (automation!) (20)

What is new in neutron QoS?
What is new in neutron QoS?What is new in neutron QoS?
What is new in neutron QoS?
 
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
 
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
Training Slides: Advanced 304: Upgrading From Native MySQL Replication To Tun...
 
Ganglia Monitoring Tool
Ganglia Monitoring ToolGanglia Monitoring Tool
Ganglia Monitoring Tool
 
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
 
CoreOS in anger : firing up wordpress across a 3 machine CoreOS cluster
CoreOS in anger : firing up wordpress across a 3 machine CoreOS cluster CoreOS in anger : firing up wordpress across a 3 machine CoreOS cluster
CoreOS in anger : firing up wordpress across a 3 machine CoreOS cluster
 
Mysql tracing
Mysql tracingMysql tracing
Mysql tracing
 
Mysql tracing
Mysql tracingMysql tracing
Mysql tracing
 
The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016
 
Malware Detection with OSSEC HIDS - OSSECCON 2014
Malware Detection with OSSEC HIDS - OSSECCON 2014Malware Detection with OSSEC HIDS - OSSECCON 2014
Malware Detection with OSSEC HIDS - OSSECCON 2014
 
Puppet Data Mining
Puppet Data MiningPuppet Data Mining
Puppet Data Mining
 
Perf Tuning Short
Perf Tuning ShortPerf Tuning Short
Perf Tuning Short
 
Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...
Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...
Training Slides: Advanced 301: Multi-Site/Multi-Master Tungsten Clustering De...
 
The Road to End-to-End Encryption in Jitsi Meet
The Road to End-to-End Encryption in Jitsi MeetThe Road to End-to-End Encryption in Jitsi Meet
The Road to End-to-End Encryption in Jitsi Meet
 
16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboards16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboards
 
Percona University - ProxySQL para MySQL
Percona University - ProxySQL para MySQLPercona University - ProxySQL para MySQL
Percona University - ProxySQL para MySQL
 
Bare-metal and Virtual Provisioning with Razor
Bare-metal and Virtual Provisioning with RazorBare-metal and Virtual Provisioning with Razor
Bare-metal and Virtual Provisioning with Razor
 
Trouble shooting apachecloudstack
Trouble shooting apachecloudstackTrouble shooting apachecloudstack
Trouble shooting apachecloudstack
 
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean WinnCouch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
 
Incrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern AutomationIncrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern Automation
 

Recently uploaded

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1DianaGray10
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekCzechDreamin
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀DianaGray10
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesThousandEyes
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Thierry Lestable
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Product School
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...Product School
 

Recently uploaded (20)

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 

Operating CloudStack: the easy way (automation!)

  • 2. @remibergsma Remi Bergsma I am Engineer with a passion for automation. Apache CloudStack Committer & PMC member.
  • 9. @remibergsma $ ./listVirtualMachines.py --config-profile -c <name> --domainname -d <name> --oncluster -o <name> --pod <podname> --zone -z <zonename> --filter -f <keyword> --only-routers --only-routers-to-be-upgraded --no-routers --router-nic-count -n <number> --nic-count-is-minimum --nic-count-is-maximum --projectname -p --is-projectvm --ignore-domains <list> --non-admin-credentials --summary --no-summary --debug --exec Overview of runningVMs: What is running on this cluster, POD, zone, etc..
  • 10. @remibergsma $ ./listVirtualMachines.py --config-profile mccx_admin --domain rbergsma Welcome to CloudStackOps +----------+---------+------------------+--------+-------+----------------+----------+----------+ | VM | Storage | Router nic count | Memory | Cores | Instance | Host | Domain | +----------+---------+------------------+--------+-------+----------------+----------+----------+ | tiny | 60 GB | - | 1 GB | 1 | i-625-30809-VM | mccxvm13 | rbergsma | | remi | 60 GB | - | 1 GB | 1 | i-625-30808-VM | mccxvm16 | rbergsma | | rb (vpc) | - | 3 nics | 128 MB | 1 | r-25490-VM | mccxvm14 | rbergsma | +----------+---------+------------------+--------+-------+----------------+----------+----------+ Summary 'MCCX-XEN-21': Total number of VMs:3 Total allocated RAM: 2.125 GB Total allocated cores: 3 Result for single domain: optionally able to re-use existing CloudMonkey config profile
  • 11. @remibergsma Filtering on keyword: $ ./listVirtualMachines.py --config-profile mccx_admin --domain rbergsma --filter tiny --no-routers Welcome to CloudStackOps +---------+---------+------------------+--------+-------+----------------+----------+----------+ | VM | Storage | Router nic count | Memory | Cores | Instance | Host | Domain | +---------+---------+------------------+--------+-------+----------------+----------+----------+ | tiny | 60 GB | - | 1 GB | 1 | i-625-30809-VM | mccxvm13 | rbergsma | +---------+---------+------------------+--------+-------+----------------+----------+----------+ Summary 'MCCX-XEN-21': Total number of VMs: 1 Total allocated RAM: 1 GB Total allocated cores: 1
  • 12. @remibergsma Getting routers only: $ ./listVirtualMachines.py --config-profile mccx_admin --domain rbergsma --only-routers Welcome to CloudStackOps +----------+---------+------------------+--------+-------+----------------+----------+----------+ | VM | Storage | Router nic count | Memory | Cores | Instance | Host | Domain | +----------+---------+------------------+--------+-------+----------------+----------+----------+ | rb (vpc) | - | 2 nics | 128 MB | 1 | r-25490-VM | mccxvm14 | rbergsma | +----------+---------+------------------+--------+-------+----------------+----------+----------+ Summary 'MCCX-XEN-21': Total number of VMs: 1 Total allocated RAM: 0.125 GB Total allocated cores: 1
  • 13. @remibergsma Getting a single field: $ ./listVirtualMachines.py --config-profile mccx_admin --oncluster MCCX-XEN-21 --no-summary | grep '-VM' | cut -d| -f7 i-555-192384-VM i-434-6228-VM i-225-17237-VM i-225-3722-VM i-722-24820-VM i-117-4543-VM i-527-20315-VM i-323-18225-VM i-514-11243-VM i-625-18698-VM i-267-5777-VM i-388-2071-VM i-688-1656-VM i-27-20784-VM i-441-31300-VM Just Bash, nothing new here ;-)
  • 16. @remibergsma Only between hosts from the same cluster! (mccx) 🐵 > migrate systemvm virtualmachineid=xx hostid=xxx Async job 8bd5b108-5fc2-426e-88f1-92fb53a72a63 failed Error 530, Cannot migrate the VM, destination host is not in the same cluster as current host of the VM cmd = org.apache.cloudstack.api.command.admin.systemvm.MigrateSystemVMCmd
  • 18. @remibergsma Cluster POD 1 Cluster POD 2 rVM migration rVM r-1234-VM rVM ROOT-1234 ROOT disk migration r-1234-VM ROOT-1234 It can be done!
  • 19. @remibergsma Migrating a router: $ ./migrateRouterVM.py --config-profile -c <profilename> --routerinstance-name -r <instancename> --tocluster -t <clustername> --mysqlserver -s <mysql hostname> --mysqlpassword <passwd> --is-projectrouter --debug --exec Cluster POD 1 Cluster POD 2 migration rVMrVM
  • 21. @remibergsma Upgrading a router: $ ./upgradeRouterVM.py --config-profile -c <profilename> --routerinstance-name -r <instancename> --is-projectrouter --debug --exec
  • 22. @remibergsma $ ./listVirtualMachines.py -c mccx_admin --only-routers-to-be-upgraded --pod MCCX-POD-12 | grep r- | cut -d| -f7 | awk {'print "./upgradeRouterVM.py -c mccx_admin -r " $1 " --exec >> " $1 ".log 2>&1 "'} | sh ./upgradeVirtualRouter.py -c mccx_admin -r r-192384-VM >> r-30656-VM.log 2>&1 ./upgradeVirtualRouter.py -c mccx_admin -r r-6228-VM >> r-6228-VM.log 2>&1 ./upgradeVirtualRouter.py -c mccx_admin -r r-17237-VM >> r-17237-VM.log 2>&1 ./upgradeVirtualRouter.py -c mccx_admin -r r-3722-VM >> r-3722-VM.log 2>&1 Flexible automated upgrading: Dear Remi Bergsma, We have upgraded the virtual router VM that belongs to your domain ‘rbergsma’ (r-1234-VM). Please contact us in case of any problems. Kind Regards, 
 
 The Iaas Team Dear Remi Bergsma, We will now upgrade the virtual router VM that belongs to your domain 'rbergsma' (r-1234-VM). During this reboot your VMs will have no network connectivity. Expected downtime is 1~3 minutes. Please contact us in case of any problems. Kind Regards, 
 
 The Iaas Team Either Cluster, POD, Zone or custom selection. Output of each upgrade is captured in its own log file. Executed sequentially.
  • 23. @remibergsma Parallel upgrades: $ ./listVirtualMachines.py -c mccp_admin --only-routers-to-be-upgraded --router-nic-count=2 --ignore-domains REMI,TEST | grep r- | cut -d| 
 -f7 | awk {'print "./upgradeRouterVM.py -c mccx_admin -r " $1 " >> " $1 ".log 2>&1 "'} > migrations.txt $ cat migrations.txt ./upgradeVirtualRouter.py -c mccx_admin -r r-192384-VM >> r-30656-VM.log 2>&1 ./upgradeVirtualRouter.py -c mccx_admin -r r-6228-VM >> r-6228-VM.log 2>&1 $ nohup cat migrations.txt | xargs -n 1 -P 10 -I {} bash -c {} 2>&1 >/dev/null & Migrations are sent to background and run in parallel (10 at a time). Make any selection here.
  • 26. @remibergsma Easy XenServer patching "xen_patching": { "patches": ["XS62ESP1013", "XS62ESP1014", "XS62ESP1017", "XS62ESP1020", "XS62ESP1026" ] },
  • 31. @remibergsma WhichVMs were running on that hypervisor that just crashed?
  • 32. @remibergsma Hypervisor down? $ ./listHAWorkers.py --mysqlserver dbserver1 --hostname mccxvm19 Welcome to CloudStackOps +------------------+--------------------+----------+---------------------+---------------+------------+ | VM | Type | VM state | Created (-2H) | Step | Mgt server | +------------------+--------------------+----------+---------------------+---------------+------------+ | Desktop | User | Stopped | 2015-03-14 18:57:29 | Scheduled | None | | vm123 | User | Running | 2015-03-14 18:57:30 | Done | xapp2 | | vm001 | User | Stopped | 2015-03-14 18:57:29 | Scheduled | None | | host1 | User | Running | 2015-03-14 18:57:30 | Investigating | None | | testing101 | User | Stopped | 2015-03-14 18:57:30 | Scheduled | None | | mobile | User | Stopped | 2015-03-14 18:57:28 | Scheduled | None | | mx | User | Running | 2015-03-14 18:57:29 | Done | xapp1 | | mobile222 | User | Running | 2015-03-14 18:57:29 | Done | xapp2 | | r-17845-VM | DomainRouter | Starting | 2015-03-14 18:57:29 | Scheduled | xapp1 | | r-17847-VM | DomainRouter | Starting | 2015-03-14 18:57:29 | Scheduled | xapp1 | +------------------+--------------------+----------+---------------------+---------------+------------+ Note: Found 10 HA workers. Here you can monitor the recovery of your VMs. Filtering on hostname is optional, but usually what you need.
  • 34. @remibergsma Running CloudStack jobs: $ ./listRunningJobs.py --mysqlserver dbserver1 Welcome to CloudStackOps +----------+----------------+-------------------------------------------------------------------+ | username | account_name | job_cmd | +----------+----------------+-------------------------------------------------------------------+ | system | rbergsma_admin | com.cloud.storage.VmWorkTakeVolumeSnapshot | | system | rbergsma_admin | com.cloud.storage.VmWorkTakeVolumeSnapshot | | system | rbergsma_admin | org.apache.cloudstack.api.command.user.snapshot.CreateSnapshotCmd | | system | rbergsma_admin | org.apache.cloudstack.api.command.user.snapshot.CreateSnapshotCmd | | system | system | com.cloud.vm.VmWorkStart | | system | system | com.cloud.vm.VmWorkStop | +----------+----------------+-------------------------------------------------------------------+ Note: Found 6 running jobs. Snapshots are being created…
  • 36. @remibergsma Getting started: $ git clone https://github.com/schubergphilis/cloudstackOps $ cd cloudstackOps $ cp -pr config.sample config $ vim config $ pip install -Iv marvin/Marvin-0.1.0.tar.gz $ pip install -Iv clint $ pip install -Iv prettytable # Config file for CloudStack Operations scripts [cloudstackOps] organization = The Iaas Team [mail] smtpserver = localhost mail_from = rbergsma@schubergphilis.com errors_to = rbergsma@schubergphilis.com [config] apikey = whMTYFZ…gqlETPEile4_A url = http://127.0.0.1:8080/client/api expires = 600 secretkey = 9Z0S5-ry…Qj-tVhkn9tFv1Q timeout = 3600 [dbserver1] password = mypass You can omit this section when using --config-profile
  • 37. Get in touch! blog.remibergsma.com @remibergsma remi@apache.org Follow me on Twitter. The slides have just been automatically posted.
  • 39. @remibergsma Credits Nexenta logo http://www.hpcwire.com/wp-content/uploads/2011/03/nexenta.png NetApp logo http://www.valuewalk.com/wp-content/uploads/2013/05/NetApp-logo.jpg Automation http://jewishcurrents.org/wp-content/uploads/2014/02/Firing-employees-and-hiring-robots- Minimum-wage-rise-to-spark-automation-age-says-All-Bake-Technologies_strict_xxl.jpg Knife http://www.vanslobbe.nl/assets/cache/img/normal_a_a_ae8170826274ac75ec1c99cc01a74ded.jpg Flag https://cdn4.iconfinder.com/data/icons/SUPERVISTA/business/png/400/checkered_flag.png Parallel swimmers http://wowpics.in/wp-content/uploads/2012/03/alicia.jpg Audit http://www.philexmining.com.ph/images/articles/1396260177_Audit_Hero.jpg Toolbox http://tripleseo.com/wp-content/uploads/2013/08/wooden_tool_box.jpg Magic http://globe-views.com/dcim/dreams/magic/magic-01.jpg Commodoties http://i.telegraph.co.uk/multimedia/archive/01870/basket_1870914b.jpg Bottles http://images.wisegeek.com/bottles-on-assembly-line.jpg 2012 http://www.zipconomy.nl/wp-content/uploads/2011/12/2012-markt-trends.jpg
  • 40. @remibergsma License This work is licensed under a Creative Commons Attribution- ShareAlike 4.0 International License.