Because there is no docker supported anymore, remove all custom
config of "container_build_tool", only "buildah" is supported.
Change-Id: I57720cc1d7da96f9277b62298cabce9ff7765f47
When yum_cache is set, that directory will be automatically
picked as either the source or destination for the containers
being updated as the following:
* when that host directory is missing (or empty), the container
under update will start populating it, while it gets updated.
That path going to become the lower overlay FS layer for future
use among other containers under concurrent yum update executions.
* when the yum_cache directory exists and is not empty, it will be
bind-mounted as an upper overlay FS layer for other containers under
update. So those can benefit from some of the already prefetched
contents in its yum cache without data races or conflicts when
concurrently accessing the cached data.
Overlaying ensures data safety as each container can only see the lower
layer of the overlay, while storing its local changes on top of it as
an ephemeral. The yum_cache directory existance & non-emptiness facts
act as a single mutex, which only grants a dedicated writing access to
the lower layer to a single "populating" container at a time. This
behavior may be forcefully reset via the force_purge_yum_cache flag.
The container update playbook invoked with it, instantly creates a
new populator and creates a fresh yum cache.
Note that the 100% saturation of the cache is only expected, when the
populating container finishes its execution.
The feature can be used only for buildah in yum update scenarios using
yum or dnf.
Change-Id: I30c6dd12454a0b1781803ab16ef79b5914178114
Related-bug: #1844446
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
Yum update works if you want to update existing packages, but sometimes
you want to install a package that's available via the yum repositories
that is extra. This implements a yum install action similiar to the yum
update action except it takes package names instead of repos to install.
Change-Id: Ia47a1ea9eb51a37f6d75d39c524e97fd4ec94fba
This will allow dev to update their container images from a local Python
directory, example in /home/joe/git/openstack/heat.
The new parameter python_dir is a list of directories.
To use it, your playbook must be like:
- hosts: localhost
connection: local
tasks:
- name: dev install heat-api
import_role:
name: tripleo-modify-image
vars:
tasks_from: dev_install.yml
source_image: docker.io/tripleomaster/centos-binary-heat-api:current-tripleo
modified_append_tag: -devel
python_dir:
- /home/joe/git/openstack/heat
Change-Id: I182c3fa58dc9af870e0da9f51ae1e22aa90d03e5
Executes all linters via pre-commit, which is much faster, guarantees
their version locking and allows upgrading them with a single command.
Before this change the only linter running via pre-commit was
ansible-lint.
Now we also run bashate, flake8 and yamllint via pre-commit.
For developer convenience we still keep the old tox environments
which allow running a single linter.
Added long_description_content_type to fix twine check failure
Change-Id: I037eae61921b2a84aa99838804f70e96ee8d8b13
Now that the undercloud is containerized, there will be very few host
packages to compare to, so there is a high risk that required package
updates will be skipped.
This is a strategy inherited from container-update.py that was
intended to avoid unnecessary calls to yum update, however we now have
a better approach using the repoquery, so host package comparison is
no longer required, and probably causing some of the instances of bug
Change-Id: Iab7b9d6377494001d904bb84b058ea293d73110c
Partial-Bug: #1786764
Buildag is a tool that facilitates building OCI container images.
This patch adds support to modify and update containers built by
Buildah.
It's just making sure we can run the build command with their CLI and
also get the user from the container config.
The default remains 'docker' for backward compatibility.
Note: it push the new images with sudo to avoid permissions errors.
Change-Id: I3db1934ad826ec6433bd6aec067112e91d82e355
Use role defaults rather than set_fact tasks.
Remove empty placeholder files.
Add role meta info.
For variables that can't have a sane default, add precheck tasks to fail early if they are not defined.