- This topic has 2 replies, 3 voices, and was last updated 1 week, 1 day ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forums › FABRIC General Questions and Discussion › How to automate a script that creates a slice, deploys 2 VMs on different sites
Tagged: auto ping iperf
Hi everyone,
I’m trying to automate a network test between two virtual machines located on different FABRIC sites. I’d like to have a single script that performs the following steps automatically:
Creates a slice.
Deploys two VMs on two different sites.
Automatically connects to each VM.
Runs a ping between them to measure latency.
Runs an iperf test to measure bandwidth.
In addition, I’d like this script to run automatically once or twice per week, like a scheduled test, without manual intervention. Ideally, the script should handle everything end-to-end (including SSH connections, command execution, etc.).
What’s the best way to approach this using FABRIC tools? Is there an example using FABlib or another recommended method to do this kind of scheduled test?
Thanks in advance for your help!
Hi Bohdan,
Yes, with FABlib you can create your slice with the VMs and the networking needed. Also your script needs to have a time dependent function that performs the test at the intervals you specify using addresses of the nodes you created earlier. You can save the results in the FABRIC nodes or scp them to your local computer as well.
I am not sure there is such an example script, if that is what you are asking though.
Step 1-5 are easy to do.
I’d like this script to run automatically once or twice per week
This is the difficult part.
I believe it’s impossible within JupyterHub, because the container shuts down after an hour.
It should be possible to install FABlib on your own server and invoke a script that does step 1-5 via crontab.
This then requires you obtain a long-lived authentication token, and then it’s set-and-forget until the token expires.