This documentation relates to QuickBuild 8.0.x
Select here if you are using a different version

Launch Node in Kubernetes

Version 4 by Robin Shen
on Jan 08, 2018 11:45.


compared with
Version 5 by Robin Shen
on Jan 08, 2018 11:57.


Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 5 changes. View first change.

 Cloud profiles rely on cloud providers to do its job. QuickBuild 8.0 ships with the Kubernetes cloud provider. To use it, one has to enable the Kubernetes plugin by providing a configuration file in _Administration/Plugin Management_ page as demonstrated below:
 !kubernetes-setting.png!
  
 Then one can follow the [cloud profiles|Working with Cloud Profiles] guide to create cloud profiles using Kubernetes launchers like below:
 !kubernetes-launcher.png!
  
 You should use your own docker image when define the Kubernetes profile. {anchor:create build agent image}The image should be pre-configured with your build environment as well as QuickBuild build agent. An example Dockerfile to build the image is as below:
  You should use your own docker image when define the Kubernetes profile. {anchor:create build agent image}The image should be pre-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.
  
# 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.
 # Create file _/path/to/buildagent/Dockerfile_ with below content:
 {code}
 FROM openjdk:8-jdk
 ADD . /app
 EXPOSE 8811
 CMD ["/app/bin/wrapper-linux-x86-64", "/app/conf/wrapper.conf"]
 {code}
# Change to directory _/path/to/buildagent_, and run below command
 {code}
 docker build -t youraccount/qbagent:latest .
 {code}
 # Then publish the built image:
 {code}
 docker push youraccount/qbagent:latest
 {code}
  
This file is placed under the build agent installation directory, and runs build agent from a Debian Linux machine with OpenJDK8 installed.
  With this example, you should use docker image _youraccount/qbagent:latest_ when define the Kubernetes profile above
  
 After creating and pushing your image, run a docker container from another machine using the image to make sure it can connect to QuickBuild build server.