From 3edd57f3e513a501943cdf0685ad10d4547bf7d5 Mon Sep 17 00:00:00 2001 From: Alex Gray Date: Fri, 22 Jun 2018 19:04:40 +0200 Subject: [PATCH 1/2] Include supervisord information --- startup_scripts/looker | 15 +++++++++++---- startup_scripts/supervisord/looker.cfg | 16 ++++++++++++++++ startup_scripts/systemd/README.md | 5 ++++- 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 startup_scripts/supervisord/looker.cfg diff --git a/startup_scripts/looker b/startup_scripts/looker index 22dfd90..0cca589 100755 --- a/startup_scripts/looker +++ b/startup_scripts/looker @@ -7,8 +7,15 @@ if [ "$JAVA_VER" -le 17 ]; then exit 1 fi -cd $HOME/looker -# set your java memory- there should be over 1.5G of system memory +cd $HOME/looker + +# If using --no-daemonize option in lookerstart.cfg and if you're using supervisord to manage looker, +# you should uncomment out this line. It makes supervisord stop this shell script on a "supervisorctl stop" command, +# thus causing the stop() function to be called. See the supervisord folder for an example of what the +# supervisord config looks like. +#trap stop EXIT + +# set your java memory- there should be over 1.5G of system memory # left to run the OS MEM=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'` JM=`expr $MEM \* 6 / 10` @@ -32,7 +39,7 @@ fi PROTOCOL="" echo "${LOOKERARGS}" | grep -q "\-\-no\-ssl" -if [ $? -eq 0 ] +if [ $? -eq 0 ] then PROTOCOL='http' else @@ -51,7 +58,7 @@ start() { echo "Startup suppressed: ${LOCKFILE} contains running pid, startup script is already running" exit 1 fi - + # make sure the lockfile is removed when we exit and then claim it trap "rm -f ${LOCKFILE}; exit" INT TERM EXIT echo $$ > ${LOCKFILE} diff --git a/startup_scripts/supervisord/looker.cfg b/startup_scripts/supervisord/looker.cfg new file mode 100644 index 0000000..1a2378d --- /dev/null +++ b/startup_scripts/supervisord/looker.cfg @@ -0,0 +1,16 @@ + +[program:looker] +command=/home/looker/looker/looker start +directory=/home/looker/looker +user=looker +numprocs=1 +stdout_logfile=/var/log/looker/looker.log +stderr_logfile=/var/log/looker/looker.log +autostart=true +autorestart=true +startretries=100 +startsecs=10 +stopwaitsecs=10 +stopsignal=TERM +priority=1 +environment=HOME=/home/looker diff --git a/startup_scripts/systemd/README.md b/startup_scripts/systemd/README.md index 8e4cd2e..6b9ecb5 100644 --- a/startup_scripts/systemd/README.md +++ b/startup_scripts/systemd/README.md @@ -1,4 +1,4 @@ -Systemd replaces the SysV init system. It is used with RHEL 7, CentOS 7, and others. +Systemd replaces the SysV init system. It is used with RHEL 7, CentOS 7, and others. The instructions on this page were tested on an AWS host running CentOS 7. @@ -28,6 +28,9 @@ or, if you are running a cluster, or have other custom args, something like LOOKERARGS="--no-daemonize -d looker-db.yml --clustered -H 10.10.10.10 --shared-storage-dir /path/to/mounted/shared/storage" ``` +The --no-daemonize flag is also useful if you plan on using supervisord to manage looker, +but make sure you uncomment out the "trap" command in looker's startup script. + Lastly, run the following commmands: ``` From f38dee03d9f43e6b652aa6317526ffcbc12672a8 Mon Sep 17 00:00:00 2001 From: "whitesource-bolt-for-github[bot]" Date: Thu, 6 Dec 2018 15:40:10 +0000 Subject: [PATCH 2/2] Initial WhiteSource configuration file --- .whitesource | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .whitesource diff --git a/.whitesource b/.whitesource new file mode 100644 index 0000000..5ef5902 --- /dev/null +++ b/.whitesource @@ -0,0 +1,8 @@ +########################################################## +#### WhiteSource "Bolt for Github" configuration file #### +########################################################## + +# Configuration # +#---------------# +ws.repo.scan=true +vulnerable.check.run.conclusion.level=success \ No newline at end of file