summaryrefslogtreecommitdiffstats
path: root/utils/jenkins-jnlp-connect.sh
AgeCommit message (Collapse)AuthorFilesLines
2018-03-05Allow monit config script to use custom hostnameagardner1-7/+12
we need to use this script for connecting labs.opnfv.org machines to the sandbox.opnfv.org adds optional -l swtich Change-Id: I620c963841a2ff39a8c08565cb474f7fdb833c74 Signed-off-by: agardner <agardner@linuxfoundation.org>
2018-03-05Add start delay to monit for jnlp daemonagardner1-2/+8
delay the first check by 4-minutes This is a better solution thant check process every 2 cycles check process every 2 cycles delays initial startup by 2 cycles delay check gives the script time to spawn, as the wget slave.jar takes some time from china. Change-Id: I8066e5b65efc41aaa67ee0f6ab8ee2c1aa86a67c Signed-off-by: agardner <agardner@linuxfoundation.org>
2018-02-16jenkins-jnlp-connect.sh takes time to launchagardner1-2/+2
wget --timestamping https://build.opnfv.org/ci/jnlpJars/slave.jar && true this takes time, especially from china. Tell monit to back off while waiting for the pid file to be created Change-Id: I02327323d50d0a4a8b379535d8da84a20348ba6f Signed-off-by: agardner <agardner@linuxfoundation.org>
2017-10-10Fix jenkins-jnlp-connect.sh for missing a quotation markAlex Yang1-1/+1
Change-Id: Iba2a7b5de9cb56c2cc6579fb9ff37b3242a0283f Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
2017-09-08Fix for when requiretty is disabled with a !agardner1-1/+1
you can disable requiretty by !requiretty or #requiretty so catch both of those cases Change-Id: Ic7fb1cf97849258b1e4db34be82794918bf722e0 Signed-off-by: agardner <agardner@linuxfoundation.org>
2017-06-29this script is called by jenkins useragardner1-2/+2
we need to sudo the mkdir Change-Id: I4db726e92566917ecd384884cf1a3c60354c2065 Signed-off-by: agardner <agardner@linuxfoundation.org>
2017-01-27utils: jenkins-jnlp-connect.sh: Drop hardcoded paths for mkdir and chownMarkos Chandras1-6/+9
mkdir and chown are installed in /bin on Ubuntu so determine their path during runtime. Change-Id: I654ad81dfe370b84b9727532e7ee0a37bfd4028f Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-01-11utils/jenkins-jnlp-connect.sh: Make sure the pid directory existsMarkos Chandras1-1/+13
/var/run/ is only writable by root so Monit will fail to create the necessary subdirectory for the jenkins pid file since we run it as the 'jenkin' user. We add another entry to the monit configuration file to check the presence and the permissions of that directory before we try to start the jenkins slave. Change-Id: Ica7153c3e90900f60e4f65708c8f08abf5af9201 Signed-off-by: Markos Chandras <mchandras@suse.de>
2016-11-29utils: jenkins-jnlp-connect.sh: Fix 'started_monit' block indentationMarkos Chandras1-23/+23
Change-Id: Id2eb5f63944e73a764e6a0f950f9147c6d6c8d88 Signed-off-by: Markos Chandras <mchandras@suse.de>
2016-11-29Merge "Remove trailing slash in example"Fatih Degirmenci1-1/+2
2016-11-29utils: jenkins-jnlp-connect.sh: Make monit actions conditionalMarkos Chandras1-21/+20
When executing the connection testing command as indicated in [1], -t is added to the monit start-up script parameters. This prevents the jenkins service from running in the background and create the pid file. Because of that, monit is confused and reports the service as failed. We fix this by moving all the monit related actions inside the 'monit' conditional block. [1]: http://artifacts.opnfv.org/octopus/brahmaputra/docs/octopus_docs/opnfv-jenkins-slave-connection.html#connecting-slaves-from-community-labs-to-opnfv-jenkins Change-Id: I7371c4560311b84f56eff3461254264e1769ff7e Signed-off-by: Markos Chandras <mchandras@suse.de>
2016-11-28Remove trailing slash in exampleAric Gardner1-1/+2
also add caveat note Change-Id: Ie662ffb9240c3ffdbc4c7317d63744a8beedec4a Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
2016-11-24utils: jenkins-jnlp-connect.sh: Fix start up scriptMarkos Chandras1-4/+2
The jenkins-jnlp-connect.sh script is meant to be executed from the $jenkinshome directory. The monit script was configured to enter a different directory before starting the jenkins script which always resulted in a broken start-up phase like this: "This script needs to be run from the jenkins users home dir" We fix this by entering the $jenkinshome directory before starting up the jenkins script. Change-Id: If0f65417f07a7fa9328f9adcd1ca1a1a3bc530ed Signed-off-by: Markos Chandras <mchandras@suse.de>
2016-10-02I will figure out how to add a check for this laterAric Gardner1-0/+1
Change-Id: I52b2c9f8bcc56f69d6479b85dc6210665e27b26b Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
2016-08-17Jenkins connection script needs to be run from $jenkinshomeAric Gardner1-0/+5
Exit if script is run from the wrong directory Change-Id: I693ab65b4439c5b4d3b609e95295fa43e8cd3a58 Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
2016-08-11fix requiretty check, use 'sudo -l'Ryota MIBU1-2/+2
A normal user doesn't have a right to read /etc/sudoers, so current script won't work if executed by non-root users. This patch replacing the check by geeting config from 'sudo -l' command. Change-Id: I608edabb73761cea0f6199045f1cde2217a34bf3 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
2016-06-30Add check for Requiretty add timeoutAric Gardner1-2/+10
if tty is requried monit fails, this will alert the user of this issue if the wget takes to long monit panics and restart the process Change-Id: Idf40a6150d1c87ec1b4b6652ace85680c6edb4fc Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
2016-05-30Format the script for better readingJulien1-112/+102
esp for heading spaces and if/else/fi JIRA:RELENG-113 Change-Id: I9009cfec71be653e1009d8d59aec2f27d7206a8d Signed-off-by: Julien <zhang.jun3g@zte.com.cn>
2016-03-10jenkins-jnlp-connect.sh: monit config file was always updatedJosep Puigdemont1-2/+2
The jenkins-jnlp-connect.sh script will check whether a monit configuration file for jenkins exists. If it does, it will make sure the contents are correct according to the paramters provided in the command line. The check is made diffing the contents of the file with what is expected by the script. However the script compares the contents of the file against a string that is not exactly the same to what would be written to the file by the script, resulting in the check always failing, and the file being rewritten unnecessarily every time. Change-Id: I0b15195e9d667c11898942c92b39ef3fb053821d Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-03-10Add missing $ in bash script variableJosep Puigdemont1-1/+1
Change-Id: Iee61343d1ce838e4a2ff25a664b069f4278c5b78 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-03-09Change the way to detect monit configuration dirJosep Puigdemont1-3/+6
Instead of finding out the Linux distribution of the host, try whether one of the well known monit configuration directories exist, and use that. Change-Id: Ibb111661fb3a6ef8e4b4ef559b9a1d56599d59c8 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-01-28Add license headerFatih Degirmenci1-0/+9
License headers are added. - Set company name based on the author who created the file first time - Add SPDX header for Apache 2.0 Change-Id: I8f357a2d6f75179171c681f4b53e0f4249eca5a2 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2015-11-26Fix chown in jenkins slave connection scriptFatih Degirmenci1-1/+1
Change-Id: Ib5e317f17f3ba2eef3c4f0948739f83a13968c6a Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2015-11-20Fix jenkins user losing its group memberships when slave connected using monitFatih Degirmenci1-3/+3
JIRA: RELENG-53 Change-Id: Id19f748e125eb8c439560b42de4f5e1ab8e9553f Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2015-11-03Small fixes to ownership, test mode.Aric Gardner1-4/+9
Make sure that java connection runs in foregrond if script is run in test mode Make sure slave.jar is owned by jenkinsuser so that it can be updated Change-Id: I919eaf841569f1540f2a3f026f4a87064bda1b45 Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
2015-11-03Script to configure monit for jnlp slave connectionsAric Gardner1-0/+177
added optargs added test mode to test connection without monit Creates and/or updates monit config Updates slave.jar before each connection Monit will restart slave connection if it drops. detects distro can generate a help desk email template if firewall not open JIRA: RELENG-42 Change-Id: I237eda32ac59a57202811bc1d0c7ce29010ac71d Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>