Installing CloudBees CI on modern cloud platforms on OpenShift

4 minute read

Make sure to review the OpenShift pre-installation requirements before you install CloudBees CI on modern cloud platforms. The supported Helm versions are listed in the Supported platforms page.

Typically, controllers are provisioned using a full context path such as http://acme.com/controller1 and you access the operations center using a URL like http://acme.com/cjoc, for example. However, because you cannot register more than one URL using the same domain in OpenShift, it is not possible to deploy multiple controllers using the same domain, for example, http://acme.com/controller1 and http://acme.com/controller2.

Therefore, for OpenShift CloudBees CI deployments, you can optionally configure subdomains to access controllers and the operations center. When you install CloudBees CI using the Helm chart, if you set the Subdomain attribute to true, you configure CloudBees CI to use a subdomain instead of the typical full context path. So, for example, you can access the operations center using http://cjoc.acme and the controllers using http://controller1.acme.com and http://controller2.acme.com.

The following steps allow you to install CloudBees CI with either HTTP or HTTPS support.

Installing CloudBees CI with HTTP or HTTPS support does the following:

  • Sets the OperationsCenter.HostName and optionally the OperationsCenter.Name (the default value is cjoc) fields.

  • Installs the Helm chart with the release name cloudbees-core and hostname cloudbees-core.example.com.

  • Deploys cloudbees-core on the OpenShift cluster in the default configuration.

CloudBees CI on modern cloud platforms uses Docker containers to run a cluster of computers within OpenShift. You can optionally Verify the CloudBees CI on modern cloud platforms Docker images to ensure their origin and authenticity.

Refer to one of the following procedures to install CloudBees CI on modern cloud platforms:

Installing CloudBees CI on modern cloud platforms with HTTP support

To install CloudBees CI on modern cloud platforms with HTTP support:

  1. Type the following commands:

    Fields are case-sensitve: OperationsCenter.HostName is different than operationscenter.hostname.
$ helm install cloudbees-core \ (1) (2) cloudbees/cloudbees-core \ (3) --set OperationsCenter.HostName='cloudbees-core.example.com' \ (4)
1 If you copy this command into your terminal don’t forget to remove the annotations at the end of each line.
2 The name isn’t required, but without it Helm will automatically generate a release name with random strings. For this reason, CloudBees recommends always set a release name.
3 In this example, the command is using the CloudBees Helm chart repository. If you downloaded the CloudBees CI Helm chart using helm fetch, replace cloudbees/cloudbees-core with the file name.
4 OperationsCenter.HostName field is required. The CloudBees CI Helm chart will not install without a HostName being provided.

After you have installed CloudBees CI, you should verify that it is installed correctly.

Installing CloudBees CI on modern cloud platforms with HTTPS support

To install CloudBees CI on modern cloud platforms with HTTPS support:

  1. First, create a new OpenShift TLS certificate secret. For instructions, see the Secrets chapter of the Red Hat OpenShift documentation.

  2. Once an OpenShift certificate secret has been created, you can use the Helm chart to install CloudBees CI with SSL\TLS support by setting OperationsCenter.Ingress.tls.Enable to true.

  3. Type the following commands:

    Fields are case-sensitve: OperationsCenter.HostName is different than operationscenter.hostname.
$ helm install cloudbees-core \ cloudbees/cloudbees-core \ --set OperationsCenter.HostName='{domain-name}' --set OperationsCenter.Route.tls.Enable=true \ (1)
1 Here, you are setting OperationsCenter.Route.tls.Enable to true. This property turns on CloudBees CI HTTPS support.

After you have installed CloudBees CI, you should verify that it is installed correctly.

Verifying the installation using helm status

Once the CloudBees CI install is initiated, Helm displays the status of the release.

The helm status command displays the status of the CloudBees CI release. This command is also executed after helm install and helm update commands are executed.

The helm status command displays three areas of information:

  • Current CloudBees CI Release

  • Kubernetes Resources

  • Release Notes

$ helm status NAME: cloudbees-core (1) LAST DEPLOYED: Tue Apr 16 17:44:12 2019 (1) NAMESPACE: default (1) STATUS: DEPLOYED (1) REVISION: 1 TEST SUITE: None NOTES: 1. Once {OC} is up and running, get your initial admin user password by running: kubectl rollout status sts cjoc --namespace cloudbees-core kubectl exec cjoc-0 --namespace cloudbees-core -- cat /var/jenkins_home/secrets/initialAdminPassword 2. Visit https://acme.example.com/cjoc/ 3. Login with the password from step 1. For more information on running {CI-CLOUD}, visit: xref:cloudbees-ci:ROOT:index.adoc[CloudBees CI]
1 The first block provides a summary of the CloudBees CI release including:
  • Name of the release

  • The time released

  • The status of the release and

  • The namespace the release is installed in.

Signing in to your CloudBees CI installation

Now that you’ve installed CloudBees CI and operations center, you’ll want to see your system in action.

  1. Retrieve your administrative user password with the oc command:

    $ oc exec cjoc-0 -- cat /var/jenkins_home/secrets/initialAdminPassword
  2. Open a browser client and navigate to http://cloudbees-core.example.com/cjoc/.

  3. Sign in with the username admin and the password you retrieved.

If you use the OpenShift Jenkins plugin, you can now configure it to work with CloudBees CI on modern cloud platforms. Refer to Red Hat’s OpenShift Jenkins plugin documentation for more information.