atomic-reactor is not needed on the osbs hosts.
atomic-reactor is only needed in the buildroot, therefore we do not need to install it on the osbs master and nodes. Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
parent
95c1989180
commit
bf757c97ad
10 changed files with 0 additions and 184 deletions
|
@ -270,7 +270,6 @@
|
|||
role: osbs-common,
|
||||
osbs_manage_firewalld: false,
|
||||
}
|
||||
- osbs-atomic-reactor
|
||||
- {
|
||||
role: push-docker,
|
||||
docker_cert_name: "containerbuild",
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
atomic-reactor
|
||||
==============
|
||||
|
||||
This role obtains
|
||||
[atomic-reactor](https://github.com/projectatomic/atomic-reactor) docker image
|
||||
to be used in [OSBS (OpenShift build
|
||||
service)](https://github.com/projectatomic/osbs-client).
|
||||
|
||||
This role is part of
|
||||
[ansible-osbs](https://github.com/projectatomic/ansible-osbs/) playbook for
|
||||
deploying OpenShift build service. Please refer to that github repository for
|
||||
[documentation](https://github.com/projectatomic/ansible-osbs/blob/master/README.md)
|
||||
and [issue tracker](https://github.com/projectatomic/ansible-osbs/issues).
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
`atomic_reactor_source` determines the means of obtaining the There are
|
||||
currently two methods to obtain the image, `pull` and `git`. The `pull` method
|
||||
simply pulls the image from a given registry. The `git` method builds the image
|
||||
by running `docker build` on given git repository.
|
||||
|
||||
atomic_reactor_source: pull
|
||||
|
||||
When `atomic_reactor_source` is set to `pull`, you need to provide
|
||||
`atomic_reactor_pull` dictionary such as the following:
|
||||
|
||||
atomic_reactor_pull:
|
||||
registry: registry.hub.docker.com
|
||||
image: slavek/atomic-reactor:latest
|
||||
|
||||
When `atomic_reactor_source` is set to `git`, you need to provide
|
||||
`atomic_reactor_git` dictionary such as the following:
|
||||
|
||||
atomic_reactor_git:
|
||||
# base image source to be pulled (optional)
|
||||
base_registry: registry.hub.docker.com
|
||||
base_image: library/fedora:latest
|
||||
# allow retagging the base image to match FROM in Dockerfile (optional)
|
||||
base_image_retag: fedora:latest
|
||||
# Dockerfile source
|
||||
git_url: https://github.com/projectatomic/atomic-reactor.git
|
||||
git_branch: master
|
||||
git_subdir: ""
|
||||
git_local_path: "{{ ansible_env.HOME }}/atomic-reactor-buildroot"
|
||||
|
||||
OSBS expects the build image to be named `buildroot`. This name can be changed
|
||||
by setting the `atomic_reactor_tag` variable.
|
||||
|
||||
atomic_reactor_tag: buildroot
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
Docker needs to be installed on the remote host.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
In default configuration the role pulls the image from
|
||||
[slavek/atomic-reactor](https://hub.docker.com/r/slavek/atomic-reactor/)
|
||||
repository on docker hub.
|
||||
|
||||
- hosts: builders
|
||||
roles:
|
||||
- atomic-reactor
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
Martin Milata <mmilata@redhat.com>
|
|
@ -1,30 +0,0 @@
|
|||
---
|
||||
# OSBS expects the build image to be named buildroot
|
||||
atomic_reactor_tag: buildroot
|
||||
|
||||
# Method to obtain atomic-reactor image, currently supported are:
|
||||
# pull - pull the image from a registry
|
||||
# git - build the image from git repository
|
||||
# rpm - build the image from the local bundled rpm sources
|
||||
atomic_reactor_source: rpm
|
||||
|
||||
# Configuration for atomic_reactor_source == pull
|
||||
atomic_reactor_pull:
|
||||
registry: registry.hub.docker.com
|
||||
image: slavek/atomic-reactor:latest
|
||||
|
||||
# Configuration for atomic_reactor_source == git
|
||||
atomic_reactor_git:
|
||||
# base image source
|
||||
base_registry: registry.hub.docker.com
|
||||
base_image: library/fedora:latest
|
||||
# allow retagging the base image to match FROM in Dockerfile
|
||||
base_image_retag: fedora:latest
|
||||
# Dockerfile source
|
||||
git_url: https://github.com/projectatomic/atomic-reactor.git
|
||||
git_branch: master
|
||||
git_subdir: ""
|
||||
git_local_path: "{{ ansible_env.HOME }}/atomic-reactor-buildroot"
|
||||
|
||||
atomic_reactor_rpm:
|
||||
copr: True
|
|
@ -1,8 +0,0 @@
|
|||
[maxamillion-atomic-reactor]
|
||||
name=Copr repo for atomic-reactor owned by maxamillion
|
||||
baseurl=https://copr-be.cloud.fedoraproject.org/results/maxamillion/atomic-reactor/epel-7-$basearch/
|
||||
skip_if_unavailable=True
|
||||
gpgcheck=1
|
||||
gpgkey=https://copr-be.cloud.fedoraproject.org/results/maxamillion/atomic-reactor/pubkey.gpg
|
||||
enabled=1
|
||||
enabled_metadata=1
|
|
@ -1,8 +0,0 @@
|
|||
[maxamillion-atomic-reactor]
|
||||
name=Copr repo for atomic-reactor owned by maxamillion
|
||||
baseurl=https://copr-be.cloud.fedoraproject.org/results/maxamillion/atomic-reactor/fedora-$releasever-$basearch/
|
||||
skip_if_unavailable=True
|
||||
gpgcheck=1
|
||||
gpgkey=https://copr-be.cloud.fedoraproject.org/results/maxamillion/atomic-reactor/pubkey.gpg
|
||||
enabled=1
|
||||
enabled_metadata=1
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
galaxy_info:
|
||||
author: Martin Milata
|
||||
description: Pull or build atomic-reactor docker image to be used in OSBS (OpenShift build service).
|
||||
company: Red Hat
|
||||
issue_tracker_url: https://github.com/projectatomic/ansible-osbs/issues
|
||||
license: BSD
|
||||
min_ansible_version: 1.2
|
||||
platforms:
|
||||
- name: EL
|
||||
versions:
|
||||
- 7
|
||||
- name: Fedora
|
||||
versions:
|
||||
- 21
|
||||
- 22
|
||||
categories:
|
||||
- cloud
|
||||
- development
|
||||
- packaging
|
||||
dependencies: []
|
|
@ -1,2 +0,0 @@
|
|||
---
|
||||
- include_tasks: source_{{ atomic_reactor_source }}.yml
|
|
@ -1,27 +0,0 @@
|
|||
---
|
||||
- name: pull base image
|
||||
command: docker pull {{ atomic_reactor_git.base_registry }}/{{ atomic_reactor_git.base_image }}
|
||||
when: atomic_reactor_git.base_image is defined
|
||||
|
||||
- name: tag base image
|
||||
command: docker tag -f {{ atomic_reactor_git.base_registry }}/{{ atomic_reactor_git.base_image }} {{ atomic_reactor_git.base_image_retag }}
|
||||
when: atomic_reactor_git.base_image_retag is defined
|
||||
|
||||
- name: pull git repository with Dockerfile
|
||||
git:
|
||||
repo: "{{ atomic_reactor_git.git_url }}"
|
||||
dest: "{{ atomic_reactor_git.git_local_path }}"
|
||||
version: "{{ atomic_reactor_git.git_branch }}"
|
||||
accept_hostkey: yes
|
||||
register: dockerfile_git_repo
|
||||
changed_when: "dockerfile_git_repo.after|default('after') != dockerfile_git_repo.before|default('before')"
|
||||
|
||||
- name: check if atomic-reactor image is present
|
||||
command: docker inspect {{ atomic_reactor_tag }}
|
||||
register: image_present
|
||||
failed_when: image_present.rc != 0 and ('No such image' not in image_present.stderr)
|
||||
changed_when: image_present.rc != 0
|
||||
|
||||
- name: build atomic-reactor image
|
||||
command: docker build --no-cache=true --tag={{ atomic_reactor_tag }} {{ atomic_reactor_git.git_local_path }}/{{ atomic_reactor_git.git_subdir }}
|
||||
when: dockerfile_git_repo.changed or image_present.changed
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
- name: pull atomic-reactor image
|
||||
command: docker pull {{ atomic_reactor_pull.registry }}/{{ atomic_reactor_pull.image }}
|
||||
register: pull_image
|
||||
|
||||
- name: tag atomic-reactor image
|
||||
command: docker tag -f {{ atomic_reactor_pull.registry }}/{{ atomic_reactor_pull.image }} {{ atomic_reactor_tag }}
|
||||
when: pull_image.changed
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
- name: install atomic-reactor package locally
|
||||
action: "{{ ansible_pkg_mgr }} name=atomic-reactor state=latest"
|
Loading…
Add table
Add a link
Reference in a new issue