Difference between revisions of "Localyzer Jenkins Plugins"
(→Set up Jenkins Plugins) |
|||
Line 12: | Line 12: | ||
==== Download <code>jenkins-cli.jar</code> ==== |
==== Download <code>jenkins-cli.jar</code> ==== |
||
− | * Navigate to your Jenkins URL followed by cli, for example |
+ | * Navigate to your Jenkins URL followed by cli, for example |
+ | : <code>http://localhost:8080/cli</code> |
||
* Click on the download link and copy the downloaded jenkins-cli.jar to a location you have access to |
* Click on the download link and copy the downloaded jenkins-cli.jar to a location you have access to |
||
* Click on the Login command: An example is given on how to login Jenkins using jenkins-cli.jar. This will be useful soon. |
* Click on the Login command: An example is given on how to login Jenkins using jenkins-cli.jar. This will be useful soon. |
||
==== Setup Environment Variables ==== |
==== Setup Environment Variables ==== |
||
Two global variables need to be setup: |
Two global variables need to be setup: |
||
− | * Set JENKINS_CLI to the absolute location of the downloaded jenkins-cli.jar file, for example |
+ | * Set JENKINS_CLI to the absolute location of the downloaded jenkins-cli.jar file, for example |
+ | : <code>export JENKINS_CLI=/home/jenkins/jenkins-cli.jar</code> |
||
− | * Set JENKINS_URL to the URL for Jenkins, for example <code>export JENKINS_URL=http://locahost:8080/</code> |
||
+ | * Set JENKINS_URL to the URL for Jenkins, for example |
||
+ | : <code>export JENKINS_URL=http://locahost:8080/</code> |
||
==== Login using <code>jenkins-cli.jar</code> ==== |
==== Login using <code>jenkins-cli.jar</code> ==== |
||
The login command example you saw above should help you login with an account with administrative privileges. It should look like: |
The login command example you saw above should help you login with an account with administrative privileges. It should look like: |
||
− | <code>java -jar $JENKINS_CLI -s $JENKINS_URL login --username admin --password adminPassword</code> |
+ | :<code>java -jar $JENKINS_CLI -s $JENKINS_URL login --username admin --password adminPassword</code> |
==== Execute the <code>install-lingoport-plugins.sh </code> ==== |
==== Execute the <code>install-lingoport-plugins.sh </code> ==== |
||
Go to the directory where the script is located and execute the script. For example: |
Go to the directory where the script is located and execute the script. For example: |
||
Line 28: | Line 31: | ||
* <code>./install-lingoport-plugins.sh</code> |
* <code>./install-lingoport-plugins.sh</code> |
||
==== Restart Jenkins ==== |
==== Restart Jenkins ==== |
||
− | You may be able to do so with a browser URL such as |
+ | You may be able to do so with a browser URL such as |
+ | :<code>http://localhost:8080/restart</code> |
||
==== Verify the Plugins are Installed ==== |
==== Verify the Plugins are Installed ==== |
||
− | * Navigate to the Jenkins URL for plugins, such as |
+ | * Navigate to the Jenkins URL for plugins, such as |
+ | :<code>http://localhost:8080/pluginManager/installed</code> |
||
=== Use the Jenkins interface === |
=== Use the Jenkins interface === |
Revision as of 21:42, 6 October 2015
Set up Jenkins Plugins
You may setup the plugins used by LRM in two ways:
- Run the setup script using jenkins-cli.jar at the command line
- Install the plugins from the Jenkins interface
Both ways are fine, use either.
Execute install-lingoport-plugins.sh
This way to setup involves downloading the jenkins-cli.jar
file, setting some variables, and running the script.
(Note: this is available in LRM 2.2)
Download jenkins-cli.jar
- Navigate to your Jenkins URL followed by cli, for example
- Click on the download link and copy the downloaded jenkins-cli.jar to a location you have access to
- Click on the Login command: An example is given on how to login Jenkins using jenkins-cli.jar. This will be useful soon.
Setup Environment Variables
Two global variables need to be setup:
- Set JENKINS_CLI to the absolute location of the downloaded jenkins-cli.jar file, for example
export JENKINS_CLI=/home/jenkins/jenkins-cli.jar
- Set JENKINS_URL to the URL for Jenkins, for example
export JENKINS_URL=http://locahost:8080/
Login using jenkins-cli.jar
The login command example you saw above should help you login with an account with administrative privileges. It should look like:
java -jar $JENKINS_CLI -s $JENKINS_URL login --username admin --password adminPassword
Execute the install-lingoport-plugins.sh
Go to the directory where the script is located and execute the script. For example:
cd /home/jenkins/lingoport/lrm-server-2.2/jenkins/plugins
./install-lingoport-plugins.sh
Restart Jenkins
You may be able to do so with a browser URL such as
Verify the Plugins are Installed
- Navigate to the Jenkins URL for plugins, such as
Use the Jenkins interface
If executing the script does not work for you, an alternative is to setup all the plugins via the Jenkins interface.
The following Jenkins plugins are required. To see what plugins are installed, go to Jenkins -> Manage Jenkins -> Manage Plugins and select the Installed tab.
- Authorization Strategy Plugin (Or another authentication/authorization plugin)
Throttle
Go to Configure (Configure System) and under the Throttle Concurrent Builds, add a category (MAIN for instance) with 1 Maximum Total Concurrent Builds and 1 Maximum Concurrent Builds Per Node.
Every Jenkins job MUST have this throttle setup.
Note
A quick note for the relationship between the TOKEN necessary for the lingotekcall back and security:
1) The plugin is Build Authorization Token Root Plugin, https://wiki.jenkins-ci.org/display/JENKINS/Build+Token+Root+Plugin It must be installed. However, if no security is set, jobs cannot be triggered remotely using a TOKEN!!! So ...
2) Make sure security is set. The typical one is first set under Configure Global Security in Manage Jenkins for 'Matrix Security' and 'Using Jenkins Own Database'. Once this is set (as opposed to anonymous everything), one can then use the Build Authorization Token Root in the lingotekcall job: Set the Token to 'LINGOSQUARE'