Use openstack-helm _loci jobs for testing images
By default the openstack-helm project uses images built in the openstack-helm-images repo.
This repository will stay available for those who would like to continue using the wheels image.
The PS updates the image test jobs to use _loci overrides in the openstack-helm repo which were introduced specifically for testing Loci images.
Depends-On: Icef2f09afe7435fa29e6a6bc5c6837e7b0d932f2 Signed-off-by: Vladimir Kozhukalov kozhukalov@gmail.com Change-Id: Id1aca2646e733694835d282801eeb536e37aa6ab
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
OpenStack LOCI
OpenStack LOCI is a project designed to quickly build Lightweight OCI compatible images of OpenStack services based on Ubuntu.
Additionally, we produce a “wheels” image for requirements containing all of the packages listed in upper-constraints.txt.
The instructions below can be used for any OpenStack service currently targeted by LOCI. For simplicity, we will continue to use Keystone as an example.
Building locally
Note: To build locally, you will need a version of docker >= 17.05.0.
Base image
You need to start by building a base image for your distribution that included the required build dependencies. Loci has included a collection of Dockerfiles to get you started with building a base image. These are located in the dockerfiles directory.
It’s easy to build a base image:
Requirements image
The
requirementsimage is where we put all the packages listed in the OpenStack upper constraints together with their dependencies. This is a consistent set of packages so that if we install various OpenStack components from this set of packages we can be sure they are compatible with each other. In Loci we use multistage Dockerfile with the project image as a default target. To build therequirementsimage use the following commandProject image
Then you can build the rest of the service images using this requirements image:
Here you can specify the
requirements(WHEELS) image which is mounted during the build and is used as a wheels repository. By default thequay.io/airshipit/requirements:master-ubuntu_jammyis used.If building behind a proxy, remember to use build arguments to pass these through to the build:
For more advanced building you can use docker build arguments to define:
FROMThe base Docker image to build from. Dockerfiles to bootstrap the base images can be found in thedockerfilesdirectory, and are a good starting point for customizing a base image.PROJECTThe name of the project to install.PROJECT_REPOThe git repo containing the OpenStack project the container should containPROJECT_REFThe git ref, branch, or tag the container should fetch for the projectPROJECT_RELEASEThe project branch to determine python dependencies (defaults to master)PROJECT_PIP_EXTRASpython extras to use during project install.UIDThe uid of the user that will be created (defaults to 42424).GIDThe gid of the group that will be created (default to 42424).WHEELSThe location of the wheels Docker image. The image must contain wheels in the root directory. It is mounted while building other images.[myregistry/]mydockernamespace/requirements[:tag]PROFILESThe bindep profiles to specify to configure which packages get installed. This is a space separated list.PIP_PACKAGESSpecify additional python packages you would like installed. The only caveat is these packages must exist in WHEELS form. So if you wanted to include rpdb, you would need to have built that into your WHEELS.KEEP_ALL_WHEELSSet this toTrueif you want to keep all packages, even not built ourselfs in the WHEELS image. This is useful for reproducible builds, as 3rd party libraries will be keept in the WHEELS image.PIP_ARGSSpecify additional pip parameters you would like.PIP_WHEEL_ARGSSpecify additional pip wheel parameters you would like. Default is PIP_ARGS.DIST_PACKAGESSpecify additional distribution packages you would like installed.EXTRA_BINDEPSpecify a bindep-* file to add in the container. It would be considered next to the default bindep.txt.EXTRA_PYDEPSpecify a pydep-* file to add in the container. It would be considered next to the default pydep.txt.REGISTRY_PROTOCOLSet this tohttpsif you are running your own registry on https,httpif you are running on http, or leave it asdetectif you want to re-use existing protocol detection.REGISTRY_INSECURESet this toTrueif your image registry is running on HTTPS with self-signed certificates to ignore SSL verification. (defaults to False)EXTRA_PROJECTSextra projects to install fromloci/datadirectory.HORIZON_EXTRA_PANELSspecify list of pannels to enable during horizon build.This makes it really easy to integrate LOCI images into your development or CI/CD workflow, for example, if you wanted to build an image from this PS you could run:
To build cinder with lvm and ceph support you would run:
Building from sources
It may be required to install library or other dependency that is present in upper-constraints.txt from sources. It may be achieved by using the following approach:
If pipy project name is different from python project name add your project into mapping file scripts/python-custom-name-mapping.txt
Customizing
The images should contain all the required assets for running the service. But if you wish or need to customize the
loci/keystoneimage that’s great! We hope to have built the images to make this as easy and flexible as possible. To do this we recommend that you perform any required customization in a child image using a pattern similar to:A Note on the Stability of LOCI
LOCI is considered stable. There are production installs of OpenStack using LOCI built images at this time.
The project is very low-entropy with very little changing, but this is expected. The highest traffic section of LOCI is the gates.