Add post-install configration for openshift, OSBS and atomic-reactor
This commit is contained in:
parent
4bbc190bbb
commit
e99b4ecc51
3 changed files with 85 additions and 0 deletions
8
files/osbs/atomic-reactor.repo
Normal file
8
files/osbs/atomic-reactor.repo
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
[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
|
18
files/osbs/osbs.conf
Normal file
18
files/osbs/osbs.conf
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
[general]
|
||||||
|
build_json_dir = /usr/share/osbs/
|
||||||
|
|
||||||
|
[default]
|
||||||
|
openshift_uri = https://losbs.example.com:8443/
|
||||||
|
# if you want to get packages from koji (koji plugin in dock)
|
||||||
|
# you need to setup koji hub and root
|
||||||
|
# this sample is for fedora
|
||||||
|
koji_root = http://koji.fedoraproject.org/
|
||||||
|
koji_hub = http://koji.fedoraproject.org/kojihub
|
||||||
|
# in case of using artifacts plugin, you should provide a command
|
||||||
|
# how to fetch artifacts
|
||||||
|
sources_command = fedpkg sources
|
||||||
|
# from where should be images pulled and where should be pushed?
|
||||||
|
# registry_uri = your.example.registry
|
||||||
|
registry_uri = localhost:5000
|
||||||
|
verify_ssl = false
|
||||||
|
build_type = simple
|
|
@ -98,3 +98,62 @@
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
|
||||||
|
- name: atomic-reactor install and config
|
||||||
|
hosts: openshift_masters
|
||||||
|
user: root
|
||||||
|
gather_facts: False
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Configure the atomic-reactor COPR
|
||||||
|
copy:
|
||||||
|
src: osbs/atomic-reactor.repo
|
||||||
|
dest: /etc/yum/repos.d/atomic-reactor.repo
|
||||||
|
|
||||||
|
- name: Install atomic-reactor
|
||||||
|
yum: pkg=atomic-reactor state=present
|
||||||
|
|
||||||
|
- name: Build atomic-reactor base image
|
||||||
|
shell: atomic-reactor create-build-image --reactor-tarball-path /usr/share/atomic-reactor/atomic-reactor.tar.gz /usr/share/atomic-reactor/images/dockerhost-builder buildroot
|
||||||
|
|
||||||
|
- name: atomic-reactor install and config
|
||||||
|
hosts: openshift_masters
|
||||||
|
user: root
|
||||||
|
gather_facts: False
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Tag the buildroot for builder local registry
|
||||||
|
shell: docker tag buildroot localhost:5000/buildroot
|
||||||
|
|
||||||
|
- name: Push the buildroot to builder local registry
|
||||||
|
shell: docker push localhost:5000/buildroot
|
||||||
|
|
||||||
|
- name: Pull fedora docker image
|
||||||
|
shell: docker pull fedora
|
||||||
|
|
||||||
|
- name: Tag fedora for builder local registry
|
||||||
|
shell: docker tag fedora localhost:5000/fedora
|
||||||
|
|
||||||
|
- name: Push the fedora image to builder local registry
|
||||||
|
shell: docker push localhost:5000/fedora
|
||||||
|
|
||||||
|
- name: OSBS Configuration - OpenShift Auth
|
||||||
|
hosts: openshift_masters
|
||||||
|
user: root
|
||||||
|
gather_facts: False
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Set role-to-group for OSBS system:unauthenticated
|
||||||
|
shell: oadm policy add-role-to-group edit system:unauthenticated system:authenticated
|
||||||
|
- name: Set role-to-group for OSBS system:authenticated
|
||||||
|
shell: oadm policy add-role-to-group edit system:authenticated
|
||||||
|
|
||||||
|
- name: OSBS Client tools config
|
||||||
|
hosts: openshift_masters:openshift_nodes
|
||||||
|
user: root
|
||||||
|
gather_facts: False
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- copy:
|
||||||
|
src: osbs/osbs.conf
|
||||||
|
dest: /etc/osbs.conf
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue