tuscan icon indicating copy to clipboard operation
tuscan copied to clipboard

Sources/binaries/base container created atomically

Open karkhaz opened this issue 8 years ago • 0 comments

The base container that all stages are based on, the local mirror of binaries, and the store of sources are all created at the same time and have the same version numbers.

This commit introduces a new stage: create_base_image. This stage is responsible for downloading sources and binaries, and synchronising the local package repository to these downloaded packages. Most stages are now based on create_base_image; when create_base_image exits, it commits its image so that other containers can use its repository.

create_base_image runs two scripts: main.sh followed by main.py. main.sh sets up the basic aspects of the Arch container, including installing python and build tools and initialising pacman. main.py then proceeds to download source and binary packages.

The install_bootstrap_packages stage now installs bootstrap packages from the local repository downloaded by create_base_image, rather than downloading them from a remote mirror.

tuscan_build.py skips the creation of create_base_image if that image already exists. Since several hundred gigabytes of sources and binaries must be downloaded atomically whenever a new base image is created, tuscan_build will use an existing base image if one already exists. This change introduces a new dependency on the docker-py wrapper for docker.

Most other changes introduced in this commit are re-basing later stages onto create_base_image.

karkhaz avatar Jun 24 '16 04:06 karkhaz