Quick installation
Introduction
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.
Installation
# 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
container_name=<your_container_name>
# 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:
# DO NOT execute this command if there is no problem with the installation
./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 configurated. Please follow the steps detailled 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
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 URL of the local builder you want to interact with, then press enter:
> http://10.231.232.228
Modification of the local builder file... [OK]
rp-cli
requests the address of the local builder. Enter the address of the corresponding container running on your host and press enter.