Skip to main content

How do I automate provisioning a new Managed Master?

Comments

4 comments

  • James Nord Engineering

    There is a CLI that your provisioning tools can call. There is a CLI call for creating Teams and updating their membership, There is also a CLI for creating Managed Masters

     

    0
  • Robert Patrick

    I tried using the cjoc cli managed-master-provision-and-start command but either I am doing something wrong or it does not work.  What am I missing?

    % java -jar jenkins-cli.jar -s https://<my-org>.cloudbees.net/cjoc/ -auth admin:<redacted> managed-master-provision-and-start master2

    ERROR: No such managed master exists: master2
    java -jar jenkins-cli.jar managed-master-provision-and-start NAME [--username VAL] [--password VAL] [--password-file VAL]
    Provisions and starts a Managed Master
    NAME : Managed master name
    --username VAL : User name to authenticate yourself to Jenkins
    --password VAL : Password for authentication. Note that passing a
    password in arguments is insecure.
    --password-file VAL : File that contains the password

    %

    0
  • Allan Burdajewicz

    Robert,

    You need to provide the full name of the master. You can execute the following to get that information:

    java -jar jenkins-cli.jar -s https://<my-org>.cloudbees.net/cjoc/ -auth admin:<redacted> list-masters

    Regards,

    0
  • Daniel Ritchie

    Sounds like you have a good solution identified, but FYI because I recently stumbled across this code snippet: 

    https://github.com/cloudbees/jenkins-scripts/blob/master/addClientMasterPlus.groovy

    0

Please sign in to leave a comment.

About CloudBees Support

Our Support Engineers are available to help with any questions or problems you may have with any of our products.