API - CCP
Launching a VM, via the API, is an asynchronous operation. Would a simple counting loop suffice, or do you need to launch all 30 with a single call?
--Mike
Hello, I need launch 30 VM's for API but I need in the same command, please inform how structure the command or please send me the commands, I test launch for a one VM but no many VM's, help me, thanks
Launching a VM, via the API, is an asynchronous operation. Would a simple counting loop suffice, or do you need to launch all 30 with a single call?
--Mike
from a bash shell which has acccess to the API you can create a loop which will provision one VM at a time:
for i in $(seq 1 1 30); do curl "http://localhost:XXXX/api?BLAHBLAHBLAH"; done;
Whenever you have to provide a uniq name for a component, use compent-$i or something similar. Replacing the BLAHBLAHBLAH for the actual string which will deploy your VM, you could define the VM name as "vm-$i" so your VMs would be named "vm-1", "vm-2", "vm-3", etc...
Ask, Discuss, Answer