{"id":13617706,"url":"https://github.com/openstack/loci","last_synced_at":"2025-04-05T15:03:52.328Z","repository":{"id":49719187,"uuid":"86310723","full_name":"openstack/loci","owner":"openstack","description":"Lightweight OCI compatible images for OpenStack Projects. Mirror of code maintained at opendev.org.","archived":false,"fork":false,"pushed_at":"2025-03-04T14:59:51.000Z","size":405,"stargazers_count":57,"open_issues_count":0,"forks_count":47,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-29T14:06:14.785Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opendev.org/openstack/loci","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-27T08:33:49.000Z","updated_at":"2025-03-18T10:45:52.000Z","dependencies_parsed_at":"2023-01-29T22:40:17.287Z","dependency_job_id":"b9552ddf-f4d4-482d-b3fe-e494deeafda2","html_url":"https://github.com/openstack/loci","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Floci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Floci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Floci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Floci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openstack","download_url":"https://codeload.github.com/openstack/loci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353729,"owners_count":20925329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T20:01:46.590Z","updated_at":"2025-04-05T15:03:52.301Z","avatar_url":"https://github.com/openstack.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# OpenStack LOCI\n\nOpenStack LOCI is a project designed to quickly build Lightweight OCI\ncompatible images of OpenStack services.\n\nAdditionally, we produce a \"wheels\" image for\n[requirements](https://github.com/openstack/requirements) containing all of the\npackages listed in upper-constraints.txt.\n\nThe instructions below can be used for any OpenStack service currently targeted\nby LOCI. For simplicity, we will continue to use Keystone as an example.\n\n### Building locally\n\nNote: To build locally, you will need a version of docker \u003e= 17.05.0.\n\nYou need to start by building a base image for your distribution that\nincluded the required build dependencies. Loci has included a collection\nof Dockerfiles to get you started with building a base image. These\nare located in the dockerfiles directory.\n\nIt's easy to build a base image:\n``` bash\n$ docker build dockerfiles/ubuntu \\\n    --build-arg FROM=ubuntu:jammy \\\n    --build-arg CEPH_REPO='deb https://download.ceph.com/debian-reef/ jammy main' \\\n    --tag loci-base:ubuntu_jammy\n```\n\nThen you can build the rest of the service images locally:\n``` bash\n$ docker build . \\\n    --build-arg FROM=loci-base:ubuntu_jammy \\\n    --build-arg PROJECT=keystone \\\n    --tag loci-keystone:master-ubuntu_jammy\n```\n\nThe default base distro is Ubuntu Jammy, however, you can use the following form to build from a distro of your choice, in this case, CentOS:\n``` bash\n$ docker build dockerfiles/centos \\\n    --tag loci-base:centos\n\n$ docker build . \\\n    --build-arg PROJECT=keystone \\\n    --build-arg WHEELS=\"loci/requirements:master-centos\" \\\n    --build-arg FROM=loci-base:centos \\\n    --tag loci-keystone:master-centos\n```\n\nLoci will detect which base OS you're using, so if you need to add additional\nfeatures to your base image the Loci build will still run.\n\nIf building behind a proxy, remember to use build arguments to pass these\nthrough to the build:\n``` bash\n$ docker build . \\\n    --build-arg http_proxy=$http_proxy \\\n    --build-arg https_proxy=$https_proxy \\\n    --build-arg no_proxy=$no_proxy \\\n    --build-arg PROJECT=keystone \\\n    --tag loci-keystone:master-ubuntu_jammy\n```\n\nFor more advanced building you can use docker build arguments to define:\n  * `FROM` The base Docker image to build from. Dockerfiles to bootstrap\n     the base images can be found in the `dockerfiles` directory, and are\n     a good starting point for customizing a base image.\n  * `PROJECT` The name of the project to install.\n  * `PROJECT_REPO` The git repo containing the OpenStack project the container\n    should contain\n  * `PROJECT_REF` The git ref, branch, or tag the container should fetch for\n    the project\n  * `PROJECT_RELEASE` The project branch to determine python dependencies\n    (defaults to master)\n  * `PROJECT_PIP_EXTRAS` python extras to use during project install.\n  * `UID` The uid of the user that will be created (defaults to 42424).\n  * `GID` The gid of the group that will be created (default to 42424).\n  * `WHEELS` The location of the wheels tarball. This accepts a url to a\n    tarball or a Docker image name in the form of\n    `[myregistry/]mydockernamespace/requirements[:ubuntu]`\n  * `DISTRO` This is a helper variable used for scripts. It would primarily be\n    used in situations where the script would not detect the correct distro.\n    For example, you would set `DISTRO=centos` when running from an oraclelinux\n    base image.\n  * `PROFILES` The bindep profiles to specify to configure which packages get\n    installed. This is a space separated list.\n  * `PIP_PACKAGES` Specify additional python packages you would like installed.\n    The only caveat is these packages must exist in WHEELS form. So if\n    you wanted to include rpdb, you would need to have built that into your\n    WHEELS.\n  * `KEEP_ALL_WHEELS` Set this to `True` if you want to keep all packages, even\n     not built ourselfs in the WHEEL image. Is useful for reproducible builts,\n     as 3rd party libraries will be keept in WHEEL image.\n  * `PIP_ARGS` Specify additional pip parameters you would like.\n  * `PIP_WHEEL_ARGS` Specify additional pip wheel parameters you would like.\n     Default is PIP_ARGS.\n  * `DIST_PACKAGES` Specify additional distribution packages you would like\n    installed.\n  * `EXTRA_BINDEP` Specify a bindep-* file to add in the container. It would\n     be considered next to the default bindep.txt.\n  * `EXTRA_PYDEP` Specify a pydep-* file to add in the container. It would\n     be considered next to the default pydep.txt.\n  * `REGISTRY_PROTOCOL` Set this to `https` if you are running your own\n    registry on https, `http` if you are running on http, or leave it as\n    `detect` if you want to re-use existing protocol detection.\n  * `REGISTRY_INSECURE` Set this to `True` if your image registry is\n    running on HTTPS with self-signed certificates to ignore SSL verification.\n    (defaults to False)\n  * `EXTRA_PROJECTS` extra projects to install from `loci/data` directory.\n  * `HORIZON_EXTRA_PANELS` specify list of pannels to enable during horizon build.\n\nThis makes it really easy to integrate LOCI images into your development or\nCI/CD workflow, for example, if you wanted to build an image from [this\nPS](https://review.opendev.org/c/openstack/keystone/+/923324/) you could run:\n``` bash\n$ docker build . \\\n    --build-arg PROJECT=keystone \\\n    --build-arg PROJECT_REPO=https://review.opendev.org/openstack/keystone \\\n    --build-arg PROJECT_REF=refs/changes/24/923324/10 \\\n    --tag loci-keystone:923324-10\n```\n\nTo build with the wheels from a private Docker registry rather than Docker Hub run:\n``` bash\n$ docker build . \\\n    --build-arg PROJECT=keystone \\\n    --build-arg WHEELS=172.17.0.1:5000/mydockernamespace/requirements:master-ubuntu_jammy \\\n    --tag loci-keystone:master-ubuntu_jammy\n```\n\nTo build cinder with lvm and ceph support you would run:\n``` bash\n$ docker build . \\\n    --build-arg PROJECT=cinder \\\n    --build-arg PROFILES=\"lvm ceph\"\n```\n\n### Building from sources\n\nIt may be required to install library or other dependency that is present in upper-constraints.txt\nfrom sources. It may be achieved by using the following approach:\n\n* Clone all projects that you want to install to the loci/data directory\n* The directory content will be copied during image build stage\n* Use KEEP_ALL_WHEELS=True build arg to preserve all built wheels\n  in requirements image. This will allow to have reproducable builds\n  when same requirements image is used.\n\nIf pipy project name is different from python project name add your project into\nmapping file scripts/python-custom-name-mapping.txt\n\n### Customizing\nThe images should contain all the required assets for running the service. But\nif you wish or need to customize the `loci/keystone` image that's great! We\nhope to have built the images to make this as easy and flexible as possible. To\ndo this we recommend that you perform any required customization in a child\nimage using a pattern similar to:\n\n``` Dockerfile\nFROM loci/keystone:master-ubuntu_jammy\nMAINTAINER you@example.com\n\nRUN set -x \\\n    \u0026\u0026 apt-get update \\\n    \u0026\u0026 apt-get install -y --no-install-recommends your-awesome-binary-package \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\n```\n\n\n### A Note on the Stability of LOCI\nLOCI is considered stable. There are production installs of OpenStack using\nLOCI built images at this time.\n\nThe project is very low-entropy with very little changing, but this is expected.\nThe highest traffic section of LOCI is the gates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Floci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenstack%2Floci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Floci/lists"}