Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include supervisord information #12

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
##########################################################
#### WhiteSource "Bolt for Github" configuration file ####
##########################################################

# Configuration #
#---------------#
ws.repo.scan=true
vulnerable.check.run.conclusion.level=success
15 changes: 11 additions & 4 deletions startup_scripts/looker
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -32,7 +39,7 @@ fi
PROTOCOL=""

echo "${LOOKERARGS}" | grep -q "\-\-no\-ssl"
if [ $? -eq 0 ]
if [ $? -eq 0 ]
then
PROTOCOL='http'
else
Expand All @@ -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}
Expand Down
16 changes: 16 additions & 0 deletions startup_scripts/supervisord/looker.cfg
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion startup_scripts/systemd/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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:

```
Expand Down