Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Provisioning Configuration

Jeremy Poulin edited this page Dec 10, 2018 · 16 revisions

The provisioning config file allows the user to override the defaults used by the provisioner to get machines. Some of these are expected to be overwritten, since they are mandatory for the provisioner environment to be set up properly. Others are completely optional.

Getting a Overwritable ProvisioningConfig

You can get the config from through the MAQEAPI object, as shown below.

def config = MAQEAPI.v1.getProvisioningConfig(this)

For here, you can overwrite the variable as follows.

config.variableName = variableValue

A few of these variables have an Overwrites Default variable that can be used to change the default at runtime. This is most commonly done through the params object, which is exposed to the job via the build parameters. Others you can overwrite using the env object, which can be added in the Jenkins configure settings.

Configurable Variables

version

  • Available Since: v0.2
  • Default Value: v1.2.1
  • Description: Provisioner version
  • Required: true
  • Type: String

cloudName

  • Available Since: v0.2
  • Default Value: openshift
  • Description: Jenkins kubernetes cloud name
  • Required: true
  • Type: String

jobgroup

  • Available Since: v0.2
  • Default Value: ''
  • Description: Job group for Beaker provisioning.
  • Required: true
  • Type: String

hostrequires

  • Available Since: v0.2
  • Default Value: []
  • Description: Host requirements to pass to linchpin
  • Required: false
  • Type: List<HashMap>

tenant

  • Available Since: v0.2
  • Default Value: redhat-multiarch-qe
  • Description: name of Openshift tenant to pull provisioning image from.
  • Required: true
  • Type: String

dockerUrl

  • Available Since: v0.2
  • Default Value: 172.30.1.1:5000
  • Description: docker url to pull provisioning image from.
  • Required: true
  • Type: String

provisioningImage

  • Available Since: v0.2
  • Default Value: provisioner
  • Description: name of provisioning image. Can include tag name.
  • Required: true
  • Type: String

provisioningRepoUrl

  • Available Since: v0.2
  • Default Value: https://github.com/redhat-multiarch-qe/multiarch-ci-libraries'
  • Description: Provisioning repo url
  • Required: false
  • Type: String

provisioningRepoRef

  • Available Since: v0.2
  • Default Value: version
  • Description: Provisioning repo ref
  • Required: false
  • Type: String

provisioningWorkspaceDir

  • Available Since: v0.2
  • Default Value: workspace
  • Description: Provisioning workspace location (needed for Linchpin). This can reference a relative path in the above repo or it can reference a relative path that already exists in the current directory
  • Required: true
  • Type: String

hostTypePriority

  • Available Since: v1.2.0
  • Default Value: []
  • Description: The default priority order for provisioning host types. Empty array means that no order is specified.
  • Required: true
  • Type: String

providerPriority

  • Available Since: v1.2.0
  • Default Value: []
  • Description: The default priority order for provisioning provider types. Empty array means that no order is specified.
  • Required: true
  • Type: String

provisionerPriority

  • Available Since: v1.2.0
  • Default Value: []
  • Description: The default priority order for provisioner types. Empty array means that no order is specified.
  • Required: true
  • Type: String

krbPrincipalCredentialId

  • Available Since: v1.0
  • Default Value: redhat-multiarch-qe-krbprincipal
  • Description: Id of the the Jenkins credential for the Kerberos principal needed for Beaker authentication.
  • Required: true
  • Type: String

keytabCredentialId

  • Available Since: v0.2
  • Default Value: redhat-multiarch-qe-keytab
  • Description: ID of Jenkins credential for keytab needed for Beaker authentication.
  • Required: true
  • Type: String

krbConfCredentialId

  • Available Since: v1.0
  • Default Value: redhat-multiarch-qe-krbconf
  • Description: ID of the Jenkins credential for the krb conf needed for Beaker authentication.
  • Required: true
  • Type: String

bkrConfCredentialId

  • Available Since: v1.0
  • Default Value: redhat-multiarch-qe-bkrconf
  • Description: ID of the Jenkins credential for the bkr conf needed for Beaker authentication.
  • Required: true
  • Type: String

sshPrivKeyCredentialId

  • Available Since: v0.2
  • Default Value: redhat-multiarch-qe-sshprivkey
  • Description: ID of Jenkins credential for SSH private key to will be copied to provisioned resource. *** This must be the same as what was added to Beaker ***
  • Required: true
  • Type: String

sshPubKeyCredentialId

  • Available Since: v0.2
  • Default Value: redhat-multiarch-qe-sshpubkey
  • Description: ID of Jenkins credential for SSH public key to will be copied to provisioned resource *** This must be the same as what was added to Beaker ***
  • Required: true
  • Type: String

jenkinsSlaveCredentialId

  • Available Since: v0.2
  • Default Value: jenkins-slave-credentials
  • Description: ID of the Jenkins credential for the username and password used by cinch to connect the provisioned host to the Jenkins master
  • Required: false
  • Type: String

jenkinsMasterUrl

  • Available Since: v0.2
  • Default Value: ''
  • Description: URL of the Jenkins master that cinch will use to connect the provisioned host as a slave.
  • Overwrites Default: env.JENKINS_MASTER_URL
  • Required: false
  • Type: String

jswarmExtraArgs

  • Available Since: v0.2
  • Default Value: ''
  • Description: Extra arguments passed to the jswarm call. Allows for the connection to be tunneled in the case of an OpenShift hosted Jenkins.
  • Overwrites Default: env.JSWARM_EXTRA_ARGS
  • Required: false
  • Type: String

mode

  • Available Since: v1.2.0
  • Default Value: SSH
  • Description: How Jenkins should connect to the provisioned host. Replaces runOnSlave.
  • Required: true
  • Type: String
  • Valid Values: SSH, JNLP

installAnsible

  • Available Since: v0.2
  • Default Value: true
  • Description: Whether Ansible should be installed on the provisioned host.
  • Required: true
  • Type: Boolean
  • Valid Values: true, false

installCredentials

  • Available Since: v1.0
  • Default Value: true
  • Description: Whether the ssh keypair and kerberos keytab should be installed on the provisioned host.
  • Required: true
  • Type: Boolean
  • Valid Values: true, false

installRhpkg

Installing RHPKG requires installCredentials to be true. Also, when calling RHPKG, the default user is pulled from Kerberos, so you may need to override it to match the user whose keys are installed. In the Multi-Arch QE Jenkins environment, this means passing --user jenkins to the RHPKG calls.

  • Available Since: v1.0
  • Default Value: false
  • Description: Whether rhpkg should be installed on the provisioned host.
  • Required: true
  • Type: Boolean
  • Valid Values: true, false

Deprecated

krbPrincipal

  • Available In Versions: v0.2
  • Default Value: jenkins/multiarch-qe-jenkins.rhev-ci-vms.eng.rdu2.redhat.com
  • Description: Kerberos principal for Beaker authentication.
  • Required: true
  • Type: String
  • Valid Values: Kerberos Principal

runOnSlave

  • Available In Versions: v0.2 to v1.2.0
  • Default Value: true
  • Description: Whether the closure should be run on directly on the provisioned host.
  • Overwrites Default: ``
  • Required: true
  • Type: Boolean
  • Valid Values: true, false