diff options
Diffstat (limited to 'roles/docker_img_rhel6ops')
16 files changed, 241 insertions, 0 deletions
diff --git a/roles/docker_img_rhel6ops/README.md b/roles/docker_img_rhel6ops/README.md new file mode 100644 index 000000000..2055cd599 --- /dev/null +++ b/roles/docker_img_rhel6ops/README.md @@ -0,0 +1,36 @@ +Role Name +========= + +The purpose of this role is to setup files to do the rhel6ops docker image build + +Requirements +------------ + +Docker + +Role Variables +-------------- + +None + +Dependencies +------------ + +None + +Example Playbook +---------------- + + - hosts: servers + roles: + - docker_img_rhel6ops + +License +------- + +ASL 2.0 + +Author Information +------------------ + +Thomas Wiest diff --git a/roles/docker_img_rhel6ops/defaults/main.yml b/roles/docker_img_rhel6ops/defaults/main.yml new file mode 100644 index 000000000..5bd68eae2 --- /dev/null +++ b/roles/docker_img_rhel6ops/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for docker_img_rhel6ops diff --git a/roles/docker_img_rhel6ops/files/rhel6ops_container/Dockerfile b/roles/docker_img_rhel6ops/files/rhel6ops_container/Dockerfile new file mode 100644 index 000000000..86783f96d --- /dev/null +++ b/roles/docker_img_rhel6ops/files/rhel6ops_container/Dockerfile @@ -0,0 +1,29 @@ +FROM rhel6 +MAINTAINER Thomas Wiest <twiest@redhat.com> + +ENV CONTAINER docker +ENV USER root +ENV HOME /root +ENV TERM xterm +WORKDIR /root + +# creature comforts +ADD bashrc /root/.bashrc + +# Add the yum repos +ADD etc/yum.repos.d/ /etc/yum.repos.d + +# Add yum vars +RUN echo -n 6 > /etc/yum/vars/majorrelease + +# setup links for the yum mirror certs +RUN ln -s /run/secrets/etc-pki-entitlement/yum/client-cert.pem /var/lib/yum/client-cert.pem ; \ + ln -s /run/secrets/etc-pki-entitlement/yum/client-key.pem /var/lib/yum/client-key.pem + + +RUN rpm --import /etc/pki/rpm-gpg/* && \ +yum clean metadata && \ +yum -y remove subscription-manager && \ +yum -y install vim-enhanced telnet && \ +yum -y update && \ +yum clean all diff --git a/roles/docker_img_rhel6ops/files/rhel6ops_container/bashrc b/roles/docker_img_rhel6ops/files/rhel6ops_container/bashrc new file mode 100644 index 000000000..343051d19 --- /dev/null +++ b/roles/docker_img_rhel6ops/files/rhel6ops_container/bashrc @@ -0,0 +1,14 @@ +# .bashrc + +# User specific aliases and functions + +alias ls='ls --color' +alias rm='rm -i' +alias cp='cp -i' +alias mv='mv -i' +alias vi=vim + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi diff --git a/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/epel.repo b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/epel.repo new file mode 100644 index 000000000..583ca72c9 --- /dev/null +++ b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/epel.repo @@ -0,0 +1,16 @@ +[epel] +name=Extra Packages for Enterprise Linux 6 - $basearch +baseurl=http://mirror.ops.rhcloud.com/mirror/epel/6/$basearch/ +failovermethod=priority +enabled=1 +gpgcheck=0 +exclude=libmongodb mongodb* nodejs* + +[epel-testing] +name=Extra Packages for Enterprise Linux 6 - Testing - $basearch +baseurl=http://mirror.ops.rhcloud.com/mirror/epel/testing/6/$basearch/ +failovermethod=priority +enabled=0 +gpgcheck=0 +exclude=libmongodb mongodb* nodejs* + diff --git a/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/li-rhscl.repo b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/li-rhscl.repo new file mode 100644 index 000000000..4f3bf1a00 --- /dev/null +++ b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/li-rhscl.repo @@ -0,0 +1,15 @@ +[li-rhscl] +name=Li RHSCL repo for Enterprise Linux $majorrelease - $basearch +baseurl=https://mirror.ops.rhcloud.com/libra/rhscl-rhel-$majorrelease-libra/$basearch/ + https://use-mirror1.ops.rhcloud.com/libra/rhscl-rhel-$majorrelease-libra/$basearch/ + https://use-mirror2.ops.rhcloud.com/libra/rhscl-rhel-$majorrelease-libra/$basearch/ + https://euw-mirror1.ops.rhcloud.com/libra/rhscl-rhel-$majorrelease-libra/$basearch/ + https://gce-mirror1.ops.rhcloud.com/libra/rhscl-rhel-$majorrelease-libra/$basearch/ + https://gce-mirror2.ops.rhcloud.com/libra/rhscl-rhel-$majorrelease-libra/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-release https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-beta https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-openshifthosted +failovermethod=priority +sslverify=0 +sslclientcert=/var/lib/yum/client-cert.pem +sslclientkey=/var/lib/yum/client-key.pem diff --git a/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/li-staging.repo b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/li-staging.repo new file mode 100644 index 000000000..35a8babe1 --- /dev/null +++ b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/li-staging.repo @@ -0,0 +1,15 @@ +[li-staging] +name=Staging Li repo for Enterprise Linux $majorrelease - $basearch +baseurl=https://mirror.ops.rhcloud.com/libra/rhel-$majorrelease-libra-stage/$basearch/ + https://use-mirror1.ops.rhcloud.com/libra/rhel-$majorrelease-libra-stage/$basearch/ + https://use-mirror2.ops.rhcloud.com/libra/rhel-$majorrelease-libra-stage/$basearch/ + https://euw-mirror1.ops.rhcloud.com/libra/rhel-$majorrelease-libra-stage/$basearch/ + https://gce-mirror1.ops.rhcloud.com/libra/rhel-$majorrelease-libra-stage/$basearch/ + https://gce-mirror2.ops.rhcloud.com/libra/rhel-$majorrelease-libra-stage/$basearch/ +enabled=1 +gpgcheck=0 +gpgkey=https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-release https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-beta https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-openshifthosted +failovermethod=priority +sslverify=0 +sslclientcert=/var/lib/yum/client-cert.pem +sslclientkey=/var/lib/yum/client-key.pem diff --git a/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/li.repo b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/li.repo new file mode 100644 index 000000000..be2cf66b5 --- /dev/null +++ b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/li.repo @@ -0,0 +1,15 @@ +[li] +name=Li repo for Enterprise Linux $majorrelease - $basearch +baseurl=https://mirror.ops.rhcloud.com/libra/rhel-$majorrelease-libra/$basearch/ + https://use-mirror1.ops.rhcloud.com/libra/rhel-$majorrelease-libra/$basearch/ + https://use-mirror2.ops.rhcloud.com/libra/rhel-$majorrelease-libra/$basearch/ + https://euw-mirror1.ops.rhcloud.com/libra/rhel-$majorrelease-libra/$basearch/ + https://gce-mirror1.ops.rhcloud.com/libra/rhel-$majorrelease-libra/$basearch/ + https://gce-mirror2.ops.rhcloud.com/libra/rhel-$majorrelease-libra/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-release https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-beta https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-openshifthosted +failovermethod=priority +sslverify=0 +sslclientcert=/var/lib/yum/client-cert.pem +sslclientkey=/var/lib/yum/client-key.pem diff --git a/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/oso-rhui-rhel-server-releases-optional.repo b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/oso-rhui-rhel-server-releases-optional.repo new file mode 100644 index 000000000..eea68789e --- /dev/null +++ b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/oso-rhui-rhel-server-releases-optional.repo @@ -0,0 +1,16 @@ +[oso-rhui-rhel-server-releases-optional] +name=OpenShift Online RHUI Mirror RH Enterprise Linux $majorrelease - Optional +baseurl=https://mirror.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-releases-optional/ + https://use-mirror1.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-releases-optional/ + https://use-mirror2.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-releases-optional/ + https://euw-mirror1.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-releases-optional/ + https://gce-mirror1.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-releases-optional/ + https://gce-mirror2.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-releases-optional/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-release https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-beta https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-openshifthosted +exclude=libcgroup* gluster* +failovermethod=priority +sslverify=False +sslclientcert=/var/lib/yum/client-cert.pem +sslclientkey=/var/lib/yum/client-key.pem diff --git a/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/oso-rhui-rhel-server-releases.repo b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/oso-rhui-rhel-server-releases.repo new file mode 100644 index 000000000..5b11139c7 --- /dev/null +++ b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/oso-rhui-rhel-server-releases.repo @@ -0,0 +1,16 @@ +[oso-rhui-rhel-server-releases] +name=OpenShift Online RHUI Mirror RH Enterprise Linux $majorrelease +baseurl=https://mirror.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-releases/ + https://use-mirror1.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-releases/ + https://use-mirror2.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-releases/ + https://euw-mirror1.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-releases/ + https://gce-mirror1.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-releases/ + https://gce-mirror2.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-releases/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-release https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-beta https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-openshifthosted +exclude=libcgroup* gluster* +failovermethod=priority +sslverify=False +sslclientcert=/var/lib/yum/client-cert.pem +sslclientkey=/var/lib/yum/client-key.pem diff --git a/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/oso-rhui-rhel-server-rhscl.repo b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/oso-rhui-rhel-server-rhscl.repo new file mode 100644 index 000000000..e62d7ad18 --- /dev/null +++ b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/oso-rhui-rhel-server-rhscl.repo @@ -0,0 +1,15 @@ +[oso-rhui-rhel-server-rhscl] +name=OpenShift Online RHUI Mirror RH Enterprise Linux $majorrelease - RHSCL +baseurl=https://mirror.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-rhscl/ + https://use-mirror1.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-rhscl/ + https://use-mirror2.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-rhscl/ + https://euw-mirror1.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-rhscl/ + https://gce-mirror1.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-rhscl/ + https://gce-mirror2.ops.rhcloud.com/libra/rhui-rhel-server-$majorrelease-rhscl/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-release https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-beta https://mirror.ops.rhcloud.com/libra/keys/RPM-GPG-KEY-redhat-openshifthosted +failovermethod=priority +sslverify=False +sslclientcert=/var/lib/yum/client-cert.pem +sslclientkey=/var/lib/yum/client-key.pem diff --git a/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/zabbix.repo b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/zabbix.repo new file mode 100644 index 000000000..68a6ede8c --- /dev/null +++ b/roles/docker_img_rhel6ops/files/rhel6ops_container/etc/yum.repos.d/zabbix.repo @@ -0,0 +1,14 @@ +[zabbix] +name=Zend Server +baseurl=http://mirror.ops.rhcloud.com/mirror/zabbix/$majorrelease/$basearch + http://use-mirror1.ops.rhcloud.com/mirror/zabbix/$majorrelease/$basearch + http://use-mirror2.ops.rhcloud.com/mirror/zabbix/$majorrelease/$basearch + http://euw-mirror1.ops.rhcloud.com/mirror/zabbix/$majorrelease/$basearch +enabled=1 +gpgcheck=1 +gpgkey=http://mirror.ops.rhcloud.com/mirror/zabbix/keys/RPM-GPG-KEY-ZABBIX +failovermethod=priority +sslverify=0 +sslclientcert=/var/lib/yum/client-cert.pem +sslclientkey=/var/lib/yum/client-key.pem + diff --git a/roles/docker_img_rhel6ops/handlers/main.yml b/roles/docker_img_rhel6ops/handlers/main.yml new file mode 100644 index 000000000..9b5fe2b3d --- /dev/null +++ b/roles/docker_img_rhel6ops/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for docker_img_build diff --git a/roles/docker_img_rhel6ops/meta/main.yml b/roles/docker_img_rhel6ops/meta/main.yml new file mode 100644 index 000000000..40f83bf2f --- /dev/null +++ b/roles/docker_img_rhel6ops/meta/main.yml @@ -0,0 +1,14 @@ +--- +galaxy_info: + author: Thomas Wiest + description: Tools to do docker image builds + company: Red Hat + license: ASL 2.0 + min_ansible_version: 1.6 + platforms: + - name: EL + versions: + - 7 + categories: + - docker +dependencies: [] diff --git a/roles/docker_img_rhel6ops/tasks/main.yml b/roles/docker_img_rhel6ops/tasks/main.yml new file mode 100644 index 000000000..486ba6d5a --- /dev/null +++ b/roles/docker_img_rhel6ops/tasks/main.yml @@ -0,0 +1,20 @@ +--- +- name: deploy rhel6ops image build files + file: "dest=/usr/local/etc/containers/{{ item }} mode=755 state=directory" + with_items: + - rhel6ops_container + - rhel6ops_container/etc/yum.repos.d + +- name: deploy rhel6ops image build files + copy: "src=rhel6ops_container/{{ item.name }} dest=/usr/local/etc/containers/rhel6ops_container/{{ item.name }} mode={{ item.mode }}" + with_items: + - { name: 'bashrc', mode: '644' } + - { name: 'Dockerfile', mode: '644' } + - { name: 'etc/yum.repos.d/li.repo', mode: '644' } + - { name: 'etc/yum.repos.d/li-rhscl.repo', mode: '644' } + - { name: 'etc/yum.repos.d/li-staging.repo', mode: '644' } + - { name: 'etc/yum.repos.d/epel.repo', mode: '644' } + - { name: 'etc/yum.repos.d/oso-rhui-rhel-server-releases-optional.repo', mode: '644' } + - { name: 'etc/yum.repos.d/oso-rhui-rhel-server-releases.repo', mode: '644' } + - { name: 'etc/yum.repos.d/oso-rhui-rhel-server-rhscl.repo', mode: '644' } + - { name: 'etc/yum.repos.d/zabbix.repo', mode: '644' } diff --git a/roles/docker_img_rhel6ops/vars/main.yml b/roles/docker_img_rhel6ops/vars/main.yml new file mode 100644 index 000000000..febd12ead --- /dev/null +++ b/roles/docker_img_rhel6ops/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for docker_img_rhel6ops |