Device deployment with chroot
There are different ways to provision and deploy devices with qbee. One possible option is to use a script that handles the qbee bootstraping. Another option is to use chroot to setup an image. In this example it is shown how a Raspberry Pi is provisioned on a master device.
Please do not have qbee running on the master device during the provisioning
If there is an active instance of qbee running on the master device the VPN might not work.
These are the steps:
- Flash an SD card with your OS. In this case we use a Rasberry Pi OS.
- Mount that SD card rootfs from another Raspberry Pi, e.g.
sudo mount /dev/sdb2 ./sd_card_mount
- Also mount
/procinto the rootfs e.g.
sudo mount -t proc /proc ./sd_card_mount /proc
- Chroot into the SD card rootfs e.g.
sudo chroot ./sd_card_mount
- Install qbee in the chroot:
wget https://cdn.qbee.io/software/qbee-agent/qbee-agent_1.2.1_armhf.deb && sudo dpkg -i qbee-agent_1.2.1_armhf.deb
- Run the qbee bootstrap:
/opt/qbee/bin/qbee-bootstrap -k <bootstrap_key>and wait for it to finish
- Exit the chroot, unmount
syncto flush the SD card
- Put the new SD card into another Raspberry Pi and turn it on. It should now come back online in the qbee UI.
- Please note that the VPN (remote access) needs two agent runs to come online (ca. 10 minutes). This will be accelerated eventually.