Giter Site home page Giter Site logo

gitter-badger / windows-cloud-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jenkinsci/windows-cloud-plugin

0.0 0.0 0.0 277 KB

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

License: Apache License 2.0

Groovy 99.10% HTML 0.90%

windows-cloud-plugin's Introduction

Windows Plugin

Build Status Coverage Status

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.

Team :

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\admsrv> 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\admsrv> (Get-PSSessionConfiguration -Name Microsoft.PowerShell).Permission
NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllo
wed

Then launch

PS C:\Users\admsrv> 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\admsrv> 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 :

windows-cloud-plugin's People

Contributors

feirychris avatar mat1e avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.