principleMinor
In Jenkins when to use SSH site and when to use a node?
Viewed 0 times
jenkinsnodesitewhenandusessh
Problem
What are the advantages of each option? What are the disadvantages? Is there a best practice in this? I fail to see any critical differences between them.
In my current place of employment we use nodes exclusively, however they are all in our internal network.
I have a task that needs to be delegated to an external server. It does not need access to our GIT. Essentially, it will upload data to a file server, and does not need to access our servers, network, data, etc.
In my current place of employment we use nodes exclusively, however they are all in our internal network.
I have a task that needs to be delegated to an external server. It does not need access to our GIT. Essentially, it will upload data to a file server, and does not need to access our servers, network, data, etc.
Solution
If I need to build, run checks, tests, ... I use a node.
If I want to open a connection to a server to deliver the built code to production for example, I use the sshCommand step from SSH Step plugin. When the code is delivered the ssh connection is closed.
Having a node always connected to your jenkins can be unpleasant. Let's say the server you connect to belongs to a partner and he wants to audit the times you connect to put the files on the server. In that case he cannot say. Having a node always connected also means you need to maintain the connection, imagine the server is configured to disconnect you after a while or the server reboots and the connection is not relaunched.
If I want to open a connection to a server to deliver the built code to production for example, I use the sshCommand step from SSH Step plugin. When the code is delivered the ssh connection is closed.
Having a node always connected to your jenkins can be unpleasant. Let's say the server you connect to belongs to a partner and he wants to audit the times you connect to put the files on the server. In that case he cannot say. Having a node always connected also means you need to maintain the connection, imagine the server is configured to disconnect you after a while or the server reboots and the connection is not relaunched.
Context
StackExchange DevOps Q#4925, answer score: 1
Revisions (0)
No revisions yet.