Metadata-Version: 2.1
Name: tcib
Version: 0.0.0
Summary: A library for container build.
Home-page: UNKNOWN
Author: OpenStack
Author-email: openstack-discuss@lists.openstack.org
License: UNKNOWN
Platform: UNKNOWN
Classifier: Environment :: OpenStack
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.8
License-File: LICENSE
License-File: AUTHORS
Requires-Dist: pbr (!=2.1.0,>=2.0.0)
Requires-Dist: python-openstackclient (>=5.2.0)
Requires-Dist: ansible-core
Requires-Dist: ansible-runner (>=1.4.5)
Requires-Dist: osc-lib (>=2.3.0)
Requires-Dist: oslo.config (>=5.2.0)
Requires-Dist: oslo.log (>=3.36.0)
Requires-Dist: oslo.concurrency (>=3.26.0)
Requires-Dist: tenacity (>=6.1.0)
Requires-Dist: PyYAML (>=3.12)

# tcib

TCIB stands for The Container Image Build.
It is a repository to build OpenStack services container images.

## Setup

1. Generate repos using repo-setup tool
```
$ git clone https://github.com/openstack-k8s-operators/repo-setup
$ cd repo-setup
$ python setup.py install --user
$ # Make a directory to store the generated repos
$ mkdir /tmp/repos
$ # Generate repos using repo-setup tool
$ repo-setup current-podified -b zed -o /tmp/repos
```

2. Install ansible-core and Buildah tool
```
$ sudo dnf -y install ansible-core buildah
```

3. Define subset of images to build

By default all images and their dependencies will be built as specified
in `container-images/containers.yaml` This can be limited to a subset of images
and their depedencies with a custom containers file:

```
$ cat containers.yaml
container_images:
  - imagename: quay.io/podified-master-centos9/openstack-keystone:current-podified
```

## Building images from installed tcib

When tcib is installed from pip or a package, container templates are installed
in `/usr/share/tcib/container-images/tcib` which will render to buildah scripts and Dockerfile files when images are built with:

```
$ sudo openstack tcib container image build --config-file containers.yaml --repo-dir /tmp/repos/
```

## Building images with local changes

When doing local development, images can be built from modifications in the
local directory:

```
# setup for local development
$ git clone https://github.com/openstack-k8s-operators/tcib
$ cd tcib
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt -e ./
$ source tcib-dev-env.rc

# make local development changes, then build images
$ openstack tcib container image build --config-file containers.yaml --repo-dir /tmp/repos/ --tcib-extras tcib_package=
```

The `--tcib-extras tcib_package=` is required so that non-template files are sourced from the local `container-images/kolla` instead of from the `python-tcib-containers` package in the container build.

## License

* Free software: Apache license



