Jenkins Master on VM Linux Centos and Jenkins Slave on VM Windows 7 - maven

Texte d'origine Ecoutez le texte source
Hi
Please, can you give me your opinions about this subject :
1.I have instaled Jenkins on VM Linux Centos
2.I have installed Jenkins on VM Windows 7 which contains the project Java Maven.
3.I shared the project from VM Windows 7 to VM Linux Centos and I succed to the project from my VM Linux
My goal is to make Jenkins Master on VM linux and Jenkins slave on VM Windows.
What I should do for creating the communication between all jenkins.
Thanks in Advance.
Best Regards,

Two ways of making a Windows slave (after defining nodes on master), on Windows server:
-browse to Jenkins node listing and launch web agent (Java Web Start) which has to be done manually each time the server starts up
-after starting the agent, register the slave as a service
Plenty of documentation, I found this just now.
Definitely prefer a service you don't have to worry about the web agent dying for some unknown reason and no one noticing, much better to have it auto start.

Related

Deploy Laravel docker project on a Linux server

I'm working on Laravel projects with Docker containers (Php-FPM, Nginx, xdebug, ...) under Windows OS + Netbeans. Docker simplifies life for all projects at start.
But as many, I need to frequently deploy my work on internal TEST servers (centOS 8) and further on PROD servers (centOS 8).
Repo are on SASS GitLab.
What can you advise me as a method for deploying my laravel projects with docker containers on TEST / PROD servers knowing that they are under centOS and that my Docker containers works on a Linux OS that escapes me.
Are there any compatibility issues between docker containers and another OS Linux Server?
Should I create SSH tunnels to execute Rsync scripts from Windows (DEV) to Linux (TEST & PROD) to deploy my projects?
What are the up to date methods?
MAJ : My wishes would be to reuse docker containers on TEST a PROD centOS servers in order to benefit without have to reconfigure any web servers and so on ...
Thanks for your help,
Best regards

Jenkins through docker: How to configure own host as agent for jenkins?

I'm using Jenkins with pipelines on a mac-mini. All builds are working fine with docker agents (backend, frontend, android app, etc)
The only thing I haven't been able to achieve is to use my own mac-mini as build-agent/slave for the IOS app (I need to build on OSX). Jenkins itself runs through docker as well, so I would need to connect to the host (the OS of the mac-mini) and use that as an agent...
I know one option would be to install jenkins instead of using docker, but I would prefer to keep Jenkins running in a docker container.
Does someone has experience with this or knows any good documentation on how to set this up?
Go to Manage Jenkins > Manage Nodes > New Node.
Configure a node.
Go to the list of nodes.
Select your newly configured node. It should be offline at this moment.
Run the java command displayed on the interface on your host machine.
Your Host machine is now a slave.

Jenkins windows slaves not launching

Am Using Jenkins, where so many windows machine i have integrated,but at the same all the windows machine got disconnected could not able to launch slave in windows machine,tried all possibilities like
1) slave.jar version upgrade
2)Java_home_path changes
but my doubt is with port, am getting error while launching that slave as follows
enter image description here
So how to connect windows slave , Hope it may be the issue with port connection.TCP port 443 used but getting error. Please suggest good idea.

Using a Windows VM from Jenkins through vsphere

I'm trying to reset-and-launch a Windows VM (in vsphere) during a Jenkins job. I successfully installed the vSphere Cloud Plugin. I've followed instructions to setup the Windows machine as a jenkins-mvn-slave, and have it setup to run as a service.
If I click on the button in Jenkins for Launch Slave Agent, I can see (in vsphere) that the VM does a revert snapshot, and then it does a power on virtual machine. If I attach to the machine, I can see that the Jenkins service starts automatically. However, back in Jenkins, it tells me that the Slave did not come online in allowed time.
Some key settings for my slave:
Force VM launch: Checked
Wait for VMTools: Not checked
Delay between launch and boot complete: 120
Secondary launch method: Launch slave agents view Java Web Start
Versions:
Jenkins: 1.596.2
vSphere: 5.5.0
Windows: Server 2012 R2 Standard, Build 9600
vSphere plugin: 2.7
What am I missing?
I've done a lot of messing around since I posted, but I think the following is what I was doing wrong. I first got the VM working as a normal slave agent. Once I had that working, then I tried to setup the same as a vsphere-cloud-slave-agent. I wasn't realizing that setting up a host as a slave agent is "agent-name specific".
So, I uninstalled the Jenkins service, launched the "vsphere cloud slave agent", logged into the machine, and ran javaws (as specified in the previously mentioned instructions.
A couple of other gotchas that I encountered (not relevant to the initial post, but maybe relevant to someone who reads this):
I originally installed git with a password manager. Unfortunately, since jenkins jobs aren't interactive, it was hanging on the git clone command. I tried uninstalling and re-installing git, but it didn't fix the problem for whatever user the jenkins slave was running as. I ended up having to revert to a previous slave image and install git from there. (I probably could have also figured out what user was running the jenkins slave, and entered the desired password there.)
I wanted to run a clean VM for each job. I never figured out this one. If I set Availability to Take this slave on-line when in demand and off-line when idle, that was a good start. However, if I set the times to 0 and 0, then the machine was constantly rebooting. If I set the times to 1 and 1, then the machine does mostly what I want, unless there are back-to-back jobs queued to run.

Execute Windows scripts from a remote Rundeck server

I installed the Rundeck server in one Linux machine.
Tomcat is running in a Windows 7 machine.
Now, I want to stop and start the Tomcat service in the Windows machine by creating a job in Rundeck (on the Linux machine).
Is it possible?
Yes, this is possible.
Install Cygwin, including openssh-server to the Windows machine. Generate a public key for the Rundeck server user and add it to the .authorized_hosts file on the Windows machine. Ensure you have port 22 or an alternate port accessible for SSH.
In rundeck, create a new job which fires the Tomcat executable or any commands you prefer for starting/stopping the service.
It may help to prefix the Rundeck job command with some $PATH variables if the connecting user account has trouble locating executables in the Windows/Cygwin environment.

Resources