Last active
June 10, 2016 10:23
-
-
Save junaid18183/8450761 to your computer and use it in GitHub Desktop.
Install Jenkins and Tron on Centos
This file contains hidden or 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
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo | |
rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key | |
yum -y install jenkins | |
yum -y install java-1.7.0-openjdk.x86_64 | |
# Login as the jenkins user and specify shell explicity, | |
# since the default shell is /bin/false for most | |
# jenkins installations. | |
su jenkins -s /bin/bash -c 'ssh-keygen' | |
service jenkins start | |
tail /var/log/jenkins/jenkins.log | |
# see https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+RedHat+distributions | |
# and http://stackoverflow.com/questions/15314760 | |
### How to setup the Monitoring external jobs for remote servers | |
export JENKINS_HOME=http://junedm:[email protected]:8080/ | |
unzip /usr/lib/jenkins/jenkins.war | |
cd /usr/lib/jenkins/WEB-INF/lib | |
mkdir /root/jenkins | |
for i in jenkins-core-*.jar remoting-*.jar ant-[1-9]*.jar commons-io-[1-9]*.jar commons-lang-[0-9]*.jar jna-posix-*.jar xstream-*.jar ; do ls -l $i ; cp $i /root/jenkins/ ;done | |
# On remote machines, scp the /root/jenkins direcotry and set the $JENKINS_HOME and run following command | |
java -jar /root/jenkins/jenkins-core-*.jar "Cron-Monitor-Test" ls -l | |
#http://kvdev.wordpress.com/2012/03/01/jenkins-monitoring-external-jobs/ | |
#http://stackoverflow.com/questions/11830098/setup-jenkins-to-monitor-external-job |
This file contains hidden or 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
#http://pythonhosted.org/tron/tutorial.html#installing-tron | |
yum install python-setuptools | |
easy_install pip | |
pip install tron | |
mkdir -p /var/log/tron | |
touch /var/log/tron/tron.log | |
trond --host=localhost --debug | |
ps aux | grep trond | wc -l | |
# if its zero means trond didnt started, so check the tron.log | |
tail /var/log/tron/tron.log | |
# if u end up with error like ConfigError: No SSH Agent available ($SSH_AUTH_SOCK), then you have to change the agent: false in the Configuration file. | |
# Configuration file is - /var/lib/tron/config/MASTER.yaml | |
# go edit the Configuration file and start the trond in actul mode | |
# trond --host=<fqdn> | |
# The webUI is available at http://fqdn:8089 | |
This file contains hidden or 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
Important Pluging for Jenkins | |
Jenkins SSH plugin : https://wiki.jenkins-ci.org/display/JENKINS/SSH+plugin | |
Basic Configurarion : cat /var/lib/jenkins/config.xml | |
Jobs configuration : cat /var/lib/jenkins/jobs/<job-name>/config.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment