adding remote hosts to jenkins programming - jenkins

In Jenkins there is a general SSH Plugin. that I plan to use now that The "Publish over SSH" is the old plugin and is deprecated."
How would I go about adding hundreds of remote hosts to a new Jenkins I am building using this plugin without manually adding the list of servers to jenkins
https://plugins.jenkins.io/ssh/

Related

Trigger JMeter tests on a remote system via Jenkins

how can we tell Jenkins to download and run JMeter tests on a remote system rather than from the Jenkins server itself?
My requirement is to create a job in Jenkins to download the latest code from a repo to another system where JMeter is installed and run the JMeter tests on that remote system rather than from Jenkins server itself? I can trigger the tests from Jenkins server itself but unable to connect to remote server and download/trigger the server.
You need to get familiarized with the concept of Jenkins Distributed Builds, it's enough to start Jenkins agent proces on the "remote system" and bind your job to execute on that agent instead of Jenkins master.
With regards to tracking changes in the remote repo check out Generic Webhook Trigger and How to Integrate Your GitHub Repository to Your Jenkins Project articles

Integrate jenkins and iib runtime

i want to setup build automation for IIB deployment using jenkins and enterprise github as a code repository.in my case, i have jenkins and iib runtime on different servers.
how do jenkins can run the IIB related run time commands and toolkit commands like mqsicreatebar in another server ?
is there any good approach for the above scenario ?
instead of building all IIb applications, i want to build only the project that was pushed to gitlab using post-receive hook script and generate environment specific bar files. ( using gitlab webhooks now)

How to use ssh jenkins plugin in pipeline to remotely execute in the remote machine

I used ssh plugin in Jenkins Job to ssh into a remote machine and run commands in that machine. I am trying to use the pipeline for Jenkins and I cannot find the script for the plugin.
It looks like this is not supported.
ssh-plugin is not listed in the pipeline compatibility list.
There is no reference to any workflow plugin inside the ssh-plugin POM, like in e.g. the ssh-agent plugins POM.
The last release of ssh-plugin is Jan 8, 2014.
I'd conclude this plugin is abandoned. However there is some commit activity. Consider writing an issue.

How do I pass on my build file from Jenkins to Saltstack master

We have a Jenkins system to automate build from Github, now we are implementing a Saltstack system. So I need to integrate my Jenkins with Salt-master so that it passes all the new builds to the master which then sends it across the salt-clients(minions).
The saltstack setup is in AWS cloud and and the Jenkins machine is outside the cloud in a local setup.
You could enable the salt-api and using the following plugin: https://wiki.jenkins-ci.org/display/JENKINS/saltstack-plugin then all of your jenkins builds can execute states / orchestrations etc. to any minions on a per job basis.
Another way of doing this is to have a minion running on the salt-master and install the jenkins slave on the same box. Then restrict the jenkins jobs to that jenkins slave and execute the commands as if you were at the command line. NOTE: this option requires a bit more configuration.

Jenkins- Create Jobs on different servers

I want to configure Jenkins to build my code on 1 server. Then want to deploy it on another server using Jenkins.Both servers are using Linux I want to automate the entire process as much as possible. I went through some of plugins like pipeline, Job Import Plugin, etc
Can anyone guide me how to go about it ? Which plugins will be useful ? Any example or tutorial somewhere will be useful. The configuration of build pipeline plugin on jenkins was not seamless for me.
Thanks,
Bhargav
I would work it this way :
Install jenkins on your first server
Install the following plugins : ssh credentials, ssh slaves, copy to
slave, and restart jenkins
Go to Manage jenkins -> Manage credentials, and add ssh credentials
for your second server
Go to Manage jenkins -> Manage nodes, and create a passive slave.
The launch method should be "Launch slave agents on Unix machines
via ssh". You should use the credentials that you have added in step
3
Create a job to build your code. In the advanded options of job, you
should indicate that the job must only be built on master node.
Create a job to deploy your code on the second server. In the
avanded options of job, you should indicate that the job must only
be built on slave node.
In the "Build Environment" section, check the "Copy files into workspace before building" box and configure what files you want to copy from first server (https://wiki.jenkins-ci.org/display/JENKINS/Copy+To+Slave+Plugin)
The code will be copied into the jenkins slave's workspace.

Resources