Commit 5543ebde by Edward Zarecor

Merge pull request #2607 from edx/e0d/update-common-builds

updating refs, use external script
parents 693ee4d4 133aa123
*
!playbooks/
!docker/
!util/install/
......@@ -2,53 +2,8 @@ FROM ubuntu:precise
MAINTAINER edxops
ENV ANSIBLE_REPO="https://github.com/edx/ansible"
ENV CONFIGURATION_REPO="https://github.com/edx/configuration.git"
ENV CONFIGURATION_VERSION="e0d/docker-artifacts"
ENV CONFIGURATION_VERSION="master"
# system bootstrap
RUN apt-get update
RUN apt-get -y install software-properties-common python-software-properties
RUN add-apt-repository ppa:fkrull/deadsnakes-python2.7
RUN apt-get update
RUN apt-get -y install sudo
RUN useradd docker && echo "docker:docker" | chpasswd
RUN echo "docker ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
RUN mkdir -p /home/docker && chown -R docker:docker /home/docker
RUN apt-get install -y \
git \
libmysqlclient-dev \
python-apt \
python-jinja2 \
python-pip \
python-yaml \
python2.7 \
python2.7-dev
# Temporary hacking related to an SELinux bug. This issue causes, at least,
# useradd to fail silently when the -m flag is passed in. The bug affects
# Ubuntu precise and is tracked here:
#
# https://bugs.launchpad.net/ubuntu/+source/libselinux/+bug/1424795
RUN apt-get install wget
RUN wget http://mirrors.kernel.org/ubuntu/pool/main/libs/libselinux/libselinux1_2.2.2-1_amd64.deb && dpkg -i libselinux1_2.2.2-1_amd64.deb && rm -f libselinux1_2.2.2-1_amd64.deb
# end hack
USER docker
# ansible bootstrap
RUN sudo git clone --recursive ${ANSIBLE_REPO} /tmp/ansible
WORKDIR /tmp/ansible
ENV PATH /tmp/ansible/bin:/bin:/sbin:/usr/sbin:/usr/bin
# Install the configuration repository to install
# edx-ansible role
RUN sudo git clone ${CONFIGURATION_REPO} /tmp/configuration
WORKDIR /tmp/configuration
RUN sudo git checkout ${CONFIGURATION_VERSION}
RUN sudo pip install -r pre-requirements.txt
RUN sudo pip install -r requirements.txt
WORKDIR /tmp/configuration/playbooks/edx-east
RUN sudo /tmp/ansible/bin/ansible-playbook edx_ansible.yml -i '127.0.0.1,' -c local -e "configuration_version=${CONFIGURATION_VERSION}"
WORKDIR /edx/app/edx_ansible
# cleanup
RUN sudo rm -rf /tmp/ansible
RUN sudo rm -rf /tmp/configuration
ADD util/install/ansible-bootstrap.sh /tmp/ansible-bootstrap.sh
RUN chmod +x /tmp/ansible-bootstrap.sh
RUN /tmp/ansible-bootstrap.sh
......@@ -2,45 +2,8 @@ FROM ubuntu:trusty
MAINTAINER edxops
ENV ANSIBLE_REPO="https://github.com/edx/ansible"
ENV CONFIGURATION_REPO="https://github.com/edx/configuration.git"
ENV CONFIGURATION_VERSION="e0d/docker-artifacts"
ENV CONFIGURATION_VERSION="master"
# system bootstrap
RUN apt-get update
RUN apt-get -y install software-properties-common python-software-properties
RUN add-apt-repository ppa:fkrull/deadsnakes-python2.7
RUN apt-get update
RUN apt-get -y install sudo
RUN useradd docker && echo "docker:docker" | chpasswd
RUN echo "docker ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
RUN mkdir -p /home/docker && chown -R docker:docker /home/docker
RUN apt-get install -y \
git \
libmysqlclient-dev \
python-apt \
python-jinja2 \
python-pip \
python-yaml \
python2.7 \
python2.7-dev
USER docker
# ansible bootstrap
RUN sudo git clone --recursive ${ANSIBLE_REPO} /tmp/ansible
WORKDIR /tmp/ansible
ENV PATH /tmp/ansible/bin:/bin:/sbin:/usr/sbin:/usr/bin
# Install the configuration repository to install
# edx-ansible role
RUN sudo git clone ${CONFIGURATION_REPO} /tmp/configuration
WORKDIR /tmp/configuration
RUN sudo git checkout ${CONFIGURATION_VERSION}
RUN sudo pip install -r pre-requirements.txt
RUN sudo pip install -r requirements.txt
WORKDIR /tmp/configuration/playbooks/edx-east
RUN sudo /tmp/ansible/bin/ansible-playbook edx_ansible.yml -i '127.0.0.1,' -c local -e "configuration_version=${CONFIGURATION_VERSION}"
WORKDIR /edx/app/edx_ansible
# cleanup
RUN sudo rm -rf /tmp/ansible
RUN sudo rm -rf /tmp/configuration
ADD util/install/ansible-bootstrap.sh /tmp/ansible-bootstrap.sh
RUN chmod +x /tmp/ansible-bootstrap.sh
RUN /tmp/ansible-bootstrap.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment