Quantcast

Configure Jenkins slave through ssh gateway

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Configure Jenkins slave through ssh gateway

Gergo
Hi,

I'm new to Jenkins and have the following problem. What do you think
is the best way to configure in a Jenkins slave which is behind a
gateway? To reach my test environment I need to go through a gateway.
It would be great to somehow configure in the RemoteMachine (which is
located behind the gateway) as a slave. Can I somehow configure in an
ssh tunnel in Jenkins which could be used to reach the RemoteMachine?

Example
LocalMachine (Jenkins CI Server) <---(ssh)---> Gateway <---(ssh)--->
RemoteMachine (TestServer)

Thanks for the help!
Gergo
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Configure Jenkins slave through ssh gateway

Andrew Melo
On Tue, Oct 16, 2012 at 12:50 PM, Gergo <[hidden email]> wrote:

> Hi,
>
> I'm new to Jenkins and have the following problem. What do you think
> is the best way to configure in a Jenkins slave which is behind a
> gateway? To reach my test environment I need to go through a gateway.
> It would be great to somehow configure in the RemoteMachine (which is
> located behind the gateway) as a slave. Can I somehow configure in an
> ssh tunnel in Jenkins which could be used to reach the RemoteMachine?
>
> Example
> LocalMachine (Jenkins CI Server) <---(ssh)---> Gateway <---(ssh)--->
> RemoteMachine (TestServer)

My jenkins machine is behind a firewall, and I use the -D option of
ssh to set up a socks5 proxy I can point firefox to to get connected
to jenkins

HTH,
Andrew

>
> Thanks for the help!
> Gergo



--
--
Andrew Melo
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Configure Jenkins slave through ssh gateway

Bryan Hunt
In reply to this post by Gergo
Click the advanced button in the slave node configuration. There is a tunnel configuration option for you.

On Tuesday, October 16, 2012 10:50:33 AM UTC-7, Gergo wrote:
Hi,

I'm new to Jenkins and have the following problem. What do you think
is the best way to configure in a Jenkins slave which is behind a
gateway? To reach my test environment I need to go through a gateway.
It would be great to somehow configure in the RemoteMachine (which is
located behind the gateway) as a slave. Can I somehow configure in an
ssh tunnel in Jenkins which could be used to reach the RemoteMachine?

Example
LocalMachine (Jenkins CI Server) <---(ssh)---> Gateway <---(ssh)--->
RemoteMachine (TestServer)

Thanks for the help!
Gergo
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Configure Jenkins slave through ssh gateway

Gergo
Hi,

Thanks for the quick answers.
I found the "Tunnel connection through" configuration parameter in the
"Launch method -> Launch slave agents via Java Web Start". I really
wanted something similar but in the "Launch method -> Launch slave
agents on Unix machines via SSH". I came across these parameters:
"Prefix Start Slave Command", "Suffix Start Slave Command". Sadly I
had a really old version of Jenkins which was missing these very cool
options. With these I could execute an ssh command just before the
slave started.

Thanks,
Gergo

On Oct 16, 7:01 pm, Bryan Hunt <[hidden email]> wrote:

> Click the advanced button in the slave node configuration. There is a
> tunnel configuration option for you.
>
>
>
>
>
>
>
> On Tuesday, October 16, 2012 10:50:33 AM UTC-7, Gergo wrote:
>
> > Hi,
>
> > I'm new to Jenkins and have the following problem. What do you think
> > is the best way to configure in a Jenkins slave which is behind a
> > gateway? To reach my test environment I need to go through a gateway.
> > It would be great to somehow configure in the RemoteMachine (which is
> > located behind the gateway) as a slave. Can I somehow configure in an
> > ssh tunnel in Jenkins which could be used to reach the RemoteMachine?
>
> > Example
> > LocalMachine (Jenkins CI Server) <---(ssh)---> Gateway <---(ssh)--->
> > RemoteMachine (TestServer)
>
> > Thanks for the help!
> > Gergo
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Configure Jenkins slave through ssh gateway

Gábor Garami

I dunno if it can or can't work, but give a try for $HOME/.ssh/config and ProxyCommand on master.

Garami Gábor
[hidden email]
Skype: hron84
Tel: +36 20 235 9621

Sent from my T-Mobile G2
Ezt a levelet telefonról adták fel, ékezethibákat tartalmazhat.

2012.10.28. 17:36, "Gergo" <[hidden email]> ezt írta:
Hi,

Thanks for the quick answers.
I found the "Tunnel connection through" configuration parameter in the
"Launch method -> Launch slave agents via Java Web Start". I really
wanted something similar but in the "Launch method -> Launch slave
agents on Unix machines via SSH". I came across these parameters:
"Prefix Start Slave Command", "Suffix Start Slave Command". Sadly I
had a really old version of Jenkins which was missing these very cool
options. With these I could execute an ssh command just before the
slave started.

Thanks,
Gergo

On Oct 16, 7:01 pm, Bryan Hunt <[hidden email]> wrote:
> Click the advanced button in the slave node configuration. There is a
> tunnel configuration option for you.
>
>
>
>
>
>
>
> On Tuesday, October 16, 2012 10:50:33 AM UTC-7, Gergo wrote:
>
> > Hi,
>
> > I'm new to Jenkins and have the following problem. What do you think
> > is the best way to configure in a Jenkins slave which is behind a
> > gateway? To reach my test environment I need to go through a gateway.
> > It would be great to somehow configure in the RemoteMachine (which is
> > located behind the gateway) as a slave. Can I somehow configure in an
> > ssh tunnel in Jenkins which could be used to reach the RemoteMachine?
>
> > Example
> > LocalMachine (Jenkins CI Server) <---(ssh)---> Gateway <---(ssh)--->
> > RemoteMachine (TestServer)
>
> > Thanks for the help!
> > Gergo
Loading...