Last active
January 24, 2019 16:58
-
-
Save shs96c/0dd44559a2d0e7015bb7ec01a3926405 to your computer and use it in GitHub Desktop.
Build and start Grid TNG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SE_JAR=buck-out/gen/java/server/src/org/openqa/selenium/grid/selenium.jar | |
SESSIONS=$(tput setaf 1) | |
DISTRIBUTOR=$(tput setaf 2) | |
ROUTER=$(tput setaf 3) | |
PLAIN=$(tput sgr0) | |
ps auxw | grep selenium.jar | grep -v grep | awk '{print $2}' | xargs kill | |
./buckw build grid-tng || exit | |
(java -jar $SE_JAR sessions 2>&1 | sed "s/.*/sessions - $SESSIONS&$PLAIN/") & | |
sleep 1 | |
(java -jar $SE_JAR distributor 2>&1 | sed "s/.*/distributor - $DISTRIBUTOR&$PLAIN/") & | |
sleep 1 | |
(java -jar $SE_JAR router --sessions http://localhost:5556 --distributor http://localhost:5553 2>&1 | sed "s/.*/router - $ROUTER&$PLAIN/") & | |
sleep 1 | |
(java -jar $SE_JAR node --sessions http://localhost:5556 --distributor http://localhost:5553 --detect-drivers 2>&1 | sed "s/.*/node - &/") & | |
sleep 4 | |
echo Ready |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output from the session map will be red, distributor will be green, router a hideous brown, and the node will be the default colour of your terminal.