-
Notifications
You must be signed in to change notification settings - Fork 1
Grouper fix #2
Merged
+53
−24
Merged
Grouper fix #2
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
505e39a
Added some files configuration in order to get grouper app running
2482b41
Added more log
8321720
Added apache start
bc0a0ee
Added more data for dockerfile and supervisord
b600f3e
Added noprompt in order to finish the last check
7c93df1
Added some logic.. still testing
c1a6140
Added more logic to scripts
e6cbc62
Removed supervisord
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| #!/bin/bash | ||
|
|
||
| log="/tmp/grouper.log" | ||
|
|
||
| log="/tmp/grouper-check.log" | ||
| date >> $log | ||
| echo "Installing schema" >> $log | ||
| cd /opt/grouper/2.3.0/grouper.apiBinary-2.3.0 && GROUPER_HOME=/opt/grouper/2.3.0/grouper.apiBinary-2.3.0 bin/gsh.sh -registry -drop -runscript -noprompt | ||
| cd /opt/grouper/2.3.0/grouper.apiBinary-2.3.0 && GROUPER_HOME=/opt/grouper/2.3.0/grouper.apiBinary-2.3.0 bin/gsh.sh -registry -drop -runscript -noprompt >> $log | ||
|
|
||
| echo "Preparing subjects" >> $log | ||
| cd /opt/grouper/2.3.0/grouper.apiBinary-2.3.0 && GROUPER_HOME=/opt/grouper/2.3.0/grouper.apiBinary-2.3.0 bin/gsh.sh -registry -runsqlfile /opt/grouper/2.3.0/subjects.sql -noprompt | ||
| cd /opt/grouper/2.3.0/grouper.apiBinary-2.3.0 && GROUPER_HOME=/opt/grouper/2.3.0/grouper.apiBinary-2.3.0 bin/gsh.sh -registry -runsqlfile /opt/grouper/2.3.0/subjects.sql -noprompt >> $log | ||
|
|
||
| echo "Adding Quickstart data" >> $log | ||
| cd /opt/grouper/2.3.0/grouper.apiBinary-2.3.0 && GROUPER_HOME=/opt/grouper/2.3.0/grouper.apiBinary-2.3.0 bin/gsh.sh -xmlimportold GrouperSystem /opt/grouper/2.3.0/quickstart.xml -noprompt | ||
| cd /opt/grouper/2.3.0/grouper.apiBinary-2.3.0 && GROUPER_HOME=/opt/grouper/2.3.0/grouper.apiBinary-2.3.0 bin/gsh.sh -xmlimportold GrouperSystem /opt/grouper/2.3.0/quickstart.xml -noprompt >> $log | ||
|
|
||
| echo "Checking" >> $log | ||
| cd /opt/grouper/2.3.0/grouper.apiBinary-2.3.0 && GROUPER_HOME=/opt/grouper/2.3.0/grouper.apiBinary-2.3.0 bin/gsh.sh -registry -check >> $log | ||
| cd /opt/grouper/2.3.0/grouper.apiBinary-2.3.0 && GROUPER_HOME=/opt/grouper/2.3.0/grouper.apiBinary-2.3.0 bin/gsh.sh -registry -check >> $log |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,11 @@ | ||
| #!/bin/bash | ||
|
|
||
| log="/tmp/grouper.log" | ||
|
|
||
| rm -f /tmp/firsttimerunning >> $log | ||
| log="/tmp/grouper-cleanup.log" | ||
| date >> $log | ||
| if [ -z ${COMPOSE+x} ];then | ||
| echo "Not composed so not waiting for MariaDB and first time running was ok: " >> $log | ||
| rm -f /tmp/firsttimerunning >> $log | ||
| else | ||
| echo "Composed with MariaDB, running completed" >> $log | ||
| rm -f /tmp/firsttimerunning >> $log | ||
| fi |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| [supervisord] | ||
| logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) | ||
| logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) | ||
| logfile_backups=10 ; (num of main logfile rotation backups;default 10) | ||
| loglevel=info ; (log level;default info; others: debug,warn,trace) | ||
| pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) | ||
| nodaemon=true ; (start in foreground if true;default false) | ||
| minfds=1024 ; (min. avail startup file descriptors;default 1024) | ||
| minprocs=200 ; (min. avail process descriptors;default 200) | ||
| ;umask=022 ; (process file creation umask;default 022) | ||
| ;user=chrism ; (default is current user, required if root) | ||
| ;identifier=supervisor ; (supervisord identifier, default is 'supervisor') | ||
| ;directory=/tmp ; (default is not to cd during start) | ||
| ;nocleanup=true ; (don't clean up tempfiles at start;default false) | ||
| ;childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP) | ||
| ;environment=KEY=value ; (key value pairs to add to environment) | ||
| ;strip_ansi=false ; (strip ansi escape codes in logs; def. false) | ||
|
|
||
| ; the below section must remain in the config file for RPC | ||
| ; (supervisorctl/web interface) to work, additional interfaces may be | ||
| ; added by defining them in separate rpcinterface: sections | ||
| [rpcinterface:supervisor] | ||
| supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface | ||
|
|
||
| [supervisorctl] | ||
| serverurl=unix:///var/run/supervisor/supervisor.sock ; use a unix:// URL for a unix socket | ||
| ;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket | ||
| ;username=chris ; should be same as http_username if set | ||
| ;password=123 ; should be same as http_password if set | ||
| ;prompt=mysupervisor ; cmd line prompt (default "supervisor") | ||
| ;history_file=~/.sc_history ; use readline history if available | ||
|
|
||
|
|
||
| [program:configure] | ||
| command=/bin/bash -c "exec /opt/bin/start.sh" | ||
|
|
||
| [program:apache] | ||
| command=/bin/bash -c "exec /usr/local/bin/httpd-shib-foreground" | ||
|
|
||
| [program:tomcat] | ||
| command=/bin/bash -c "exec /opt/grouper/2.3.0/apache-tomcat-6.0.35/bin/catalina.sh run" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mechanism start all three of these at the same time?
With the existing 'plan', start.sh would need to terminate before starting tomcat. Is there a way we can keep start.sh as the CMD entrypoint in the Dockerfile, remove the configure here, and start supervisord before cleanup in /opt/bin/main.sh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes!! correct!! I figure out it today :).. but first issue with mariadb , then I will check how set an order :)