SlideShare a Scribd company logo
1 of 64
Download to read offline
Operating CloudStack:
sharing my
@remibergsma
ApacheCon North America	

April 13th, 2015	

Austin,TX
@remibergsma
Infrastructure-as-a-Service (IaaS).
What is Apache CloudStack?
@remibergsma
Remi Bergsma
I am
Engineer with a passion for automation.
@remibergsma
100%Functional uptime. Since 2001. By default.
@remibergsma
@remibergsma
@remibergsma
can be steered with an API
can grow organically
is more secure
and can be integrated with
our existing platforms.
Build an environment that:
@remibergsma
can be steered with an API
can grow organically
is more secure
and can be integrated with
our existing platforms.
Build an environment that:
“Oh and do not use anything
that we ever used before”
@remibergsma
Our new darlings:
co-creation
@remibergsma
100%Functional uptime. Still our solid base.
@remibergsma
Nexenta
XenServer!
6 node!
Cluster
2x Arista10gb/s
iLOM switch
XenServer!
6 node!
Cluster
PODs
DataCenter 1
Cross DataCenter Zone
High level design
Secondary
Storage
NSX nodes
(SDN)
On/Off ramp
Core network
Other gear
Neighbourhood rack
Nexenta
XenServer!
6 node!
Cluster
2x Arista10gb/s
iLOM switch
XenServer!
6 node!
Cluster
PODs
DataCenter 2
Secondary
Storage
NSX nodes
(SDN)
On/Off ramp
Core network
Other gear
Neighbourhood rack
fiber
@remibergsma
@remibergsma
@remibergsma
Delivered < 100%.
NexentaStor HA cluster shared storage
@remibergsma
Change of plans!
@remibergsma
XenServer 6.0.2
6 node
Cluster
XenServer 6.0.2
6 node
Cluster
Reconfigure while flying:
Nexenta POD
XenServer 6.0.2
6 node
Cluster
XenServer 6.0.2
6 node
Cluster
Nexenta POD
XenServer 6.2
6 node
Cluster
XenServer 6.2
6 node
Cluster
NetApp POD
XenServer 6.2
6 node
Cluster
XenServer 6.2
6 node
Cluster
NetApp POD
XenServer 6.2
6 node
Cluster
XenServer 6.2
6 node
Cluster
NetApp POD
XenServer 6.2
6 node
Cluster
XenServer 6.2
6 node
Cluster
NetApp POD
DataCenter 1 DataCenter 2
migrations migrations
VM
VM
VM
VM
VMVM
VMVM
VM
VM
VM
VM
VM VM
VM VM
VM
VMVMVM
VM VM
VM
VM
new deployments
@remibergsma
Automation!
@remibergsma
First things first: 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
We now know what 	

to migrate, but how to?
@remibergsma
(mccx) 🐵 > migrate virtualmachine virtualmachineid=xxx storageid=xxx	
Async job 1d686882-2cba-4461-938f-4cdc51e838fd failed	
Error 530, Data disks attached to the vm,
can not migrate. Need to dettach data disks at first	
cmd = org.apache.cloudstack.api.command.admin.vm.MigrateVMCmd
API cannot do it?
@remibergsma
@remibergsma
It can be done!
XenServer 6.0.2
!
Cluster
Nexenta POD
XenServer 6.2
!
Cluster
NetApp POD
VM migration
VM
i-12-345-VM
!
!
VM
DATA-xxx
Disk migrations!
ROOT-345
i-12-345-VM
!
!
DATA-xxx
ROOT-345
@remibergsma
Migrating aVM to a new cluster:
$ ./migrateVirtualMachine.py
!
--config-profile -c <profilename>
--vmname -n <name>
--instance-name -i <instancename>
--tocluster -t <clustername>
--is-projectvm
--debug
--exec
XenServer 6.0.2
!
Cluster
Nexenta POD
XenServer 6.2
!
Cluster
NetApp POD
migration
VMVM
@remibergsma
$ ./migrateVirtualMachine.py --config-profile mccx_admin 
--vmname tiny --tocluster MCCX-XEN-21
!
!
Welcome to CloudStackOps
Warning: dry-run mode is enabled, not running any commands!
Note: Found vm tiny running on mccxvm13
Warning: router service offering has empty storage tags.
Note: Not sending notification e-mails due to DRYRUN setting. Would have e-mailed
RBergsma@schubergphilis.com
Would have stopped vm tiny with id 6ad71aa2-d2c4-4a7a-a503-2baba8b36fe0
Note: No snapshots found for this volume.
Note: No snapshot schedules found for this volume.
Note: Would have migrated volume d6da7c31-e36e-4c58-b9af-8a08db1fde86 to storage
da22bd47-702c-3575-be99-9380b814001e
Note: Would have started vm tiny with id 6ad71aa2-d2c4-4a7a-a503-2baba8b36fe0 on
host b95af21a-7f26-4826-9cac-4cc8eaa61538
Note: We're done!
add --exec flag when DRYRUN was OK.
Migrating aVM to a new cluster:
@remibergsma
Dear Remi Bergsma,!
!
We completed migrating the VM 'tiny' that belongs to your domain
'rbergsma' to cluster ‘MCCX-XEN-21'!
. 

The instance id of this VM is 'i-625-30809-VM' and before
maintenance the state was 'Running'.!
!
Your VM has been started on the new cluster and should be up
again soon.!
!
Please contact us in case of any problems.!
Kind Regards, 



The Iaas Team
$ ./migrateVirtualMachine.py --config-profile mccx_admin 
--vmname tiny -t MCCX-XEN-21 --exec
!
Welcome to CloudStackOps
Note: Found vm tiny running on mccxvm13
Executing: stop virtualmachine tiny
Note: tiny is stopped successfully
Note: No snapshots found for this volume.
Note: No snapshot schedules found for this volume.
Executing: migrate volume d6da7c31-e36e-4c58-b9af-8a08db1fde86 to storage
da22bd47-702c-3575-be99-9380b814001e
Note: ROOT-30809 is migrated successfully
Note: No snapshot policies to restore.
Executing: start virtualmachine tiny with id 6ad71aa2-d2c4-4a7a-a503-2baba8b36fe0 on
host c45c2e0b-0de2-4931-9c2c-4af0d7a0a8cc
Note: tiny is started successfully
Note: We're done!
snapshot schedules are recreated after migration
Migrating aVM to a new cluster:
Dear Remi Bergsma, !
!
We are about to migrate the VM 'tiny' that belongs to your domain
'rbergsma' to cluster 'MCCX-XEN-21'. 

The instance id of this VM is 'i-625-30809-VM' and before
maintenance the state was ‘Running'.!
!
You will receive another e-mail when migration is complete. If the VM
was in 'Running' state, we will start it on the new cluster.!
Please contact us in case of any problems.!
!
Kind Regards, 



The Iaas Team
@remibergsma
Automating migrations.
$ ./listVirtualMachines.py --config-profile mccx_admin 
--oncluster MCCX-XEN-16 --no-summary | grep '-VM' | cut -d| -f7 |
awk {'print "./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i " $1'}
!
!
!
./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-555-192384-VM
./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-434-6228-VM
./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-225-17237-VM
./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-225-3722-VM
./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-722-24820-VM
./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-117-4543-VM
./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-527-20315-VM
./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-323-18225-VM
Both long and short argument names are supported
First make a selection..
Send results to other script for processing..
@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
XenServer 6.0.2
!
Cluster
Nexenta POD
XenServer 6.2
!
Cluster
NetApp POD
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
XenServer 6.0.2
!
Cluster
Nexenta POD
XenServer 6.2
!
Cluster
NetApp POD
migration
rVMrVM
@remibergsma
VMs and routerVMs
migrated away. 	

One thing left to do..
@remibergsma
Emptying the storage pool:
$ ./migrateOfflineVolumes.py --config-profile mccx_admin 
--oncluster MCCX-XEN-16 --to-cluster MCCX-XEN-21
!
!
!
!
!
Welcome to CloudStackOps
Note: dry-run mode is enabled, not running any commands!
Note: Ignore file 'ignore_volumes.txt' not found, so no volumes will be ignored.
Note: Overview of volumes to migrate to storage pool BETA-MCCX-XEN-16:
+-------------+---------------------+----------+--------------+------+------------+------------+
| Volume name | Attached to VM | Type | Volume state | Size | Account | Domain |
+-------------+---------------------+----------+--------------+------+------------+------------+
| DATA-23232 | None | DATADISK | Ready | 100 | rbergsma | rbergsma |
| ROOT-19447 | None | ROOT | Ready | 250 | rbergsma | rbergsma |
| ROOT-19350 | None | ROOT | Ready | 500 | rbergsma | rbergsma |
| ROOT-20150 | remitest | ROOT | Ready | 500 | rbergsma | rbergsma |
+-------------+---------------------+----------+--------------+------+------------+------------+
Total size of volumes to migrate: 1350 GB
Migrate offline volumes from one cluster to another.
@remibergsma
XenServer 6.0.2
6 node
Cluster
XenServer 6.0.2
6 node
Cluster
Migration done!
Nexenta POD
XenServer 6.0.2
6 node
Cluster
XenServer 6.0.2
6 node
Cluster
Nexenta POD
XenServer 6.2
6 node
Cluster
XenServer 6.2
6 node
Cluster
NetApp POD
XenServer 6.2
6 node
Cluster
XenServer 6.2
6 node
Cluster
NetApp POD
XenServer 6.2
6 node
Cluster
XenServer 6.2
6 node
Cluster
NetApp POD
XenServer 6.2
6 node
Cluster
XenServer 6.2
6 node
Cluster
NetApp POD
DataCenter 1 DataCenter 2
VMVM
VMVM
VM VM
VM VM
VM
VMVMVM
VM VM
VM
VM
new deployments
XenServer 6.2
6 node
Cluster
XenServer 6.2
6 node
Cluster
NetApp POD
VM
VM
VM
VM
XenServer 6.2
6 node
Cluster
XenServer 6.2
6 node
Cluster
NetApp POD
VM
VM
VM
VM
rebuild rebuild
@remibergsma
There’s more to automate..
@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.
@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 & "'} | 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 &
./upgradeVirtualRouter.py -c mccx_admin -r r-24820-VM >> r-24820-VM.log 2>&1 &
./upgradeVirtualRouter.py -c mccx_admin -r r-4543-VM >> r-4543-VM.log 2>&1 &
./upgradeVirtualRouter.py -c mccx_admin -r r-20315-VM >> r-20315-VM.log 2>&1 &
./upgradeVirtualRouter.py -c mccx_admin -r r-18225-VM >> r-18225-VM.log 2>&1 &
Migrations are sent to background and run in parallel.
automatic execution, use carefully (expecially with --exec)!
@remibergsma
Sequential vs Parallel
@remibergsma
XenServer maintenance
automation.
@remibergsma
XenServer maintenance:
$ ./hypervisorMaintenance.py --config-profile mccx_admin --name mccxvm13
!
Welcome to CloudStackOps
Warning: dry-run mode is enabled, not running any commands!
Note: Host 'mccxvm13' belongs to cluster 'MCCX-XEN-21'
Note: Looking for other hosts in this cluster and checking their health..
!
+----------+------------+----------------+-------+-------+-------------+------------------+
| Hostname | Poolmaster | Resource state | State | # VMs | Bond Status | Heartbeat Status |
+----------+------------+----------------+-------+-------+-------------+------------------+
| mccxvm13 | | Enabled | Up | 10 | OK | OK |
| mccxvm14 | <------ | Enabled | Up | 20 | OK | OK |
| mccxvm15 | | Enabled | Up | 108 | OK | OK |
| mccxvm16 | | Enabled | Up | 98 | OK | OK |
| mccxvm17 | | Enabled | Up | 107 | OK | OK |
| mccxvm18 | | Enabled | Up | 75 | OK | OK |
+----------+------------+----------------+-------+-------+-------------+------------------+
!
Note: Would have enabled maintenance for host 'mccxvm13'.
Note: Would have faked XenTools for VMs on host 'mccxvm13'.
Note: All resource states are 'Enabled', we can safely put one to maintenance
Note: Testing if we would be able to migrate the vm's on hypervisor 'mccxvm13':
oat-adm, oat-vm06, oat-vm07, oat-vm04, oat-vm08, oat-vm05, oat-vm03, oat-vm01, oat-vm02,
r-30657-VM,
Note: Would have prepared host 'mccxvm13' for maintenance
Note: We're done!
@remibergsma
XenServer maintenance:
Before:
+----------+------------+----------------+-------+-------+-------------+------------------+
| Hostname | Poolmaster | Resource state | State | # VMs | Bond Status | Heartbeat Status |
+----------+------------+----------------+-------+-------+-------------+------------------+
| mccxvm13 | | Enabled | Up | 10 | OK | OK |
| mccxvm14 | <------ | Enabled | Up | 20 | OK | OK |
| mccxvm15 | | Enabled | Up | 108 | OK | OK |
| mccxvm16 | | Enabled | Up | 98 | OK | OK |
| mccxvm17 | | Enabled | Up | 107 | OK | OK |
| mccxvm18 | | Enabled | Up | 75 | OK | OK |
+----------+------------+----------------+-------+-------+-------------+------------------+
!
After:
+----------+------------+----------------+-------+-------+-------------+------------------+
| Hostname | Poolmaster | Resource state | State | # VMs | Bond Status | Heartbeat Status |
+----------+------------+----------------+-------+-------+-------------+------------------+
| mccxvm13 | | Maintenance | Up | 0 | OK | OK |
| mccxvm14 | <------ | Enabled | Up | 25 | OK | OK |
| mccxvm15 | | Enabled | Up | 108 | OK | OK |
| mccxvm16 | | Enabled | Up | 98 | OK | OK |
| mccxvm17 | | Enabled | Up | 107 | OK | OK |
| mccxvm18 | | Enabled | Up | 80 | OK | OK |
+----------+------------+----------------+-------+-------+-------------+------------------+
@remibergsma
Help!	

Who uses this ip-address?
@remibergsma
Who uses this ip-address?
$ ./whoHasThisIp.py --mysqlserver dbserver1 --ip-address 31.32.81.18
!
Welcome to CloudStackOps
+------------+---------+-------------------+-------------+-----------------+--------+----------+
| VM name | Network | Mac Address | Ipv4 | Netmask | Mode | State |
+------------+---------+-------------------+-------------+-----------------+--------+----------+
| r-30657-VM | None | 06:3a:95:00:05:4e | 31.32.81.18 | 255.255.255.128 | Static | Reserved |
+------------+---------+-------------------+-------------+-----------------+--------+----------+
Note: Found 1 results.
$ ./whoHasThisIp.py --mysqlserver dbserver1 --ip-address 10.1.1.100
!
Welcome to CloudStackOps
+-----------+----------------+-------------------+------------+---------------+------+----------+
| VM name | Network Name | Mac Address | Ipv4 | Netmask | Mode | State |
+-----------+----------------+-------------------+------------+---------------+------+----------+
| www1 | some-default | 02:00:17:4b:00:3c | 10.1.1.100 | 255.255.255.0 | Dhcp | Reserved |
| oat-01 | oat-network | 02:00:2c:9f:00:05 | 10.1.1.100 | 255.255.255.0 | Dhcp | Reserved |
+-----------+----------------+-------------------+------------+---------------+------+----------+
Note: Found 2 results.
@remibergsma
WhichVMs were running
on that hypervisor that
just crashed?
@remibergsma
@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
Check. Double check..
@remibergsma
Reporting Admin Users:
$ ./reportAccounts.py --config-profile mccx_admin --display screen
!
Welcome to CloudStackOps
Overview for rbergsma (ROOT/Employee/rbergsma):
+----------------+----------+-----------------------------+-----------+----------+
| User Account | Username | E-mail | Firstname | Lastname |
+----------------+----------+-----------------------------+-----------+----------+
| rbergsma_admin | rbergsma | RBergsma@schubergphilis.com | Remi | Bergsma |
+----------------+----------+-----------------------------+-----------+----------+
Dear Remi Bergsma,!
!
This is an overview of the enabled admin users in your domain Employee/rbergsma:!
!
+----------------+----------+-----------------------------+-----------+----------+	
| User Account | Username | E-mail | Firstname | Lastname |	
+----------------+----------+-----------------------------+-----------+----------+	
| rbergsma_admin | rbergsma | RBergsma@schubergphilis.com | Remi | Bergsma |	
+----------------+----------+-----------------------------+-----------+----------+!
!
The domain path in CloudStack is Employee/rbergsma.!
Please review and adjust where applicable. In case of issues: please contact us via email@example.org.!
Kind Regards, 



The Iaas Team
$ ./reportAccounts.py --config-profile mccx_admin --display email
E-mail address is taken from CloudStack account
@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
Follow me on Twitter	

I will post the slides soon.
RBergsma@schubergphilis.com
@remibergsma
@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!
Keep calm http://sd.keepcalm-o-matic.co.uk/i/keep-calm-and-use-the-tool-kit.png!
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!
Summit http://i.ytimg.com/vi/n3YSU06k4BA/maxresdefault.jpg!
Stamp http://www.eccho.org/uploads/Original%20Stamp%20(transparent).png!
Commodoties http://i.telegraph.co.uk/multimedia/archive/01870/basket_1870914b.jpg!
Bottles http://images.wisegeek.com/bottles-on-assembly-line.jpg!
Copycat http://www.dailymobile.net/wp-content/uploads/2012/09/copycat.png
@remibergsma
License
This work is licensed under a Creative Commons Attribution-
ShareAlike 4.0 International License.

More Related Content

What's hot

How To Set Up SQL Load Balancing with HAProxy - Slides
How To Set Up SQL Load Balancing with HAProxy - SlidesHow To Set Up SQL Load Balancing with HAProxy - Slides
How To Set Up SQL Load Balancing with HAProxy - SlidesSeveralnines
 
Building a Production Grade PostgreSQL Cloud Foundry Service | anynines
Building a Production Grade PostgreSQL Cloud Foundry Service  | anyninesBuilding a Production Grade PostgreSQL Cloud Foundry Service  | anynines
Building a Production Grade PostgreSQL Cloud Foundry Service | anyninesanynines GmbH
 
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
 
Switch as a Server - PuppetConf 2014 - Leslie Carr
Switch as a Server - PuppetConf 2014 - Leslie CarrSwitch as a Server - PuppetConf 2014 - Leslie Carr
Switch as a Server - PuppetConf 2014 - Leslie CarrCumulus Networks
 
Percona and Continuent present: Multi-Data Center MySQL with Continuent Tungsten
Percona and Continuent present: Multi-Data Center MySQL with Continuent TungstenPercona and Continuent present: Multi-Data Center MySQL with Continuent Tungsten
Percona and Continuent present: Multi-Data Center MySQL with Continuent TungstenContinuent
 
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
 
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
 
CKA(Kubernetes 자격증) 잘 준비하는 법_
CKA(Kubernetes 자격증) 잘 준비하는 법_CKA(Kubernetes 자격증) 잘 준비하는 법_
CKA(Kubernetes 자격증) 잘 준비하는 법_InfraEngineer
 
Rabbit mq簡介(上)
Rabbit mq簡介(上)Rabbit mq簡介(上)
Rabbit mq簡介(上)共和 薛
 
Ansible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration ManagementAnsible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration ManagementShapeBlue
 
Bridging and its use in KVM
Bridging and its use in KVMBridging and its use in KVM
Bridging and its use in KVMSaravana Kumar
 
AWS May Webinar Series - Deep Dive: Amazon Virtual Private Cloud
AWS May Webinar Series - Deep Dive: Amazon Virtual Private CloudAWS May Webinar Series - Deep Dive: Amazon Virtual Private Cloud
AWS May Webinar Series - Deep Dive: Amazon Virtual Private CloudAmazon Web Services
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011Mike Willbanks
 
Deep Dive: Amazon Virtual Private Cloud
Deep Dive: Amazon Virtual Private CloudDeep Dive: Amazon Virtual Private Cloud
Deep Dive: Amazon Virtual Private CloudAmazon Web Services
 
Deep Dive: Amazon Virtual Private Cloud
Deep Dive: Amazon Virtual Private CloudDeep Dive: Amazon Virtual Private Cloud
Deep Dive: Amazon Virtual Private CloudAmazon Web Services
 
Anton Moldovan "Building an efficient replication system for thousands of ter...
Anton Moldovan "Building an efficient replication system for thousands of ter...Anton Moldovan "Building an efficient replication system for thousands of ter...
Anton Moldovan "Building an efficient replication system for thousands of ter...Fwdays
 

What's hot (20)

How To Set Up SQL Load Balancing with HAProxy - Slides
How To Set Up SQL Load Balancing with HAProxy - SlidesHow To Set Up SQL Load Balancing with HAProxy - Slides
How To Set Up SQL Load Balancing with HAProxy - Slides
 
Building a Production Grade PostgreSQL Cloud Foundry Service | anynines
Building a Production Grade PostgreSQL Cloud Foundry Service  | anyninesBuilding a Production Grade PostgreSQL Cloud Foundry Service  | anynines
Building a Production Grade PostgreSQL Cloud Foundry Service | anynines
 
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
 
Switch as a Server - PuppetConf 2014 - Leslie Carr
Switch as a Server - PuppetConf 2014 - Leslie CarrSwitch as a Server - PuppetConf 2014 - Leslie Carr
Switch as a Server - PuppetConf 2014 - Leslie Carr
 
Percona and Continuent present: Multi-Data Center MySQL with Continuent Tungsten
Percona and Continuent present: Multi-Data Center MySQL with Continuent TungstenPercona and Continuent present: Multi-Data Center MySQL with Continuent Tungsten
Percona and Continuent present: Multi-Data Center MySQL with Continuent Tungsten
 
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
 
ReplacingSquidWithATS
ReplacingSquidWithATSReplacingSquidWithATS
ReplacingSquidWithATS
 
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
 
CKA(Kubernetes 자격증) 잘 준비하는 법_
CKA(Kubernetes 자격증) 잘 준비하는 법_CKA(Kubernetes 자격증) 잘 준비하는 법_
CKA(Kubernetes 자격증) 잘 준비하는 법_
 
Rabbit mq簡介(上)
Rabbit mq簡介(上)Rabbit mq簡介(上)
Rabbit mq簡介(上)
 
How to monitor NGINX
How to monitor NGINXHow to monitor NGINX
How to monitor NGINX
 
Ansible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration ManagementAnsible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration Management
 
Bridging and its use in KVM
Bridging and its use in KVMBridging and its use in KVM
Bridging and its use in KVM
 
AWS May Webinar Series - Deep Dive: Amazon Virtual Private Cloud
AWS May Webinar Series - Deep Dive: Amazon Virtual Private CloudAWS May Webinar Series - Deep Dive: Amazon Virtual Private Cloud
AWS May Webinar Series - Deep Dive: Amazon Virtual Private Cloud
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011
 
Deep Dive: Amazon Virtual Private Cloud
Deep Dive: Amazon Virtual Private CloudDeep Dive: Amazon Virtual Private Cloud
Deep Dive: Amazon Virtual Private Cloud
 
Oscon 2010 - ATS
Oscon 2010 - ATSOscon 2010 - ATS
Oscon 2010 - ATS
 
Deep Dive: Amazon Virtual Private Cloud
Deep Dive: Amazon Virtual Private CloudDeep Dive: Amazon Virtual Private Cloud
Deep Dive: Amazon Virtual Private Cloud
 
Anton Moldovan "Building an efficient replication system for thousands of ter...
Anton Moldovan "Building an efficient replication system for thousands of ter...Anton Moldovan "Building an efficient replication system for thousands of ter...
Anton Moldovan "Building an efficient replication system for thousands of ter...
 
Usenix lisa 2011
Usenix lisa 2011Usenix lisa 2011
Usenix lisa 2011
 

Similar to Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15

Cinder Live Migration and Replication - OpenStack Summit Austin
Cinder Live Migration and Replication - OpenStack Summit AustinCinder Live Migration and Replication - OpenStack Summit Austin
Cinder Live Migration and Replication - OpenStack Summit AustinEd Balduf
 
在Oel5上安装配置oracle gird control 10.2.0.5
在Oel5上安装配置oracle gird control 10.2.0.5在Oel5上安装配置oracle gird control 10.2.0.5
在Oel5上安装配置oracle gird control 10.2.0.5maclean liu
 
CloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and TroubleshootingCloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and TroubleshootingShapeBlue
 
Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Santosh Kangane
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
Building cloud stack at scale
Building cloud stack at scaleBuilding cloud stack at scale
Building cloud stack at scaleShapeBlue
 
The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016effie mouzeli
 
DockerCon14 Performance Characteristics of Traditional VMs vs. Docker Containers
DockerCon14 Performance Characteristics of Traditional VMs vs. Docker ContainersDockerCon14 Performance Characteristics of Traditional VMs vs. Docker Containers
DockerCon14 Performance Characteristics of Traditional VMs vs. Docker ContainersDocker, Inc.
 
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Wim Godden
 
Codemotion Rome 2018 Docker Swarm Mode
Codemotion Rome 2018 Docker Swarm ModeCodemotion Rome 2018 Docker Swarm Mode
Codemotion Rome 2018 Docker Swarm ModeSimone Soldateschi
 
An Ensemble Core with Docker - Solving a Real Pain in the PaaS
An Ensemble Core with Docker - Solving a Real Pain in the PaaS An Ensemble Core with Docker - Solving a Real Pain in the PaaS
An Ensemble Core with Docker - Solving a Real Pain in the PaaS Erik Osterman
 
RAC-Installing your First Cluster and Database
RAC-Installing your First Cluster and DatabaseRAC-Installing your First Cluster and Database
RAC-Installing your First Cluster and DatabaseNikhil Kumar
 
Advanced percona xtra db cluster in a nutshell... la suite plsc2016
Advanced percona xtra db cluster in a nutshell... la suite plsc2016Advanced percona xtra db cluster in a nutshell... la suite plsc2016
Advanced percona xtra db cluster in a nutshell... la suite plsc2016Frederic Descamps
 
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...NETWAYS
 
Building virtualised CloudStack test environments
Building virtualised CloudStack test environmentsBuilding virtualised CloudStack test environments
Building virtualised CloudStack test environmentsShapeBlue
 
Trouble shooting apachecloudstack
Trouble shooting apachecloudstackTrouble shooting apachecloudstack
Trouble shooting apachecloudstackSailaja Sunil
 
Replatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with MinecraftReplatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with MinecraftVMware Tanzu
 
HPC Cloud: Clouds on supercomputers for HPC
HPC Cloud: Clouds on supercomputers for HPCHPC Cloud: Clouds on supercomputers for HPC
HPC Cloud: Clouds on supercomputers for HPCRyousei Takano
 
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski buildacloud
 
Securing the network for VMs or Containers
Securing the network for VMs or ContainersSecuring the network for VMs or Containers
Securing the network for VMs or ContainersMarian Marinov
 

Similar to Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15 (20)

Cinder Live Migration and Replication - OpenStack Summit Austin
Cinder Live Migration and Replication - OpenStack Summit AustinCinder Live Migration and Replication - OpenStack Summit Austin
Cinder Live Migration and Replication - OpenStack Summit Austin
 
在Oel5上安装配置oracle gird control 10.2.0.5
在Oel5上安装配置oracle gird control 10.2.0.5在Oel5上安装配置oracle gird control 10.2.0.5
在Oel5上安装配置oracle gird control 10.2.0.5
 
CloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and TroubleshootingCloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and Troubleshooting
 
Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Building cloud stack at scale
Building cloud stack at scaleBuilding cloud stack at scale
Building cloud stack at scale
 
The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016
 
DockerCon14 Performance Characteristics of Traditional VMs vs. Docker Containers
DockerCon14 Performance Characteristics of Traditional VMs vs. Docker ContainersDockerCon14 Performance Characteristics of Traditional VMs vs. Docker Containers
DockerCon14 Performance Characteristics of Traditional VMs vs. Docker Containers
 
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012
 
Codemotion Rome 2018 Docker Swarm Mode
Codemotion Rome 2018 Docker Swarm ModeCodemotion Rome 2018 Docker Swarm Mode
Codemotion Rome 2018 Docker Swarm Mode
 
An Ensemble Core with Docker - Solving a Real Pain in the PaaS
An Ensemble Core with Docker - Solving a Real Pain in the PaaS An Ensemble Core with Docker - Solving a Real Pain in the PaaS
An Ensemble Core with Docker - Solving a Real Pain in the PaaS
 
RAC-Installing your First Cluster and Database
RAC-Installing your First Cluster and DatabaseRAC-Installing your First Cluster and Database
RAC-Installing your First Cluster and Database
 
Advanced percona xtra db cluster in a nutshell... la suite plsc2016
Advanced percona xtra db cluster in a nutshell... la suite plsc2016Advanced percona xtra db cluster in a nutshell... la suite plsc2016
Advanced percona xtra db cluster in a nutshell... la suite plsc2016
 
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
 
Building virtualised CloudStack test environments
Building virtualised CloudStack test environmentsBuilding virtualised CloudStack test environments
Building virtualised CloudStack test environments
 
Trouble shooting apachecloudstack
Trouble shooting apachecloudstackTrouble shooting apachecloudstack
Trouble shooting apachecloudstack
 
Replatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with MinecraftReplatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with Minecraft
 
HPC Cloud: Clouds on supercomputers for HPC
HPC Cloud: Clouds on supercomputers for HPCHPC Cloud: Clouds on supercomputers for HPC
HPC Cloud: Clouds on supercomputers for HPC
 
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
 
Securing the network for VMs or Containers
Securing the network for VMs or ContainersSecuring the network for VMs or Containers
Securing the network for VMs or Containers
 

Recently uploaded

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Operating CloudStack: Sharing My Tool Box @ApacheCon NA'15

  • 1. Operating CloudStack: sharing my @remibergsma ApacheCon North America April 13th, 2015 Austin,TX
  • 3. @remibergsma Remi Bergsma I am Engineer with a passion for automation.
  • 7. @remibergsma can be steered with an API can grow organically is more secure and can be integrated with our existing platforms. Build an environment that:
  • 8. @remibergsma can be steered with an API can grow organically is more secure and can be integrated with our existing platforms. Build an environment that: “Oh and do not use anything that we ever used before”
  • 11. @remibergsma Nexenta XenServer! 6 node! Cluster 2x Arista10gb/s iLOM switch XenServer! 6 node! Cluster PODs DataCenter 1 Cross DataCenter Zone High level design Secondary Storage NSX nodes (SDN) On/Off ramp Core network Other gear Neighbourhood rack Nexenta XenServer! 6 node! Cluster 2x Arista10gb/s iLOM switch XenServer! 6 node! Cluster PODs DataCenter 2 Secondary Storage NSX nodes (SDN) On/Off ramp Core network Other gear Neighbourhood rack fiber
  • 14. @remibergsma Delivered < 100%. NexentaStor HA cluster shared storage
  • 16. @remibergsma XenServer 6.0.2 6 node Cluster XenServer 6.0.2 6 node Cluster Reconfigure while flying: Nexenta POD XenServer 6.0.2 6 node Cluster XenServer 6.0.2 6 node Cluster Nexenta POD XenServer 6.2 6 node Cluster XenServer 6.2 6 node Cluster NetApp POD XenServer 6.2 6 node Cluster XenServer 6.2 6 node Cluster NetApp POD XenServer 6.2 6 node Cluster XenServer 6.2 6 node Cluster NetApp POD XenServer 6.2 6 node Cluster XenServer 6.2 6 node Cluster NetApp POD DataCenter 1 DataCenter 2 migrations migrations VM VM VM VM VMVM VMVM VM VM VM VM VM VM VM VM VM VMVMVM VM VM VM VM new deployments
  • 19. @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..
  • 20. @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
  • 21. @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
  • 22. @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
  • 23. @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 ;-)
  • 25. @remibergsma We now know what to migrate, but how to?
  • 26. @remibergsma (mccx) 🐵 > migrate virtualmachine virtualmachineid=xxx storageid=xxx Async job 1d686882-2cba-4461-938f-4cdc51e838fd failed Error 530, Data disks attached to the vm, can not migrate. Need to dettach data disks at first cmd = org.apache.cloudstack.api.command.admin.vm.MigrateVMCmd API cannot do it?
  • 28. @remibergsma It can be done! XenServer 6.0.2 ! Cluster Nexenta POD XenServer 6.2 ! Cluster NetApp POD VM migration VM i-12-345-VM ! ! VM DATA-xxx Disk migrations! ROOT-345 i-12-345-VM ! ! DATA-xxx ROOT-345
  • 29. @remibergsma Migrating aVM to a new cluster: $ ./migrateVirtualMachine.py ! --config-profile -c <profilename> --vmname -n <name> --instance-name -i <instancename> --tocluster -t <clustername> --is-projectvm --debug --exec XenServer 6.0.2 ! Cluster Nexenta POD XenServer 6.2 ! Cluster NetApp POD migration VMVM
  • 30. @remibergsma $ ./migrateVirtualMachine.py --config-profile mccx_admin --vmname tiny --tocluster MCCX-XEN-21 ! ! Welcome to CloudStackOps Warning: dry-run mode is enabled, not running any commands! Note: Found vm tiny running on mccxvm13 Warning: router service offering has empty storage tags. Note: Not sending notification e-mails due to DRYRUN setting. Would have e-mailed RBergsma@schubergphilis.com Would have stopped vm tiny with id 6ad71aa2-d2c4-4a7a-a503-2baba8b36fe0 Note: No snapshots found for this volume. Note: No snapshot schedules found for this volume. Note: Would have migrated volume d6da7c31-e36e-4c58-b9af-8a08db1fde86 to storage da22bd47-702c-3575-be99-9380b814001e Note: Would have started vm tiny with id 6ad71aa2-d2c4-4a7a-a503-2baba8b36fe0 on host b95af21a-7f26-4826-9cac-4cc8eaa61538 Note: We're done! add --exec flag when DRYRUN was OK. Migrating aVM to a new cluster:
  • 31. @remibergsma Dear Remi Bergsma,! ! We completed migrating the VM 'tiny' that belongs to your domain 'rbergsma' to cluster ‘MCCX-XEN-21'! . 
 The instance id of this VM is 'i-625-30809-VM' and before maintenance the state was 'Running'.! ! Your VM has been started on the new cluster and should be up again soon.! ! Please contact us in case of any problems.! Kind Regards, 
 
 The Iaas Team $ ./migrateVirtualMachine.py --config-profile mccx_admin --vmname tiny -t MCCX-XEN-21 --exec ! Welcome to CloudStackOps Note: Found vm tiny running on mccxvm13 Executing: stop virtualmachine tiny Note: tiny is stopped successfully Note: No snapshots found for this volume. Note: No snapshot schedules found for this volume. Executing: migrate volume d6da7c31-e36e-4c58-b9af-8a08db1fde86 to storage da22bd47-702c-3575-be99-9380b814001e Note: ROOT-30809 is migrated successfully Note: No snapshot policies to restore. Executing: start virtualmachine tiny with id 6ad71aa2-d2c4-4a7a-a503-2baba8b36fe0 on host c45c2e0b-0de2-4931-9c2c-4af0d7a0a8cc Note: tiny is started successfully Note: We're done! snapshot schedules are recreated after migration Migrating aVM to a new cluster: Dear Remi Bergsma, ! ! We are about to migrate the VM 'tiny' that belongs to your domain 'rbergsma' to cluster 'MCCX-XEN-21'. 
 The instance id of this VM is 'i-625-30809-VM' and before maintenance the state was ‘Running'.! ! You will receive another e-mail when migration is complete. If the VM was in 'Running' state, we will start it on the new cluster.! Please contact us in case of any problems.! ! Kind Regards, 
 
 The Iaas Team
  • 32. @remibergsma Automating migrations. $ ./listVirtualMachines.py --config-profile mccx_admin --oncluster MCCX-XEN-16 --no-summary | grep '-VM' | cut -d| -f7 | awk {'print "./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i " $1'} ! ! ! ./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-555-192384-VM ./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-434-6228-VM ./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-225-17237-VM ./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-225-3722-VM ./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-722-24820-VM ./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-117-4543-VM ./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-527-20315-VM ./migrateVirtualMachine.py -c mccx_admin -t MCCX-XEN-21 -i i-323-18225-VM Both long and short argument names are supported First make a selection.. Send results to other script for processing..
  • 34. @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
  • 36. @remibergsma XenServer 6.0.2 ! Cluster Nexenta POD XenServer 6.2 ! Cluster NetApp POD rVM migration rVM r-1234-VM rVM ROOT-1234 ROOT disk migration r-1234-VM ROOT-1234 It can be done!
  • 37. @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 XenServer 6.0.2 ! Cluster Nexenta POD XenServer 6.2 ! Cluster NetApp POD migration rVMrVM
  • 38. @remibergsma VMs and routerVMs migrated away. One thing left to do..
  • 39. @remibergsma Emptying the storage pool: $ ./migrateOfflineVolumes.py --config-profile mccx_admin --oncluster MCCX-XEN-16 --to-cluster MCCX-XEN-21 ! ! ! ! ! Welcome to CloudStackOps Note: dry-run mode is enabled, not running any commands! Note: Ignore file 'ignore_volumes.txt' not found, so no volumes will be ignored. Note: Overview of volumes to migrate to storage pool BETA-MCCX-XEN-16: +-------------+---------------------+----------+--------------+------+------------+------------+ | Volume name | Attached to VM | Type | Volume state | Size | Account | Domain | +-------------+---------------------+----------+--------------+------+------------+------------+ | DATA-23232 | None | DATADISK | Ready | 100 | rbergsma | rbergsma | | ROOT-19447 | None | ROOT | Ready | 250 | rbergsma | rbergsma | | ROOT-19350 | None | ROOT | Ready | 500 | rbergsma | rbergsma | | ROOT-20150 | remitest | ROOT | Ready | 500 | rbergsma | rbergsma | +-------------+---------------------+----------+--------------+------+------------+------------+ Total size of volumes to migrate: 1350 GB Migrate offline volumes from one cluster to another.
  • 40. @remibergsma XenServer 6.0.2 6 node Cluster XenServer 6.0.2 6 node Cluster Migration done! Nexenta POD XenServer 6.0.2 6 node Cluster XenServer 6.0.2 6 node Cluster Nexenta POD XenServer 6.2 6 node Cluster XenServer 6.2 6 node Cluster NetApp POD XenServer 6.2 6 node Cluster XenServer 6.2 6 node Cluster NetApp POD XenServer 6.2 6 node Cluster XenServer 6.2 6 node Cluster NetApp POD XenServer 6.2 6 node Cluster XenServer 6.2 6 node Cluster NetApp POD DataCenter 1 DataCenter 2 VMVM VMVM VM VM VM VM VM VMVMVM VM VM VM VM new deployments XenServer 6.2 6 node Cluster XenServer 6.2 6 node Cluster NetApp POD VM VM VM VM XenServer 6.2 6 node Cluster XenServer 6.2 6 node Cluster NetApp POD VM VM VM VM rebuild rebuild
  • 43. @remibergsma Upgrading a router: $ ./upgradeRouterVM.py ! ! --config-profile -c <profilename> --routerinstance-name -r <instancename> --is-projectrouter --debug --exec
  • 44. @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.
  • 45. @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 & "'} | 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 & ./upgradeVirtualRouter.py -c mccx_admin -r r-24820-VM >> r-24820-VM.log 2>&1 & ./upgradeVirtualRouter.py -c mccx_admin -r r-4543-VM >> r-4543-VM.log 2>&1 & ./upgradeVirtualRouter.py -c mccx_admin -r r-20315-VM >> r-20315-VM.log 2>&1 & ./upgradeVirtualRouter.py -c mccx_admin -r r-18225-VM >> r-18225-VM.log 2>&1 & Migrations are sent to background and run in parallel. automatic execution, use carefully (expecially with --exec)!
  • 48. @remibergsma XenServer maintenance: $ ./hypervisorMaintenance.py --config-profile mccx_admin --name mccxvm13 ! Welcome to CloudStackOps Warning: dry-run mode is enabled, not running any commands! Note: Host 'mccxvm13' belongs to cluster 'MCCX-XEN-21' Note: Looking for other hosts in this cluster and checking their health.. ! +----------+------------+----------------+-------+-------+-------------+------------------+ | Hostname | Poolmaster | Resource state | State | # VMs | Bond Status | Heartbeat Status | +----------+------------+----------------+-------+-------+-------------+------------------+ | mccxvm13 | | Enabled | Up | 10 | OK | OK | | mccxvm14 | <------ | Enabled | Up | 20 | OK | OK | | mccxvm15 | | Enabled | Up | 108 | OK | OK | | mccxvm16 | | Enabled | Up | 98 | OK | OK | | mccxvm17 | | Enabled | Up | 107 | OK | OK | | mccxvm18 | | Enabled | Up | 75 | OK | OK | +----------+------------+----------------+-------+-------+-------------+------------------+ ! Note: Would have enabled maintenance for host 'mccxvm13'. Note: Would have faked XenTools for VMs on host 'mccxvm13'. Note: All resource states are 'Enabled', we can safely put one to maintenance Note: Testing if we would be able to migrate the vm's on hypervisor 'mccxvm13': oat-adm, oat-vm06, oat-vm07, oat-vm04, oat-vm08, oat-vm05, oat-vm03, oat-vm01, oat-vm02, r-30657-VM, Note: Would have prepared host 'mccxvm13' for maintenance Note: We're done!
  • 49. @remibergsma XenServer maintenance: Before: +----------+------------+----------------+-------+-------+-------------+------------------+ | Hostname | Poolmaster | Resource state | State | # VMs | Bond Status | Heartbeat Status | +----------+------------+----------------+-------+-------+-------------+------------------+ | mccxvm13 | | Enabled | Up | 10 | OK | OK | | mccxvm14 | <------ | Enabled | Up | 20 | OK | OK | | mccxvm15 | | Enabled | Up | 108 | OK | OK | | mccxvm16 | | Enabled | Up | 98 | OK | OK | | mccxvm17 | | Enabled | Up | 107 | OK | OK | | mccxvm18 | | Enabled | Up | 75 | OK | OK | +----------+------------+----------------+-------+-------+-------------+------------------+ ! After: +----------+------------+----------------+-------+-------+-------------+------------------+ | Hostname | Poolmaster | Resource state | State | # VMs | Bond Status | Heartbeat Status | +----------+------------+----------------+-------+-------+-------------+------------------+ | mccxvm13 | | Maintenance | Up | 0 | OK | OK | | mccxvm14 | <------ | Enabled | Up | 25 | OK | OK | | mccxvm15 | | Enabled | Up | 108 | OK | OK | | mccxvm16 | | Enabled | Up | 98 | OK | OK | | mccxvm17 | | Enabled | Up | 107 | OK | OK | | mccxvm18 | | Enabled | Up | 80 | OK | OK | +----------+------------+----------------+-------+-------+-------------+------------------+
  • 51. @remibergsma Who uses this ip-address? $ ./whoHasThisIp.py --mysqlserver dbserver1 --ip-address 31.32.81.18 ! Welcome to CloudStackOps +------------+---------+-------------------+-------------+-----------------+--------+----------+ | VM name | Network | Mac Address | Ipv4 | Netmask | Mode | State | +------------+---------+-------------------+-------------+-----------------+--------+----------+ | r-30657-VM | None | 06:3a:95:00:05:4e | 31.32.81.18 | 255.255.255.128 | Static | Reserved | +------------+---------+-------------------+-------------+-----------------+--------+----------+ Note: Found 1 results. $ ./whoHasThisIp.py --mysqlserver dbserver1 --ip-address 10.1.1.100 ! Welcome to CloudStackOps +-----------+----------------+-------------------+------------+---------------+------+----------+ | VM name | Network Name | Mac Address | Ipv4 | Netmask | Mode | State | +-----------+----------------+-------------------+------------+---------------+------+----------+ | www1 | some-default | 02:00:17:4b:00:3c | 10.1.1.100 | 255.255.255.0 | Dhcp | Reserved | | oat-01 | oat-network | 02:00:2c:9f:00:05 | 10.1.1.100 | 255.255.255.0 | Dhcp | Reserved | +-----------+----------------+-------------------+------------+---------------+------+----------+ Note: Found 2 results.
  • 52. @remibergsma WhichVMs were running on that hypervisor that just crashed?
  • 54. @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.
  • 56. @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…
  • 58. @remibergsma Reporting Admin Users: $ ./reportAccounts.py --config-profile mccx_admin --display screen ! Welcome to CloudStackOps Overview for rbergsma (ROOT/Employee/rbergsma): +----------------+----------+-----------------------------+-----------+----------+ | User Account | Username | E-mail | Firstname | Lastname | +----------------+----------+-----------------------------+-----------+----------+ | rbergsma_admin | rbergsma | RBergsma@schubergphilis.com | Remi | Bergsma | +----------------+----------+-----------------------------+-----------+----------+ Dear Remi Bergsma,! ! This is an overview of the enabled admin users in your domain Employee/rbergsma:! ! +----------------+----------+-----------------------------+-----------+----------+ | User Account | Username | E-mail | Firstname | Lastname | +----------------+----------+-----------------------------+-----------+----------+ | rbergsma_admin | rbergsma | RBergsma@schubergphilis.com | Remi | Bergsma | +----------------+----------+-----------------------------+-----------+----------+! ! The domain path in CloudStack is Employee/rbergsma.! Please review and adjust where applicable. In case of issues: please contact us via email@example.org.! Kind Regards, 
 
 The Iaas Team $ ./reportAccounts.py --config-profile mccx_admin --display email E-mail address is taken from CloudStack account
  • 60. @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
  • 61. Get in touch! blog.remibergsma.com Follow me on Twitter I will post the slides soon. RBergsma@schubergphilis.com @remibergsma
  • 63. @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! Keep calm http://sd.keepcalm-o-matic.co.uk/i/keep-calm-and-use-the-tool-kit.png! 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! Summit http://i.ytimg.com/vi/n3YSU06k4BA/maxresdefault.jpg! Stamp http://www.eccho.org/uploads/Original%20Stamp%20(transparent).png! Commodoties http://i.telegraph.co.uk/multimedia/archive/01870/basket_1870914b.jpg! Bottles http://images.wisegeek.com/bottles-on-assembly-line.jpg! Copycat http://www.dailymobile.net/wp-content/uploads/2012/09/copycat.png
  • 64. @remibergsma License This work is licensed under a Creative Commons Attribution- ShareAlike 4.0 International License.