Launch Node in Kubernetes

Configure server to access Kubernetes cluster

On the machine running QuickBuild server, make sure that the OS account running QuickBuild service is set up appropriately so that it can run below command to connect to desired Kubernetes cluster:

kubectl cluster-info

Set up firewall rule to allow node ports

Build agents are running as pods in Kubernetes cluster, and these pods are exposed via services with type "NodePort". QuickBuild server has to access these node ports, so appropriate firewall rule may need to be set up to allow this. For Google Kubernetes Engine, an example firewall rule can be as following:

Create build agent image

Build agent docker image needs to be configured with your build environment as well as QuickBuild build agent. Below is an example to create a Debian Linux image only with OpenJDK and build agent installed.

  1. Assume we have build agent installed at /path/to/buildagent. First run the build agent to make sure it can connect with the build server.
  2. Create file /path/to/buildagent/Dockerfile with below content:
    FROM openjdk:8-jdk
    ADD . /app
    EXPOSE 8811
    CMD ["/app/bin/wrapper-linux-x86-64", "/app/conf/wrapper.conf"]
    
  3. Change to directory /path/to/buildagent, and run below command
    sudo docker build -t youraccount/qbagent:latest .
    
  4. Then publish the built image:
    sudo docker push youraccount/qbagent:latest 
    

Enable Kubernetes plugin in QuickBuild

Login to QuickBuild server, and enable the Kubernetes plugin in Administration/Plugin Management page as demonstrated below:

Add Kubernetes cloud profile in QuickBuild

Then one can follow the cloud profiles guide to create cloud profiles using Kubernetes launchers like below:

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.