Jenkins Cluster with Windows & Linux Worker

Azure Public Test Date Azure Public Test Result

Azure US Gov Last Test Date Azure US Gov Last Test Result

Best Practice Check

Cred Scan Check

Deploy To Azure Deploy To Azure US Gov Visualize

  1. Start the Jenkins Master VM and access the the URL

    http://jenkins-cluster-mx.southeastasia.azure.com:8080/

  2. Create a remote ssh session (Use PuTTY or Ubuntu Bash or Git Bash) And enter following command to get the initial password.

    $ sudo cat /var/lib/jenkins/secret/initialAdminPassword
    
  3. Copy the content of file displayed by cat command. And paste this password in jenkins web-page. Click continue button and then use Install Suggested Plugins

  4. After Plugin Installation, it should then ask for New User creation. Create a new user (Admin) for regular login into jenkins dashboard.

  5. After User creation, continue to dashboard.

  6. Now, SSH into Master node to generate new SSH-Key Pair and copy it to node-1

    # Become ROOT user
    $ sudo -i
    # Become jenkins user
    $ su - jenkins
    ## No password prompt
    # Generate SSH Key Pair
    $ ssh-keygen
    # PRESS ENTER at ALL PROMPTS
    # Now, Copy SSH key
    $ ssh-copy-id jenkins@10.0.1.11
    Enter Password: pass@12345
    Add to Known Server: Yes
    ## Now, test it..
    $ ssh -i .ssh/id_rsa jenkins@10.0.1.11
    ## check if allowed to access node-1
    ## Exit from node-1
    $ exit
    # Print Private key on screen
    $ cat .ssh/id_rsa.pub
    # Copy the content of
    ## exit SSH Connection
    $ exit
    
  7. Now, You need to register 'node-1' with private-ip 10.0.1.11 as jenkins slave instance.

    Manage Jenkins > Manage Nodes & Cloud > New Node

    Name: Node-1
    Usage: Use this node as much as possible
    # Of executors: 2
    Remote Root directory: /home/jenkins
    Launch Method: Launch slave agent via SSH
    Host: 10.0.1.11
    Credentials: <CHOOSE SSH KeyPair Credentials>
    

Tags: Microsoft.Storage/storageAccounts, Microsoft.Network/publicIPAddresses, Microsoft.Network/networkSecurityGroups, Microsoft.Network/virtualNetworks, Microsoft.Network/networkInterfaces, Microsoft.Compute/virtualMachines, Microsoft.Compute/virtualMachines/extensions, CustomScript, CustomScriptExtension