Skip to content

The plugin allow to configure a cloud of Windows computers. After configuration, Jenkins can create agent on theses computers using Windows Remote Management.

License

Notifications You must be signed in to change notification settings

groupe-edf/windows-cloud-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windows Cloud Plugin

Build Status Jenkins Plugin Installs Coverage Status Join the chat at https://gitter.im/jenkinsci/windows-cloud-plugin

This plugin builds Windows agents to perform builds.

It has been tested on VMware virtual machines with Windows Server 2012 R2 and Windows Server 2016.

Requirements

JNLP must be enabled on Jenkins.

Make sure you have WinRM configured on your server with NTLM or Basic authentication. See Microsoft documentation

Java must be installed on the server and included in Path environment variable.

WinRM Authorization Configuration

In a PowerShell terminal,

Check Winrm configuration :

PS C:\Users\admin> winrm get winrm/config
Config
(...)
    Service
        RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)(A;;GX;;;RM)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
        MaxConcurrentOperations = 4294967295
        MaxConcurrentOperationsPerUser = 1500
        EnumerationTimeoutms = 240000
        MaxConnections = 300
        MaxPacketRetrievalTimeSeconds = 120
        AllowUnencrypted = false
        Auth
            Basic = false // --> NTLM or Basic must be enabled
            Kerberos = true
            Negotiate = true // --> NTLM or Basic must be enabled
            Certificate = false
            CredSSP = true
            CbtHardeningLevel = Relaxed
        DefaultPorts
            HTTP = 5985 // --> Port for http
            HTTPS = 5986 // --> Port for https
        IPv4Filter = *
        IPv6Filter = *
        EnableCompatibilityHttpListener = false
        EnableCompatibilityHttpsListener = false
        CertificateThumbprint
        AllowRemoteAccess = true
(...)

Verify PowerShell permissions :

PS C:\Users\admin> (Get-PSSessionConfiguration -Name Microsoft.PowerShell).Permission
NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllo
wed

Then launch

PS C:\Users\admin> winrm configSDDL default

Add permission to "Remote Management User" by following steps :

  • Click on Add

  • Click on Locations

  • Select your computer

  • Click on Advanced

  • Click on Find Now

  • Select "Remote Management Users" and click on OK

  • Allow only Execute for "Remote Management Users"

Restart Winrm with the command :

PS C:\Users\admin> Restart-Service winrm

Plugin configuration

In the "Configure Clouds" section of Jenkins Nodes Configuration.

Add a new Windows cloud

Give a unique name to the cloud. Then click on "Cloud Details..."

In the Agent Properties section, fill the Jenkins URL. Then add a new Windows Host and click on "Host Details..."

Fill the fields like in the given example :

The Credential is an username and password type and the account used must be in Administrator group on the server.

Click on "Test Connection" to test the configuration. If it works, you should see the name of the windows computer and the user used to connect.

After configure a job to run on this host, you should see Jenkins agents created

Troubleshooting

The plugin was tested on a VMware virtual machine with 2 processors and 8GB Memory. The memory was wide, but the processor touched 100% many times.

When it happens, the creation of the agents can be slow or sometimes, it cannot be created before the timeout.

In this case, it is better to reduce the number of users allowed on the Host in the cloud configuration. If you really want to keep the max users, you can upgrade "Agent connection timeout", "Command timeout" in advanced properties of the host.

References

This project contains code under Apache-2.0 License from :

Team

Product Owner : Cloudehard

Developers : feirychris, mat1e

Microsoft expertise : Aelotmani

Contact

Any question ? You can ask it on the Gitter room or open an issue.

About

The plugin allow to configure a cloud of Windows computers. After configuration, Jenkins can create agent on theses computers using Windows Remote Management.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published