Commit Graph

12 Commits

Author SHA1 Message Date
Ghanshyam Mann cbf9d36df6 Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: Ib5a8155d76652044701ae05e5dbcc7078f41d863
2024-02-24 11:41:18 -08:00
Sagi Shnaidman 0b9fdccb8b Remove config of container_build_tool
Because there is no docker supported anymore, remove all custom
config of "container_build_tool", only "buildah" is supported.

Change-Id: I57720cc1d7da96f9277b62298cabce9ff7765f47
2021-08-11 10:24:31 +00:00
Sagi Shnaidman 81ca6b4dc0 Remove docker modules from the role
Remove docker modules usage from the role since we
use buildah/podman everywhere.
Change-Id: Ic2a46c0a55781041016f42bdc1af686055af9fa2
2021-08-09 20:55:41 +03:00
Bogdan Dobrelya 908875eeab Add support for yum caching when buildah updates
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>
2019-09-25 14:01:15 +02:00
Alex Schultz 3a4caf4587 Implement a yum install command
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
2019-07-03 17:45:21 -06:00
Emilien Macchi b25fe2590c Allow devs to modify images with Python directories
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
2019-06-21 01:31:01 +00:00
Chandan Kumar b541c5ef99 Run all linters via pre-commit
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
2019-02-15 18:22:10 +05:30
Steve Baker c9d085729f Remove compare_host_packages strategy
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
2018-09-17 12:17:46 +00:00
Emilien Macchi a2229e738a Add Buildah support
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
2018-08-03 14:40:27 -04:00
Steve Baker 262e5497e0 update_repo to limit to packages in repo
Rather than updating every package, allow to limit to a single repo
2018-05-14 10:43:34 +12:00
Steve Baker 60c8e52079 rename modified_image_prefix to target_image, use set_fact for timestamp
If set_fact is not used, the lookup(pipe) is evaluated every time it is
referenced, which means potentially different timestamps being
used.
2018-05-03 15:50:31 +12:00
Sam Doran 5963894199 Streamline role
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.
2018-05-02 22:31:08 -04:00