eidastest changes
This commit is contained in:
parent
7397686e81
commit
04b9824b7f
4 changed files with 31 additions and 27 deletions
|
@ -1,18 +1,18 @@
|
||||||
---
|
---
|
||||||
eidastest_compose:
|
eidastest_compose:
|
||||||
version: "3"
|
version: "3.7"
|
||||||
services:
|
services:
|
||||||
chrome:
|
firefox:
|
||||||
image: selenium/standalone-chrome:3.141.59-20200719
|
image: selenium/standalone-firefox:3.141.59-20210422
|
||||||
container_name: standalone-chrome
|
container_name: standalone-firefox
|
||||||
volumes:
|
volumes:
|
||||||
- /dev/shm:/dev/shm
|
- /dev/shm:/dev/shm
|
||||||
- ./supervise_chrome_processes.sh:/scripts/supervise_chrome_processes.sh
|
- ./supervise_firefox_processes.sh:/scripts/supervise_firefox_processes.sh
|
||||||
ports:
|
ports:
|
||||||
- "4444:4444"
|
- "4445:4444"
|
||||||
environment:
|
environment:
|
||||||
- DBUS_SESSION_BUS_ADDRESS=/dev/null
|
|
||||||
- START_XVFB=false
|
- START_XVFB=false
|
||||||
|
- DBUS_SESSION_BUS_ADDRESS=/dev/null
|
||||||
- NODE_MAX_SESSION=4
|
- NODE_MAX_SESSION=4
|
||||||
- NODE_MAX_INSTANCES=4
|
- NODE_MAX_INSTANCES=4
|
||||||
logging:
|
logging:
|
||||||
|
@ -20,7 +20,7 @@ eidastest_compose:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
|
|
||||||
eidastest-testid:
|
eidastest-testid:
|
||||||
image: docker.sunet.se/eidastest-testid:2.0.6
|
image: docker.sunet.se/eidastest-testid:2.0.7
|
||||||
container_name: eidastest-testid
|
container_name: eidastest-testid
|
||||||
ports:
|
ports:
|
||||||
- "443:8099"
|
- "443:8099"
|
||||||
|
@ -30,14 +30,14 @@ eidastest_compose:
|
||||||
- "/etc/ssl:/etc/ssl"
|
- "/etc/ssl:/etc/ssl"
|
||||||
- /dev/shm:/dev/shm
|
- /dev/shm:/dev/shm
|
||||||
depends_on:
|
depends_on:
|
||||||
- chrome
|
- firefox
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
|
|
||||||
scheduler1:
|
scheduler1:
|
||||||
image: mcuadros/ofelia:latest
|
image: mcuadros/ofelia:latest
|
||||||
container_name: supvervising_standalone-chrome
|
container_name: supvervising_standalone-firefox
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- ./config.ini:/etc/ofelia/config.ini
|
- ./config.ini:/etc/ofelia/config.ini
|
||||||
depends_on:
|
depends_on:
|
||||||
- chrome
|
- firefox
|
||||||
|
|
|
@ -450,8 +450,8 @@ class eidastest($version="1.0.0", $hostname="locahost") {
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0755',
|
mode => '0755',
|
||||||
}
|
}
|
||||||
file { "${home}/eidastest/supervise_chrome_processes.sh":
|
file { "${home}/eidastest/supervise_firefox_processes.sh":
|
||||||
content => template('eid/eidastest/supervise_chrome_processes.sh.erb'),
|
content => template('eid/eidastest/supervise_firefox_processes.sh.erb'),
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0755',
|
mode => '0755',
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# Script used for kill of hanging chrome processes
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
if [ $(ps -ef | grep chrome/chrome -c) -gt 15 ]
|
|
||||||
then
|
|
||||||
echo "Number of chrome processes are more than 15(" $(ps -ef | grep chrome/chrome -c) "), killing all chrome processes!"
|
|
||||||
$(pkill chrome)
|
|
||||||
echo "Number of chrome processes after kill: " $(ps -ef | grep chrome/chrome -c)
|
|
||||||
else
|
|
||||||
echo "Number of chrome processes are less than 15(" $(ps -ef | grep chrome/chrome -c) "), no action taken"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ""
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Script used for kill of hanging firefox processes
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
if [ $(ps -ef | grep firefox -c) -gt 15 ]
|
||||||
|
then
|
||||||
|
echo "Number of firefox processes are more than 15(" $(ps -ef | grep firefox -c) "), killing all processes!"
|
||||||
|
sleep 2
|
||||||
|
$(pkill firefox)
|
||||||
|
sleep 2
|
||||||
|
$(pkill geckodriver)
|
||||||
|
sleep 2
|
||||||
|
echo "Number of firefox processes are now: " $(ps -ef | grep firefox -c)
|
||||||
|
else
|
||||||
|
echo "Number of firefox processes are less than 15(" $(ps -ef | grep firefox -c) "), no action taken"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
Loading…
Add table
Reference in a new issue