From a92a843ad2aaa45b307126d9330597123ee76053 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Wed, 6 Apr 2016 15:13:11 -0300 Subject: Replace unused Dockerfile with one used for official builds. A container that can be used to run the atomic-openshift-installer, or by bypassing the entrypoint can be used to run ansible playbooks directly. Expects the user to mount a directory to /var/lib/openshift, where we'll write out the installer.cfg, ansible.log, and hosts inventory. WARNING: Don't run this on a host you're installing to, installation restarts Docker which will kill your installer. Example of running the quick installer: docker run -ti -v ~/openshift/:/var/lib/openshift-installer/:Z -v ~/.ssh:/root/.ssh:Z openshift3/installer install Example of running ansible directly: docker run --entrypoint=/usr/bin/ansible-playbook -ti -v ~/openshift/:/var/lib/openshift-installer/:Z -v ~/.ssh:/root/.ssh:Z openshift3/installer -i /openshift-installer/install/.ansible/hosts /usr/share/ansible/openshift-ansible/playbooks/adhoc/uninstall.yml --- Dockerfile | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 02ab51680..70f6f8a18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,23 @@ FROM rhel7 -MAINTAINER Aaron Weitekamp +MAINTAINER Troy Dawson -RUN yum -y install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm +LABEL Name="openshift3/installer" +LABEL Vendor="Red Hat" License=GPLv2+ +LABEL Version="v3.1.1.901" +LABEL Release="6" +LABEL BZComponent="aos3-installation-docker" +LABEL Architecture="x86_64" -# Not sure if all of these packages are necessary -# only git and ansible are known requirements -RUN yum install -y --enablerepo rhel-7-server-extras-rpms net-tools bind-utils git ansible pyOpenSSL +RUN INSTALL_PKGS="atomic-openshift-utils" && \ + yum install -y --enablerepo=rhel-7-server-ose-3.2-rpms $INSTALL_PKGS && \ + rpm -V $INSTALL_PKGS && \ + yum clean all -ADD ./ /opt/openshift-ansible/ +# Expect user to mount a workdir for container output (installer.cfg, hosts inventory, ansible log) +VOLUME /var/lib/openshift-installer/ +WORKDIR /var/lib/openshift-installer/ -ENTRYPOINT ["/usr/bin/ansible-playbook"] +RUN mkdir -p /var/lib/openshift-installer/ -CMD ["/opt/openshift-ansible/playbooks/byo/config.yml"] - -LABEL RUN docker run -it --rm --privileged --net=host -v ~/.ssh:/root/.ssh -v /etc/ansible:/etc/ansible --name NAME -e NAME=NAME -e IMAGE=IMAGE IMAGE +ENTRYPOINT ["/usr/bin/atomic-openshift-installer", "-c", "/var/lib/openshift-installer/installer.cfg", "--ansible-log-path", "/var/lib/openshift-installer/ansible.log"] -- cgit v1.2.3