Scaling up and performance features. #22

Merged
Ark74 merged 43 commits from unstable into master 2020-12-17 17:34:28 +00:00
1 changed files with 74 additions and 72 deletions
Showing only changes of commit edbc1c6dc9 - Show all commits

View File

@ -13,16 +13,15 @@ fi
WAN_IP="$(dig +short myip.opendns.com @resolver1.opendns.com)" WAN_IP="$(dig +short myip.opendns.com @resolver1.opendns.com)"
AV_SPACE="$(df -h .|grep -v File|awk '{print$4}'|sed -e 's|G||')" AV_SPACE="$(df -h .|grep -v File|awk '{print$4}'|sed -e 's|G||')"
echo -e "\n-- Make sure you have at least 20GB of disk space\n" echo -e "\n-- Make sure you have at least 10GB of disk space"
if [ $(echo "$AV_SPACE > 19" | bc) -ne 0 ]; then if [ $(echo "$AV_SPACE > 9" | bc) -ne 0 ]; then
echo "> Seems we have enough disk space." echo "> Seems we have enough disk space."
else else
echo "> Please meet the minimum required disk space for this installer, exiting..." echo "> Please meet the minimum required disk space for this installer, exiting..."
exit exit
fi fi
apt-get update
apt-get update
apt-get dist-upgrade -y apt-get dist-upgrade -y
apt-get install -y \ apt-get install -y \
gnupg \ gnupg \
@ -32,14 +31,15 @@ apt-get install -y \
unzip \ unzip \
maven \ maven \
openjdk-8-jdk openjdk-8-jdk
# Docker
curl -fsSL https://get.docker.com -o get-docker.sh curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh sh get-docker.sh
## Docker Compose
curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose curl -sL "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
# Jitsi Meet Torture
cd /opt cd /opt
git clone https://github.com/jitsi/jitsi-meet-torture git clone https://github.com/jitsi/jitsi-meet-torture
cd /opt/jitsi-meet-torture/resources cd /opt/jitsi-meet-torture/resources
@ -57,77 +57,77 @@ services:
container_name: selenium-hub container_name: selenium-hub
ports: ports:
- "4444:4444" - "4444:4444"
restart: always restart: always
chrome: chrome:
image: selenium/node-chrome:3.141.59-20200525 image: selenium/node-chrome:3.141.59-20200525
volumes: volumes:
- /dev/shm:/dev/shm - /dev/shm:/dev/shm
- ./resources:/usr/share/jitsi-meet-torture/resources - ./resources:/usr/share/jitsi-meet-torture/resources
depends_on: depends_on:
- selenium-hub - selenium-hub
environment: environment:
- HUB_HOST=selenium-hub - HUB_HOST=selenium-hub
- HUB_PORT=4444 - HUB_PORT=4444
- NODE_MAX_INSTANCES=30 - NODE_MAX_INSTANCES=30
- NODE_MAX_SESSION=30 - NODE_MAX_SESSION=30
restart: always restart: always
chrome2: chrome2:
image: selenium/node-chrome:3.141.59-20200525 image: selenium/node-chrome:3.141.59-20200525
volumes: volumes:
- /dev/shm:/dev/shm - /dev/shm:/dev/shm
- ./resources:/usr/share/jitsi-meet-torture/resources - ./resources:/usr/share/jitsi-meet-torture/resources
depends_on: depends_on:
- selenium-hub - selenium-hub
environment: environment:
- HUB_HOST=selenium-hub - HUB_HOST=selenium-hub
- HUB_PORT=4444 - HUB_PORT=4444
- NODE_MAX_INSTANCES=30 - NODE_MAX_INSTANCES=30
- NODE_MAX_SESSION=30 - NODE_MAX_SESSION=30
restart: always restart: always
chrome3: chrome3:
image: selenium/node-chrome:3.141.59-20200525 image: selenium/node-chrome:3.141.59-20200525
volumes: volumes:
- /dev/shm:/dev/shm - /dev/shm:/dev/shm
- ./resources:/usr/share/jitsi-meet-torture/resources - ./resources:/usr/share/jitsi-meet-torture/resources
depends_on: depends_on:
- selenium-hub - selenium-hub
environment: environment:
- HUB_HOST=selenium-hub - HUB_HOST=selenium-hub
- HUB_PORT=4444 - HUB_PORT=4444
- NODE_MAX_INSTANCES=30 - NODE_MAX_INSTANCES=30
- NODE_MAX_SESSION=30 - NODE_MAX_SESSION=30
restart: always restart: always
chrome4: chrome4:
image: selenium/node-chrome:3.141.59-20200525 image: selenium/node-chrome:3.141.59-20200525
volumes: volumes:
- /dev/shm:/dev/shm - /dev/shm:/dev/shm
- ./resources:/usr/share/jitsi-meet-torture/resources - ./resources:/usr/share/jitsi-meet-torture/resources
depends_on: depends_on:
- selenium-hub - selenium-hub
environment: environment:
- HUB_HOST=selenium-hub - HUB_HOST=selenium-hub
- HUB_PORT=4444 - HUB_PORT=4444
- NODE_MAX_INSTANCES=30 - NODE_MAX_INSTANCES=30
- NODE_MAX_SESSION=30 - NODE_MAX_SESSION=30
restart: always restart: always
chrome5: chrome5:
image: selenium/node-chrome:3.141.59-20200525 image: selenium/node-chrome:3.141.59-20200525
volumes: volumes:
- /dev/shm:/dev/shm - /dev/shm:/dev/shm
- ./resources:/usr/share/jitsi-meet-torture/resources - ./resources:/usr/share/jitsi-meet-torture/resources
depends_on: depends_on:
- selenium-hub - selenium-hub
environment: environment:
- HUB_HOST=selenium-hub - HUB_HOST=selenium-hub
- HUB_PORT=4444 - HUB_PORT=4444
- NODE_MAX_INSTANCES=30 - NODE_MAX_INSTANCES=30
- NODE_MAX_SESSION=30 - NODE_MAX_SESSION=30
restart: always restart: always
SELENIUM_GRID_DOCKER SELENIUM_GRID_DOCKER
docker-compose -f /opt/selenium.yml up -d docker-compose -f /opt/selenium.yml up -d
echo -e "\n#=================== End of Seleniun Grid build ========================#\n"
echo "Change the values acording to you testusing something like;" echo -e "\nChange the values acording to you test requirements using something like;\n"
echo "sudo bash /opt/jitsi-meet-torture/scripts/malleus.sh \\ echo "sudo bash /opt/jitsi-meet-torture/scripts/malleus.sh \\
--conferences=1 \\ --conferences=1 \\
--participants=30 \\ --participants=30 \\
@ -138,10 +138,12 @@ echo "sudo bash /opt/jitsi-meet-torture/scripts/malleus.sh \\
--hub-url=http://localhost:4444/wd/hub \\ --hub-url=http://localhost:4444/wd/hub \\
--instance-url=https://YOUR.JITSI-MEET-INSTANCE.DOMAIN --instance-url=https://YOUR.JITSI-MEET-INSTANCE.DOMAIN
" "
echo -e "\n-- If using 'hamertesting' you can join the room echo -e "\n-- If using 'hamertesting' as prefix name you can join the room
hamertesting0, hamertesting1, hamertestingN hamertesting0, hamertesting1, hamertestingN
acording to the 'N' number of conferences set to watch the test." acording to the 'N' number of conferences you have set to watch the test.
*Beware* for 120 \"participants\" to join video-muted it was necessary at least a c5.24xlarge AWS instance.
So start low and monitor your server resources."
echo -e "\n-- You can check the grid status at: echo -e "\n-- You can check the grid status at:
http://$WAN_IP:4444/grid/console http://$WAN_IP:4444/grid/console