Thanks for the explanation.  It definitely clarifies things.  My usage of
Jenkins slaves is all theoretical at this point (working on a new
master+multi-slave setup soon) so my terminology is slightly off.

On Wed, Oct 10, 2012 at 8:47 PM, Richard Lavoie <lavoie.rich...@gmail.com>wrote:

> Comments inlined.
>
> On Wed, Oct 10, 2012 at 7:59 PM, Jeff <predato...@gmail.com> wrote:
>
>> Your suggested file uri format works ... thanks!  Though it seems non
>> standard (http://en.wikipedia.org/wiki/File_URI_scheme) which is why it
>> confused me.  If it is passed directly to a java URL object, I would have
>> thought many of the formats I tried would work.
>>
>>
>> Anyway, as for the "matching" I'm still trying to digest the nuances of
>> how jenkins nodes and selenium nodes work together.
>>
>> Is a "jenkins node" the same as a Jenkins slave?
>>
>
> Yup, but the jenkins master is also a jenkins node. So you can also run
> selenium node configuration on the master.
>
> Internally of jenkins, all the slaves are what I called jenkins nodes. The
> jenkins master also runs a "computer" object internally of jenkins.
>
>
>>
>> If so, then if I use the "Match nodes from a label expression" option, I
>> can associate a specific "selenium node" configuration to a subset of
>> Jenkins slaves where the Jenkins slave name matches the given label
>> expression?
>>
>> So for example, if I have slaves called LinuxSlave-1, LinuxSlave-2,
>> WindowsSlave-1, WindowsSlave-2 and I have a "selenium node" configuration
>> with a label expression like "Windows*", then that selenium node
>> configuration would be sent to all jenkins Windows slaves?
>>
>> If that is not correct, could you outline an example?
>>
>
> In each of your slaves (http://jenkins/manage/node/NODENAME_OR_(master)/)
> , there is a field configuration for label expressions, the "Match from a
> label expression" uses that field to match against that slave. It doesn't
> take the name of the node but the label options. Although I could add
> another matcher for slave names. Might add that in the next version, thanks
> for the idea but it's just that most plugins tries to use the labels
> instead of node names because the names doesn't really describe it as good
> as label can do. I mean that you can have multiple label that would defined
> what your slave is really about while the name is only a single label to
> recognize it.
>
>
>>
>>
>
>> If I have a Jenkins Master with multiple Jenkins slaves, does the SeGrid2
>> plugin run one "hub" on the master and zero or more seleniuim "hub"s on the
>> master and/or slaves?
>>
>
> The plugin spawns the grid hub on the master on start. All the node
> configurations spawns a selenium process with "-role node" option and
> connects to the jenkins master grid hub. It is correct that a slave can
> have 0 or more configurations running on it.
>
>
> Let's make a not so complex example:
>
>
> Master is configure with label master.
> Let's say you have 5 slaves, Windows1 (labels Windows, IE), Windows2
> (labels Windows), Linux1 (Labels Linux), Linux2 (labels Linux), Solaris
>
> Then you create 5 selenium configurations:
> 1. This configuration matcher on All nodes and specifies 5 instances of
> firefox browsers
> 2. This configuration matches on Nodes that have label Windows and spawns
> 5 instances of chrome
> 3. This configuration matches on Nodes that have label IE and spawns 1
> instance of IE
> 4. This configuration matches on Nodes that have label Linux and spawns 3
> instances of chrome
> 5. This configuration matches no nodes as it was a test and you "disabled"
> it.
>
> In the end what would happen (when the slaves are started or when jenkins
> starts)
>
> Master jenkins would run the hub (always running even if there are no
> configuration in the system) and configuration 1
> Windows1 would run configuration 1,2,3
> Windows2 would run configuration 1,2
> Linux1 would run configuration 1,4
> Linux2 would run configuration 1,4
> Solaris would run configuration 1
>
> All the slave nodes would connect to the jenkins master selenium hub, and
> you will be able to see that from http://jenkins/selenium
>
> You also have to note that changing a configuration won't have any effect
> on the running selenium processes on the slaves. To put the changes into
> effect, you have to either restart the service  from the slave
> configuration page or by clicking on the node matching that configuration,
> or restart jenkins (a bit too much, that's why the restart service option
> exists)
>
> Does that explains better the plugin ?
>
>
>
>> Thank you!
>>
>> On Wed, Oct 10, 2012 at 4:51 PM, Richard Lavoie <lavoie.rich...@gmail.com
>> > wrote:
>>
>>> Comments inlined.
>>>
>>> On Wed, Oct 10, 2012 at 4:22 PM, Jeff <predato...@gmail.com> wrote:
>>>
>>>> I'm missing something simple and the documentation for the Selenium
>>>> Grid Plugin doesn't cover these in any detail.  I'm using the latest
>>>> Selenium Plugin with Jenkins v1.482.
>>>>
>>>> *First:*
>>>>
>>>> I can't get the plugin to find my JSON file that I'm trying to use to
>>>> configure the node.  I've tried the following:
>>>>
>>>> C:\.jenkins\SeleniumNodeConfig\nodecfg.json
>>>> C:/.jenkins/SeleniumNodeConfig/nodecfg.json
>>>> C:\\.jenkins\\SeleniumNodeConfig\\nodecfg.json
>>>> file:///C:/.jenkins/SeleniumNodeConfig/nodecfg.json
>>>> file:////.jenkins/SeleniumNodeConfig/nodecfg.json
>>>> C:/Temp/nodecfg.json
>>>> file:///C:/Temp/nodecfg.json
>>>>
>>>>
>>>
>>> did you try file:/c:/Temp/nodecfg.json ?
>>>
>>>
>>> I'll try to look into it tonight to at least add some examples. I
>>> thought people would prefer using the HTTP scheme than local files for
>>> distributed environment.
>>>
>>>
>>>>  But Jenkins throws a NullPointerException during startup in each case:
>>>>
>>>> java.lang.NullPointerException
>>>>  at
>>>> hudson.plugins.selenium.PluginImpl.getGlobalConfigurationForComputer(PluginImpl.java:598)
>>>>  at
>>>> hudson.plugins.selenium.PluginImpl.startSeleniumNode(PluginImpl.java:505)
>>>> at
>>>> hudson.plugins.selenium.ComputerListenerImpl.onOnline(ComputerListenerImpl.java:26)
>>>>  at jenkins.model.Jenkins.<init>(Jenkins.java:832)
>>>> at hudson.model.Hudson.<init>(Hudson.java:81)
>>>>  at hudson.model.Hudson.<init>(Hudson.java:77)
>>>> at hudson.WebAppMain$2.run(WebAppMain.java:214)
>>>>
>>>> What am I missing?
>>>>
>>>>
>>>>
>>>> *Second:*
>>>>
>>>> Can anyone explain the "Matching type" setting in the node
>>>> configuration editor?  I am not grasping what it is "matching" to?  I
>>>> thought that the configuration is defining the node itself so how or what
>>>> is it matching to?
>>>>
>>>>
>>>>
>>> The concept of configurations in this plugin is global to all nodes. It
>>> will try to apply all the "matching" configurations to every nodes it can
>>> work on. So when a node comes online, for each configurations defined, it
>>> will ask the matcher if this configuration is allowed on this node. There
>>> are currently 3 matchers, All (will run this configuration on all the
>>> nodes), None (will run it on no nodes, hence disable a configuration) and
>>> label matching where the configuration will run on this node only if this
>>> computer label matches the specified label expression.
>>>
>>> There is a distinction to make in between a selenium node (a running
>>> java process on the machine) and the jenkins computer node (the machine
>>> slave/master that will host the selenium java process)
>>>
>>>  While this plugin creates selenium node configurations, the selenium
>>> configurations are applied to jenkins computer nodes.
>>>
>>> Hope that clarifies it.
>>>
>>>
>>> Thanks!
>>>>
>>>> --
>>>> Jeff Vincent
>>>> predato...@gmail.com
>>>> See my LinkedIn profile at:
>>>> http://www.linkedin.com/in/rjeffreyvincent
>>>> I ♥ DropBox <http://db.tt/9O6LfBX> !!
>>>>
>>>>
>>>
>>>
>>> --
>>> Richard Lavoie
>>> IT consultant / consultant en informatique
>>>
>>
>>
>>
>> --
>> Jeff Vincent
>> predato...@gmail.com
>> See my LinkedIn profile at:
>> http://www.linkedin.com/in/rjeffreyvincent
>> I ♥ DropBox <http://db.tt/9O6LfBX> !!
>>
>>
>
>
> --
> Richard Lavoie
> IT consultant / consultant en informatique
>



-- 
Jeff Vincent
predato...@gmail.com
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
I ♥ DropBox <http://db.tt/9O6LfBX> !!

Reply via email to