Page 1 of 1

Wish to script starting nodes in staggered fashion

Posted: Sun Jan 20, 2019 6:23 am
by nick.williams5
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):


Any help would be greatly appreciated!

Re: Wish to script starting nodes in staggered fashion

Posted: Sun Jan 20, 2019 8:39 am
by Uldis (UD)
Boot delay.
We always had such option in the EVE.
This feature is useful in conjunction with the “Start all nodes” function if your lab requires certain nodes to start up before others or to avoid a mass-start of very heavy nodes.

right click on node/edit and set delay time in seconds. It means that node after start, will trigger waiting time before boot.
your first 5 nodes in lab leave delay 0;
next 5 nodes set delay 300;
next 5 nodes set delay to 600.

First 5 nodes will start and boot immediately,
Next 5 nodes will start, but boot only after 5 mins. (300sec)
Next portion of 5 will start and boot after 10 mins. (600sec)

You can vary this delay time to achieve required result :)
BTW it is described in our cookbook as well.
Section table p17


Your lab:
delay 0
delay 300
delay 600

Re: Wish to script starting nodes in staggered fashion

Posted: Sun Jan 20, 2019 3:50 pm
by nick.williams5
Thank you much Uldis! This is even easier than what I was thinking.
I did look through the cookbook, but apparently not carefully enough :)