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
This commit is contained in:
parent
81ca6b4dc0
commit
0b9fdccb8b
14
README.rst
14
README.rst
@ -25,9 +25,6 @@ Role Variables
|
||||
* - `target_image`
|
||||
- `[undefined]`
|
||||
- If set, the modified image will be tagged with `target_image + modified_append_tag`. If `target_image` is not set, the modified image will be tagged with `source_image + modified_append_tag`. If the purpose of the image is not changing, it may be enough to rely on the `source_image + modified_append_tag` tag to identify that this is a modified version of the source image.
|
||||
* - `container_build_tool`
|
||||
- `buildah`
|
||||
- Tool used to build containers, can be only 'buildah'
|
||||
|
||||
.. list-table:: Variables used for yum update
|
||||
:widths: auto
|
||||
@ -55,13 +52,10 @@ Role Variables
|
||||
* - `yum_repos_dir_path`
|
||||
- `None`
|
||||
- Optional path of directory to be used as `/etc/yum.repos.d` during the update
|
||||
* - `container_build_tool`
|
||||
- See modify image variables
|
||||
* - `yum_cache`
|
||||
- `None`
|
||||
- Optional path to the host directory for yum cache during the update.
|
||||
Requires an overlay-enabled FS that also supports SE context relabling.
|
||||
Works only with container_build_tool=buildah.
|
||||
* - `force_purge_yum_cache`
|
||||
- `False`
|
||||
- Optional argument that tells buildah to forcefully re-populate the yum
|
||||
@ -89,8 +83,6 @@ Role Variables
|
||||
* - `yum_repos_dir_path`
|
||||
- `None`
|
||||
- Optional path of directory to be used as `/etc/yum.repos.d` during the update
|
||||
* - `container_build_tool`
|
||||
- See modify image variables
|
||||
|
||||
|
||||
.. list-table:: Variables used for dev install
|
||||
@ -109,8 +101,6 @@ Role Variables
|
||||
* - `target_image`
|
||||
- `''`
|
||||
- See modify image variables
|
||||
* - `container_build_tool`
|
||||
- See modify image variables
|
||||
* - `refspecs`
|
||||
- `[]`
|
||||
- An array of project/refspec pairs that will be installed into the generated container. Currently only supports python source projects.
|
||||
@ -151,7 +141,6 @@ The following playbook will produce a modified image with the tag
|
||||
vars:
|
||||
source_image: docker.io/tripleomaster/centos-binary-nova-api:latest
|
||||
modify_dir_path: /path/to/example_modify_dir
|
||||
container_build_tool: buildah
|
||||
|
||||
The directory `example_modify_dir` contains the `Dockerfile` which will perform
|
||||
the modification, for example:
|
||||
@ -192,7 +181,6 @@ In this playbook the tasks\_from is set as a variable instead of an
|
||||
source_image: docker.io/tripleomaster/centos-binary-nova-api:latest
|
||||
yum_repos_dir_path: /etc/yum.repos.d
|
||||
modified_append_tag: updated
|
||||
container_build_tool: buildah
|
||||
yum_cache: /tmp/containers-updater/yum_cache
|
||||
rpms_path: /home/stack/rpms
|
||||
|
||||
@ -207,7 +195,6 @@ In this playbook the tasks\_from is set as a variable instead of an
|
||||
tasks_from: yum_update.yml
|
||||
source_image: docker.io/tripleomaster/centos-binary-nova-api:latest
|
||||
modified_append_tag: updated
|
||||
container_build_tool: buildah
|
||||
rpms_path: /home/stack/rpms/
|
||||
|
||||
Note, if you have a locally installed gating repo, you can add
|
||||
@ -235,7 +222,6 @@ a variable instead of an `import_role` parameter.
|
||||
source_image: docker.io/tripleomaster/centos-binary-nova-api:latest
|
||||
yum_repos_dir_path: /etc/yum.repos.d
|
||||
yum_packages: ['foobar-nova-plugin', 'fizzbuzz-nova-plugin']
|
||||
container_build_tool: buildah
|
||||
|
||||
RPM install
|
||||
~~~~~~~~~~~
|
||||
|
@ -1,6 +1,5 @@
|
||||
---
|
||||
update_repo: ''
|
||||
container_build_tool: 'buildah'
|
||||
python_dir: []
|
||||
refspecs: []
|
||||
yum_packages: []
|
||||
|
@ -34,11 +34,12 @@
|
||||
line: "LABEL modified_append_tag={{ modified_append_tag }}"
|
||||
|
||||
- name: Modify image from {{ modify_dir_path }}
|
||||
command: |
|
||||
{{ build_commands[container_build_tool] }} \
|
||||
--tag {{ target_image | default(source_image) }}{{ modified_append_tag }} \
|
||||
--file {{ dockerfile.path }} --network host ./
|
||||
command: >-
|
||||
buildah bud
|
||||
--format docker
|
||||
--tag {{ target_image | default(source_image) }}{{ modified_append_tag }}
|
||||
--file {{ dockerfile.path }} --network host ./
|
||||
# FIXME: buildah should not required root commands to build an image
|
||||
become: "{{ container_build_tool == 'buildah' }}"
|
||||
become: true
|
||||
args:
|
||||
chdir: "{{ modify_dir_path }}"
|
||||
|
@ -5,11 +5,6 @@
|
||||
- source_image is defined
|
||||
- source_image | length > 0
|
||||
|
||||
- name: Ensure that container_build_tool is correctly set
|
||||
fail: msg="{{ container_build_tool }} is not a valid value for
|
||||
container_build_tool. Use 'buildah'."
|
||||
when: container_build_tool != 'buildah'
|
||||
|
||||
- name: Set default modified_append_tag
|
||||
set_fact:
|
||||
modified_append_tag: "{{ lookup('pipe','date +-modified-%Y%m%d%H%M%S') }}"
|
||||
|
@ -4,4 +4,3 @@
|
||||
- always
|
||||
|
||||
- import_tasks: yum_install_buildah.yml
|
||||
when: container_build_tool == 'buildah'
|
||||
|
@ -4,4 +4,3 @@
|
||||
- always
|
||||
|
||||
- import_tasks: yum_update_buildah.yml
|
||||
when: container_build_tool == 'buildah'
|
||||
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
build_commands:
|
||||
buildah: buildah bud --format docker
|
Loading…
Reference in New Issue
Block a user