I take a snapshot as the pristine image, and for convenience make it the same 
name on all nodes. Then I configure a build cloud for the vsphere cloud 
instance (I use 3 for various purposes) and then configure a new node running 
as a slave computer running under your new vsphere cloud (instead of as a dumb 
slave for instance). Run the tests provided by the plugins, as it needs good 
vcenter and vsphere connectivity, and it just works. One caveat, I usually set 
the nodes up to snap back to the snapshot at the start of a job, which extends 
the job by 2 - 3 minutes. This allows me to debug after a job has failed, by 
locking the node offline and then digging into what was left. Doing it at the 
and of a job speeds things up, by makes it nearly impossible to diagnose a 
build problem.



On Mon, 2017-07-03 at 04:07 -0700, P wrote:
Hi John,

thanks for sharing your experience with this kind of "issues". Based on what 
you have sent I am giving up (at least for now) with creating new VMs and 
follow your steps.
How do you use vsphere plugin to reset the slave back ? Are you using VM 
snapshots ?

I would be grateful if you could send me your config changes :-)

Best regards
P.


On Tuesday, June 27, 2017 at 2:01:24 PM UTC+1, John Mellor wrote:
P asked:

>  So how do you guys use jenkins slaves on VMware ? Do you use existing VMs ?

I use vsphere slaves extensively, but only as existing VMs.  I never managed to 
get a dynamically-constructed slaves to actually work, but perhaps there is 
some magic combination of undocumented incantations that does it.  I have many 
Developers who leave all kinds of cruft around from their builds, install 
prereq packages, reconfigure ssh keys, ntp, dns, etc in their build steps.  I 
use the vsphere plugin to reset the slave back to a known-good condition at the 
start of the next build (that leaves the slave as the previous build left it, 
so I can debug what went wrong).

Its somewhat unfortunate that the plugin only uses vcenter api, as otherwise I 
could use the free version of esxi and also not need the $12k vcenter licence 
in this stack.  The software licences cost about 3x what the hardware costs, so 
you know something is wrong with that model.

For many job types, I also use the CloudBees Docker plugin to build jobs that 
do not build Docker images and do not require a different kernel or libc to 
build correct product.  It seems to be the only one that actually works, and 
provides the pristine environment for a lot less overhead.  I wish there was 
some kind of quality information associated with each Jenkins plugin, as there 
is a *LOT* of crap in the library.

I used to use the Debian pbuilder containers with a pretty large set of 
scripted wrappers in the C++ builds, but Docker images are an improvement.

If you need, I can send you my config changes that I use to thread the needle…



From: [email protected]<javascript:> 
[mailto:[email protected]<javascript:>] On Behalf Of P
Sent: June-27-17 03:17
To: Jenkins Users <[email protected]<javascript:>>
Subject: Re: vSphere Cloud Plugin - does it work ?

It looks like VSphere Cloud plugin is not very widely used ....
So how do you guys use jenkins slaves on VMware ? Do you use existing VMs ?
I am a bit surprised nobody is creating dynamically VMs for Jenskins ...

Best regards
P.


On Tuesday, June 20, 2017 at 12:34:19 PM UTC+1, P wrote:
Hello all,

I am trying to use vSphere Cloud Plugin to create new VM for some test 
deployment.
Unfortunatelly it doesn't work and I don't really know why. Below is the error 
message I get when I press "Check Data" button
while defining "vSphere Build Step":
https://gist.github.com/anonymous/b355bed14171f8afa066dd18e8191179
I also include the configuration I use.

Can anybody have a look and tell me why it is failing ?
Kind regards
P.

--
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 [email protected]<javascript:>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7a37767a-285d-4b18-8ee6-2ac684a48e11%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/7a37767a-285d-4b18-8ee6-2ac684a48e11%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1499174621.13800.1.camel%40esentire.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to