Open nchammas opened 8 years ago
After some investigation, I think we'll have to implement our own progress indicator.
First, we don't need a bar. A counter for each stage will do:
Instance running 4/4
SSH online 3/4
Spark installed 1/4
Second, we will generally be setting progress based on some absolute measure of where we are (e.g. "2 done out of 4") instead of on a relative basis (e.g. "+1 done") because we're asking a remote resource for status instead of doing work ourselves, and that remote resource does work in unpredictable batches.
Click's progress bar does not support setting progress in this way; you must add increments of progress, which is awkward in Flintrock.
Flintrock's output is already much cleaner compared to spark-ec2's:
But this still needs some improvement. If you were to launch a 100-node cluster, you would get more than 200 lines of output: 100 lines showing when SSH comes online, and 100 lines for installing Spark.
This is noise.
A better user experience would be to show some kind of progress bar for each "stage" of the operation that Flintrock is executing.
So for cluster launches, we would show a single progress bar that advances as SSH becomes available across the nodes of the cluster, and another progress bar that advances as Spark is installed across the nodes of the cluster.
Maybe something like this:
I'll look into Click's progress bar utility, though it looks like I will probably have to find a workaround for this issue with having multiple progress bars being updated simultaneously.
Other considerations to keep in mind: