Community
 
 
 

CloudPlatform 4.x

284 abonnés
 
Avatar
yesid Mora

API - CCP

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

 


3 commentaires
0

Vous devez vous connecter pour laisser un commentaire.

 
 

Previous 3 commentaires

Avatar
Pankaj Paliwal
Avatar

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


Michael Little MEMBERS
Actions pour les commentaires Permalien
Avatar
yesid Mora

Hello MIchael, thanks for your comments, is possible send me the example for single call with 30 vm's or a loop, thanks 


Actions pour les commentaires Permalien
Avatar
Erik Godin

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...


Actions pour les commentaires Permalien

Top Contributors