Quick installation


The redpesk platform offers a Continuous Integration (CI) chain. But sometimes, the need is to have a short build cycle where you can build your package after modify some files. That is for this need the local builder has been developed. To use this tool, you have to install a container. Here is a document to help to install this container and take in charge the local builder.

In this part, another tool will be used. This is redpesk command line interface, or rp-cli, that will be the link between the user and the local builder. Indeed, rp-cli let to interface the local builder to develop locally.


# retrieve the installation script
wget https://github.com/redpesk-devtools/redpesk-sdk-tools/raw/master/install-redpesk-localbuilder.sh
chmod +x install-redpesk-localbuilder.sh

# Choose a name for your container
# Note that name can only contain alphanumeric and hyphen characters
# launch the script
./install-redpesk-localbuilder.sh create -c ${container_name}
# then follow the instructions
# the requested password is 'iotbzh'

You will be prompted for your host’s root password to perform the LXD installation.

At the end of the script, you will also be asked for an optional host directory that you want to have to access to within the container.

Depending of your host’s distribution, you may need to relaunch the script after a reboot.

The installation of your build container is then finished. If things ever go bad, the following command can be useful:


Error: TLS certificate

In case of you encounter follow error message :
Error: get "https://download.redpesk.bzh:8443/1.0": tls: failed to verify certificate:x509: certificate has expired or is not yet valid

Just relaunch installation script with --clean-remote option :

# launch the script
./install-redpesk-localbuilder.sh create -c ${container_name} --clean-remote

Cleans things up

If you want to deletes container and cleans things up, use clean action:

./install-redpesk-localbuilder.sh clean -c ${container_name}

Local builder connection with rp-cli

Before using local builder with rp-cli, assure this one is well configured. Please follow the steps detailed in the rp-cli part.

Once the connection to the redpesk infrastructure is completed, or if you have answered no (n) to the first question, the rp-cli onboard command then asks if you want to configure the redpesk localbuilder connection. If you want to, answer yes (Y).

$ rp-cli onboard
Do you want to configure the redpesk backend connection? (Y/n)
> n

Do you want to configure the redpesk local-builder connection? (Y/n)
> Y

-- Local builder link configuration requested by user --

Current available connections: [NONE]

Please enter the IP of the local builder you want to interact with (ex:, then press enter:
Modification of the local builder file...[OK]

The default mounted directory (/home/armand/my_rp_builder_dir/gitsources) exists on the host, should it be used as 'gitsources' directory? (Y/n)

> Y

The default mounted directory (/home/armand/my_rp_builder_dir/gitpkgs) exists on the host, should it be used as 'gitpkgs' directory? (Y/n)

> Y

rp-cli requests the IP of the local builder. Enter the IP of the corresponding container running on your host and press enter.

Then, rp-cli checks if the default mounted directories exist on the system. These directories are the one created by default at the local-builder installation. So, if during local builder installation you chose the default settings, you can answer ‘yes’ to the questions asked like in the example above.

If rp-cli does not detect these directories in your system, he asks for the directories to use and creates them if they do not exist.