Wish to script starting nodes in staggered fashion
Posted: Sun Jan 20, 2019 6:23 am
First, I spent quite a bit of time looking for an answer before posting here, but I have no experience with what is going on under the hood with EVE-NG. It seems that what I want to do must be possible with the REST API, but I could be barking up the wrong tree entirely.
I have a topology with 14 nodes (10 routers + 4 switches) running on an EVE-NG instance with 6 vCPUs. If I try to start everything at once, it takes *forever* to boot everything. If I boot up the devices in three groups (5 routers + 5 routers + 4 switches), waiting for the previous group to finish, then the lab starts up no problem and performs just fine. Throwing more vCPUs at the problem does "fix" it, but it seems wasteful to pay for more vCPUs just to make booting the lab more convenient (I am using Google Compute).
How can I script EVE-NG to boot up a group of nodes, wait for some specified amount of time, then boot up another group, etc.? It'd be really nice to just run a script and come back when my lab is ready to go instead of coming back to start up more nodes every 5 minutes or so.
I am imagining something like this (pseudocode):
boot.nodes(1,2,3,4,5)
sleep(300)
boot.nodes(6,7,8,9,10)
sleep(300)
boot.nodes(11,12,13,14)
Any help would be greatly appreciated!
I have a topology with 14 nodes (10 routers + 4 switches) running on an EVE-NG instance with 6 vCPUs. If I try to start everything at once, it takes *forever* to boot everything. If I boot up the devices in three groups (5 routers + 5 routers + 4 switches), waiting for the previous group to finish, then the lab starts up no problem and performs just fine. Throwing more vCPUs at the problem does "fix" it, but it seems wasteful to pay for more vCPUs just to make booting the lab more convenient (I am using Google Compute).
How can I script EVE-NG to boot up a group of nodes, wait for some specified amount of time, then boot up another group, etc.? It'd be really nice to just run a script and come back when my lab is ready to go instead of coming back to start up more nodes every 5 minutes or so.
I am imagining something like this (pseudocode):
boot.nodes(1,2,3,4,5)
sleep(300)
boot.nodes(6,7,8,9,10)
sleep(300)
boot.nodes(11,12,13,14)
Any help would be greatly appreciated!