Difference between revisions of "CI/Java Webstart"

From OpenMBD
< CI
Jump to: navigation, search
(Created page with "{{CI}} 150px == Introduction to Java Webstart == Java webstart is a way to start a Java application right from your webbrowser without the need for insta...")
 
(Installation)
Line 15: Line 15:
 
Although installation is not required, it would be very convenient to configure your slave machines in such a way that the Java Webstart application is started after booting your slave machine. (either a separate machine which can be reached via the network or a virtual machine) Otherwise it should be started manually after each reboot by accessing the main Jenkins page and navigate to the corresponding slave node.
 
Although installation is not required, it would be very convenient to configure your slave machines in such a way that the Java Webstart application is started after booting your slave machine. (either a separate machine which can be reached via the network or a virtual machine) Otherwise it should be started manually after each reboot by accessing the main Jenkins page and navigate to the corresponding slave node.
  
 +
In order to be sure your slave machines gets connected to the Jenkins master in order to be available to execute jobs, the following steps can be followed:
  
 
<ol>
 
<ol>
Line 36: Line 37:
 
<li> Review your settings and click "Finish" </li>
 
<li> Review your settings and click "Finish" </li>
 
</ol>
 
</ol>
 
 
  
 
== Configuration ==
 
== Configuration ==

Revision as of 11:26, 16 April 2018


Back to Home


Jnlp.png

Introduction to Java Webstart

Java webstart is a way to start a Java application right from your webbrowser without the need for installing. It is being used by Jenkins in order to be able to communicate with slave machines. In other words, the Jenkins master can communicate with it's slave machines via the Jenkins slaves. Those slaves in fact are Java Webstart applications. More information about Java Webstart can be found on the Oracle website.


Installation

Although installation is not required, it would be very convenient to configure your slave machines in such a way that the Java Webstart application is started after booting your slave machine. (either a separate machine which can be reached via the network or a virtual machine) Otherwise it should be started manually after each reboot by accessing the main Jenkins page and navigate to the corresponding slave node.

In order to be sure your slave machines gets connected to the Jenkins master in order to be available to execute jobs, the following steps can be followed:

    Setup your Jenkins webstart folder
  1. Log in to your slave machine
  2. Create a new folder named JenkinsSlave and create an empty textfile in it called startupJenkinsSlave.txt
  3. Open the textfile and type cd on the first line, followed by a space
  4. Copy the file path and paste it after "cd "
  5. Open a webbrowser and navigate to your Jenkins webpage
  6. Log in to Jenkins and navigate to the slave node which should run on your machine (No slave node configured yet? Click here to do so
  7. Copy the command under "Run from agent command line: " to your clipboard.
  8. Paste it into startupJenkinsSlave.txt, under the line cd <yourfilepath> Save the change
  9. Change the file extension of startupJenkinsSlave.txt to startupJenkinsSlave.bat. Possibly you would have to accept a windows prompt
  10. Go to your downloads folder and relocate the file slave-agent.jnlp to the folder containing startupJenkinsSlave.bat
  11. Schedule a task to run the Java Webstart application and connect the Jenkins slave to the Jenkins master on startup

  12. Open Windows Task Scheduler (search in windows start menu) and click create basic task...
  13. Give it a name like startupJenkinsSlave
  14. When asked when to start the task, select "when the computer starts"
  15. When asked what action to perform, select "Start a program"
  16. Click the browse button and navigate to the file startupJenkinsSlave.bat
  17. Review your settings and click "Finish"

Configuration