Discussion:
Windows Agent As a Service
Mark Bidewell
2018-10-15 20:17:52 UTC
Permalink
With Java Web Start deprecated and slated for removal, what is the
canonical way to create a Windows Service agent?

Thanks!
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/439b2186-1f70-46bd-b0f8-c54512eb428b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mark Waite
2018-10-15 20:30:41 UTC
Permalink
The deprecation of Java Web Start doesn't deprecate the protocols that a
Jenkins agent can use to connect to the Jenkins server. JNLP works just
fine with Java 11 to connect an agent.

The convenience of clicking the "Web Start" button on the UI won't work
with Java 11, but the command line provided in the agent start page
continues to work.

Mark Waite
Post by Mark Bidewell
With Java Web Start deprecated and slated for removal, what is the
canonical way to create a Windows Service agent?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/439b2186-1f70-46bd-b0f8-c54512eb428b%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/439b2186-1f70-46bd-b0f8-c54512eb428b%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEF%2BVvGu9TAm8P2YPcYgOQN899r0DfS%3DfXJj2eRdb%2BMLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Mark Bidewell
2018-10-15 20:35:29 UTC
Permalink
Thanks! but how do you make it run as a service from the command-line?
done of the exes seem to be installed?
Post by Mark Waite
The deprecation of Java Web Start doesn't deprecate the protocols that a
Jenkins agent can use to connect to the Jenkins server. JNLP works just
fine with Java 11 to connect an agent.
The convenience of clicking the "Web Start" button on the UI won't work
with Java 11, but the command line provided in the agent start page
continues to work.
Mark Waite
Post by Mark Bidewell
With Java Web Start deprecated and slated for removal, what is the
canonical way to create a Windows Service agent?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/439b2186-1f70-46bd-b0f8-c54512eb428b%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/439b2186-1f70-46bd-b0f8-c54512eb428b%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/06519949-d6f0-49dd-9349-62b56b776e4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Vladimir Zak
2018-10-15 20:37:44 UTC
Permalink
Download agent and as admin run agent.jar -install . It should create the
service.

Or it was like that in the past.

Vladimír
Post by Mark Bidewell
Thanks! but how do you make it run as a service from the command-line?
done of the exes seem to be installed?
Post by Mark Waite
The deprecation of Java Web Start doesn't deprecate the protocols that a
Jenkins agent can use to connect to the Jenkins server. JNLP works just
fine with Java 11 to connect an agent.
The convenience of clicking the "Web Start" button on the UI won't work
with Java 11, but the command line provided in the agent start page
continues to work.
Mark Waite
Post by Mark Bidewell
With Java Web Start deprecated and slated for removal, what is the
canonical way to create a Windows Service agent?
Thanks!
--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/439b2186-1f70-46bd-b0f8-c54512eb428b%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/439b2186-1f70-46bd-b0f8-c54512eb428b%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/06519949-d6f0-49dd-9349-62b56b776e4f%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/06519949-d6f0-49dd-9349-62b56b776e4f%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAHRFW7iDYGVnQoqQt6g8wSgvLM1pL5JHWC2-_FqBop%3Djr8zDCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Jason Pyeron
2018-10-15 21:05:03 UTC
Permalink
From: jenkinsci-***@googlegroups.com [mailto:jenkinsci-***@googlegroups.com] On Behalf Of Mark Bidewell
Sent: Monday, October 15, 2018 4:35 PM
To: Jenkins Users <jenkinsci-***@googlegroups.com>
Subject: Re: Windows Agent As a Service



Thanks! but how do you make it run as a service from the command-line? done of the exes seem to be installed?







We use a scheduled task and batch file like so:



agent.xml:



<?xml version="1.0" encoding="UTF-16"?>

<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">

<RegistrationInfo>

<Date>2018-05-09T14:00:56.3287384</Date>

<Author>domain\user</Author>

<Description>Jenkins node/slave agent launcher</Description>

</RegistrationInfo>

<Triggers>

<BootTrigger>

<Enabled>true</Enabled>

</BootTrigger>

</Triggers>

<Principals>

<Principal id="Author">

<UserId>S-1-5-18</UserId>

<RunLevel>HighestAvailable</RunLevel>

</Principal>

</Principals>

<Settings>

<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>

<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>

<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>

<AllowHardTerminate>true</AllowHardTerminate>

<StartWhenAvailable>true</StartWhenAvailable>

<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>

<IdleSettings>

<StopOnIdleEnd>true</StopOnIdleEnd>

<RestartOnIdle>false</RestartOnIdle>

</IdleSettings>

<AllowStartOnDemand>true</AllowStartOnDemand>

<Enabled>true</Enabled>

<Hidden>false</Hidden>

<RunOnlyIfIdle>false</RunOnlyIfIdle>

<WakeToRun>false</WakeToRun>

<ExecutionTimeLimit>PT0S</ExecutionTimeLimit>

<Priority>7</Priority>

<RestartOnFailure>

<Interval>PT30M</Interval>

<Count>399</Count>

</RestartOnFailure>

</Settings>

<Actions Context="Author">

<Exec>

<Command>c:\jenkins\agent.cmd</Command>

<WorkingDirectory>c:\jenkins\</WorkingDirectory>

</Exec>

</Actions>

</Task>





agent.cmd:



REM set PATH, change drive, change directory, etc...

java -jar agent.jar -jnlpUrl https://jenkins.server.tld/jenkins/computer/hostname/slave-agent.jnlp -secret 9999999999999999999999999999999999999999999999999999999999999999 1>> agent-%date:~-4,4%%date:~-10,2%%date:~-7,2%.log 2>&1

set agenExitCode=%errorlevel%

(echo %date% %time% jenkins agent exit && echo exit code %agenExitCode%) 1>> agent-%date:~-4,4%%date:~-10,2%%date:~-7,2%.log 2>&1

exit /B %agenExitCode%




On Monday, October 15, 2018 at 4:31:03 PM UTC-4, Mark Waite wrote:

The deprecation of Java Web Start doesn't deprecate the protocols that a Jenkins agent can use to connect to the Jenkins server. JNLP works just fine with Java 11 to connect an agent.



The convenience of clicking the "Web Start" button on the UI won't work with Java 11, but the command line provided in the agent start page continues to work.



Mark Waite



On Mon, Oct 15, 2018 at 2:18 PM Mark Bidewell <***@gmail.com <javascript:> > wrote:

With Java Web Start deprecated and slated for removal, what is the canonical way to create a Windows Service agent?



Thanks!
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-***@googlegroups.com <javascript:> .
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/439b2186-1f70-46bd-b0f8-c54512eb428b%40googlegroups.com <https://groups.google.com/d/msgid/jenkinsci-users/439b2186-1f70-46bd-b0f8-c54512eb428b%40googlegroups.com?utm_medium=email&utm_source=footer> .
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com <mailto:jenkinsci-users+***@googlegroups.com> .
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/06519949-d6f0-49dd-9349-62b56b776e4f%40googlegroups.com <https://groups.google.com/d/msgid/jenkinsci-users/06519949-d6f0-49dd-9349-62b56b776e4f%40googlegroups.com?utm_medium=email&utm_source=footer> .
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/019001d464ca%24bdf99990%2439ecccb0%24%40pdinc.us.
For more options, visit https://groups.google.com/d/optout.
Jason Pyeron
2018-10-15 21:03:59 UTC
Permalink
Bottom line up front – we are fine until 2025




From: jenkinsci-***@googlegroups.com [mailto:jenkinsci-***@googlegroups.com] On Behalf Of Mark Bidewell
Sent: Monday, October 15, 2018 4:18 PM
To: Jenkins Users <jenkinsci-***@googlegroups.com>
Subject: Windows Agent As a Service



With Java Web Start deprecated and slated for removal, what is the canonical way to create a Windows Service agent?





Consequently:

* Oracle will extend support for Web Start in Java SE 8 from March, 2019, through at least March 2025.

* Oracle products that have dependencies on Web Start will remain on Java SE 8 and continue with the support timelines as indicated by those products.

* Oracle will not include Java Web Start in Java SE 11 (18.9 LTS) and later.

* Oracle will begin encouraging application developers and users to transition away from Java Web Start and encourage non-commercial consumers to remove any unused or non-supported Oracle JRE installations from their desktops.

* Developers who deploy desktop applications to individual consumers (eg, games, personal banking, or other B2C applications) will need to transition to other deployment technologies such as the jlink and/or third party packaging and deployment solutions before the end of 2020.

* Application developers who target applications for internal data processing, business, commercial, or production purposes, will either need to seek commercial license with Oracle, or transition to other deployment technologies by January 2019.



https://www.oracle.com/technetwork/java/javase/javaclientroadmapupdate2018mar-4414431.pdf







Thanks!
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com <mailto:jenkinsci-users+***@googlegroups.com> .
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/439b2186-1f70-46bd-b0f8-c54512eb428b%40googlegroups.com <https://groups.google.com/d/msgid/jenkinsci-users/439b2186-1f70-46bd-b0f8-c54512eb428b%40googlegroups.com?utm_medium=email&utm_source=footer> .
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/018101d464ca%249805df00%24c8119d00%24%40pdinc.us.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...