Dockbake (bitbake in docker)
What & Why
Docker-powered, parameterized building with Bitbake. This is done because re-creating these environments every time is a complete pain, and we need to automate it too (Jenkins). Added bonus: large scale eliminiation/identification of host bleed.
We make use of Docker to handle a reproducable LXC containers that isolate the running of bitbake into a uniform environment. This is then extended by the use of host directory mapping and sharing download directories for all recipes on all platforms.
Per-configuration trees are seperated with via tuple, in this pattern:
So that you end up with a tree looking like this:
|-- build | `-- distro-debug-machine |-- images | `-- distro-debug-machine `-- sstate `-- distro-debug-machine
Setup the runtime environment
git clone firstname.lastname@example.org:WarheadsSE/dockbake.git cd dockbake bin/make-environment
Docker & Dependancies
You will then need to install Docker from https://www.docker.io/gettingstarted/#h_installation per your distributions' needs.
After you have installed docker, to remove the need of calling sudo for all commands, add your user to the
docker group. Create it if it does not exist.
Once that is configured and operational, we can build the
bitbake container that this system will use.
sudo docker build -t bitbake docker/bitbake/
- See docs explicit details of the scripts and their operation
conf/local.infor setting local defaults.
Fire off a build of the default(s) with
bin/run-builder. Might require
sudo depending on your configuration.
make-environment will result in the below file structure is ensured to exist:
. |-- bin |-- build |-- conf |-- dl |-- etc |-- images `-- sstate
By default, these scripts will use as below:
- ./build as
OE_BASEin the container, with naming tuple appended on the host.
- ./dl as
DL_DIRin the container.
- ./images as
DEPLOY_IMAGE_DIRin the container, with naming tuple appended on the host.
- ./sstate as
SSTATE_DIRin the container, with naming tuple appended on the host.
NOTE: It is possible for
SSTATE_DIR can be mount points to network fileshares.
The contents of the conf directory are simple bash scripts with
export calls for the environment variables passed into the builder instance.