Commit 9663401a by Jeremy Bowman

TE-2548 Support for building Open edX release Docker images

parent 2263f944
......@@ -43,10 +43,9 @@ set of make commands.
Image naming
************
Images built from master branches are named ``edxops/<service>``, for example,
``edxops/edxapp``. Images built from Open edX release branches include the
short release name: ``edxops/ficus/edxapp``. Both images will have a
``:latest`` version.
The latest images built from master branches are named ``edxops/<service>:latest``,
for example, ``edxops/edxapp:latest``. Images built from Open edX release
branches use an appropriate tag, such as ``edxops/edxapp:hawthorn.master``.
Build arguments
***************
......@@ -56,13 +55,13 @@ Dockerfiles make use of these build arguments:
- ``OPENEDX_RELEASE`` is the release branch to use. It defaults to "master".
To use an Open edX release, provide the full branch name:
``--build-arg OPENEDX_RELEASE=open-release/ficus.master``
``--build-arg OPENEDX_RELEASE=open-release/hawthorn.master``
- ``IMAGE_PREFIX`` is the release branch component to add to images. It
defaults to an empty string for master builds. For Open edX release, use the
short name of the release, with a trailing slash:
- ``BASE_IMAGE_TAG`` is the tag for the base image to build on. It
defaults to "latest" for master builds. For an Open edX release, use
the name of the release:
``--build-arg IMAGE_PREFIX=ficus/``
``--build-arg BASE_IMAGE_TAG=hawthorn.master``
Conventions
***********
......
FROM edxops/xenial-common:latest
# To build this Dockerfile:
#
# From the root of configuration:
#
# docker build -f docker/build/analytics_api/Dockerfile .
#
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo.
ARG BASE_IMAGE_TAG=latest
FROM edxops/xenial-common:${BASE_IMAGE_TAG}
MAINTAINER edxops
RUN apt-get update
......@@ -8,7 +18,15 @@ COPY docker/build/analytics_api/ansible_overrides.yml /
WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
COPY docker/build/analytics_api/ansible_overrides.yml /
RUN /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook analytics_api.yml -i '127.0.0.1,' -c local -t "install:base,install:system-requirements,install:configuration,install:app-requirements,install:code" -e@/ansible_overrides.yml
ARG OPENEDX_RELEASE=master
ENV OPENEDX_RELEASE=${OPENEDX_RELEASE}
RUN /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook analytics_api.yml \
-i '127.0.0.1,' \
-c local \
-t "install:base,install:system-requirements,install:configuration,install:app-requirements,install:code" \
--extra-vars="ANALYTICS_API_VERSION=${OPENEDX_RELEASE}" \
--extra-vars="@/ansible_overrides.yml"
WORKDIR /edx/app/
CMD ["/edx/app/supervisor/venvs/supervisor/bin/supervisord", "-n", "--configuration", "/edx/app/supervisor/supervisord.conf"]
EXPOSE 443 80
......@@ -19,6 +19,3 @@ ANALYTICS_API_DATABASES:
PASSWORD: 'password'
HOST: "db.{{ DOCKER_TLD }}"
PORT: '3306'
# Change this if you want to build a specific version of the ANALYTICS_API
ANALYTICS_API_VERSION: 'master'
......@@ -7,7 +7,8 @@
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo.
FROM edxops/xenial-common:latest
ARG BASE_IMAGE_TAG=latest
FROM edxops/xenial-common:${BASE_IMAGE_TAG}
MAINTAINER edxops
USER root
CMD ["/edx/app/supervisor/venvs/supervisor/bin/supervisord", "-n", "--configuration", "/edx/app/supervisor/supervisord.conf"]
......@@ -18,9 +19,12 @@ WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
COPY docker/build/credentials/ansible_overrides.yml /
COPY docker/build/devstack/ansible_overrides.yml /devstack/ansible_overrides.yml
ARG OPENEDX_RELEASE=master
ENV OPENEDX_RELEASE=${OPENEDX_RELEASE}
RUN sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook credentials.yml \
-c local -i "127.0.0.1," \
-t "install,assets,devstack" \
--extra-vars="CREDENTIALS_VERSION=${OPENEDX_RELEASE}" \
--extra-vars="@/ansible_overrides.yml" \
--extra-vars="@/devstack/ansible_overrides.yml"
......
---
COMMON_GIT_PATH: 'edx'
CREDENTIALS_VERSION: 'master'
COMMON_MYSQL_MIGRATE_USER: '{{ CREDENTIALS_MYSQL_USER }}'
COMMON_MYSQL_MIGRATE_PASS: '{{ CREDENTIALS_MYSQL_PASSWORD }}'
......
......@@ -7,7 +7,8 @@
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo.
FROM edxops/xenial-common:latest
ARG BASE_IMAGE_TAG=latest
FROM edxops/xenial-common:${BASE_IMAGE_TAG}
MAINTAINER edxops
ARG ARG_DEVPI_SERVER_VERSION=4.4.0
......
......@@ -7,7 +7,8 @@
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo.
FROM edxops/xenial-common:latest
ARG BASE_IMAGE_TAG=latest
FROM edxops/xenial-common:${BASE_IMAGE_TAG}
MAINTAINER edxops
USER root
CMD ["/edx/app/supervisor/venvs/supervisor/bin/supervisord", "-n", "--configuration", "/edx/app/supervisor/supervisord.conf"]
......@@ -18,9 +19,12 @@ WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
COPY docker/build/discovery/ansible_overrides.yml /
COPY docker/build/devstack/ansible_overrides.yml /devstack/ansible_overrides.yml
ARG OPENEDX_RELEASE=master
ENV OPENEDX_RELEASE=${OPENEDX_RELEASE}
RUN sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook discovery.yml \
-c local -i '127.0.0.1,' \
-t 'install,assets,devstack' \
--extra-vars="DISCOVERY_VERSION=${OPENEDX_RELEASE}" \
--extra-vars="@/ansible_overrides.yml" \
--extra-vars="@/devstack/ansible_overrides.yml"
......
---
COMMON_GIT_PATH: 'edx'
DISCOVERY_VERSION: 'master'
COMMON_MYSQL_MIGRATE_USER: '{{ DISCOVERY_MYSQL_USER }}'
COMMON_MYSQL_MIGRATE_PASS: '{{ DISCOVERY_MYSQL_PASSWORD }}'
......
......@@ -7,7 +7,8 @@
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo.
FROM edxops/xenial-common:latest
ARG BASE_IMAGE_TAG=latest
FROM edxops/xenial-common:${BASE_IMAGE_TAG}
MAINTAINER edxops
USER root
CMD ["/edx/app/supervisor/venvs/supervisor/bin/supervisord", "-n", "--configuration", "/edx/app/supervisor/supervisord.conf"]
......@@ -18,9 +19,12 @@ WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
COPY docker/build/ecommerce/ansible_overrides.yml /
COPY docker/build/devstack/ansible_overrides.yml /devstack/ansible_overrides.yml
ARG OPENEDX_RELEASE=master
ENV OPENEDX_RELEASE=${OPENEDX_RELEASE}
RUN sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook ecommerce.yml \
-c local -i '127.0.0.1,' \
-t 'install,assets,devstack' \
--extra-vars="ECOMMERCE_VERSION=${OPENEDX_RELEASE}" \
--extra-vars="@/ansible_overrides.yml" \
--extra-vars="@/devstack/ansible_overrides.yml"
......
---
COMMON_GIT_PATH: 'edx'
ECOMMERCE_VERSION: 'master'
COMMON_MYSQL_MIGRATE_USER: '{{ ECOMMERCE_MYSQL_USER }}'
COMMON_MYSQL_MIGRATE_PASS: '{{ ECOMMERCE_MYSQL_PASSWORD }}'
......
......@@ -2,14 +2,13 @@
#
# From the root of configuration:
#
# docker build -f docker/build/edxapp/Dockerfile . -t edxops/edxapp:latest
# docker build -f docker/build/edxapp/Dockerfile .
#
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo.
ARG IMAGE_PREFIX
FROM edxops/${IMAGE_PREFIX}xenial-common:latest
ARG BASE_IMAGE_TAG=latest
FROM edxops/xenial-common:${BASE_IMAGE_TAG}
MAINTAINER edxops
USER root
CMD ["/edx/app/supervisor/venvs/supervisor/bin/supervisord", "-n", "--configuration", "/edx/app/supervisor/supervisord.conf"]
......@@ -26,7 +25,7 @@ ENV OPENEDX_RELEASE=${OPENEDX_RELEASE}
RUN sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook edxapp.yml \
-c local -i '127.0.0.1,' \
-t 'install,assets,devstack' \
--extra-vars=edx_platform_version=${OPENEDX_RELEASE} \
--extra-vars="edx_platform_version=${OPENEDX_RELEASE}" \
--extra-vars="@/ansible_overrides.yml" \
--extra-vars="@/devstack.yml" \
--extra-vars="@/devstack/ansible_overrides.yml" \
......
FROM edxops/xenial-common:latest
# To build this Dockerfile:
#
# From the root of configuration:
#
# docker build -f docker/build/forum/Dockerfile .
#
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo.
ARG BASE_IMAGE_TAG=latest
FROM edxops/xenial-common:${BASE_IMAGE_TAG}
MAINTAINER edxops
WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
ADD . /edx/app/edx_ansible/edx_ansible
COPY docker/build/forum/ansible_overrides.yml /
ARG OPENEDX_RELEASE=master
ENV OPENEDX_RELEASE=${OPENEDX_RELEASE}
RUN /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook forum.yml \
-i '127.0.0.1,' -c local \
-t "install:base,install:configuration,install:app-requirements,install:code" \
-e@/ansible_overrides.yml
--extra-vars="forum_version=${OPENEDX_RELEASE}" \
--extra-vars="@/ansible_overrides.yml"
WORKDIR /edx/app
CMD ["/edx/app/supervisor/venvs/supervisor/bin/supervisord", "-n", "--configuration", "/edx/app/supervisor/supervisord.conf"]
EXPOSE 4567
FROM edxops/xenial-common:latest
# To build this Dockerfile:
#
# From the root of configuration:
#
# docker build -f docker/build/insights/Dockerfile .
#
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo.
ARG BASE_IMAGE_TAG=latest
FROM edxops/xenial-common:${BASE_IMAGE_TAG}
MAINTAINER edxops
ADD . /edx/app/edx_ansible/edx_ansible
COPY docker/build/insights/ansible_overrides.yml /
WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
ARG OPENEDX_RELEASE=master
ENV OPENEDX_RELEASE=${OPENEDX_RELEASE}
RUN /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook insights.yml \
-i '127.0.0.1,' -c local \
-t "install:base,install:system-requirements,install:configuration,install:app-requirements,install:code" \
-e@/ansible_overrides.yml
--extra-vars="INSIGHTS_VERSION=${OPENEDX_RELEASE}" \
--extra-vars="@/ansible_overrides.yml"
CMD ["/edx/app/supervisor/venvs/supervisor/bin/supervisord", "-n", "--configuration", "/edx/app/supervisor/supervisord.conf"]
EXPOSE 8110 18110
FROM edxops/xenial-common:latest
# To build this Dockerfile:
#
# From the root of configuration:
#
# docker build -f docker/build/jenkins_build/Dockerfile .
#
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo.
ARG BASE_IMAGE_TAG=latest
FROM edxops/xenial-common:${BASE_IMAGE_TAG}
MAINTAINER edxops
USER root
......
......@@ -2,13 +2,13 @@
#
# From the root of configuration:
#
# docker build -f docker/build/xqueue/Dockerfile . -t edxops/xqueue:latest
# docker build -f docker/build/xqueue/Dockerfile .
#
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo.
ARG IMAGE_PREFIX
FROM edxops/${IMAGE_PREFIX}xenial-common:latest
ARG BASE_IMAGE_TAG=latest
FROM edxops/xenial-common:${BASE_IMAGE_TAG}
MAINTAINER edxops
CMD ["/edx/app/supervisor/venvs/supervisor/bin/supervisord", "-n", "--configuration", "/edx/app/supervisor/supervisord.conf"]
......@@ -17,6 +17,14 @@ RUN apt-get update
ADD . /edx/app/edx_ansible/edx_ansible
COPY docker/build/xqueue/ansible_overrides.yml /
WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
RUN /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook xqueue.yml -i '127.0.0.1,' -c local -t "install:base,install:system-requirements,install:configuration,install:app-requirements,install:code,devstack" -e@/ansible_overrides.yml
ARG OPENEDX_RELEASE=master
ENV OPENEDX_RELEASE=${OPENEDX_RELEASE}
RUN /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook xqueue.yml \
-i '127.0.0.1,' \
-c local \
-t "install:base,install:system-requirements,install:configuration,install:app-requirements,install:code,devstack" \
--extra-vars="xqueue_version=${OPENEDX_RELEASE}" \
--extra-vars="@/ansible_overrides.yml"
EXPOSE 18040
FROM edxops/trusty-common:v3
# To build this Dockerfile:
#
# From the root of configuration:
#
# docker build -f docker/build/xqwatcher/Dockerfile .
#
# This allows the dockerfile to update /edx/app/edx_ansible/edx_ansible
# with the currently checked-out configuration repo.
ARG BASE_IMAGE_TAG=latest
FROM edxops/xenial-common:${BASE_IMAGE_TAG}
MAINTAINER edxops
ADD . /edx/app/edx_ansible/edx_ansible
COPY docker/build/xqwatcher/ansible_overrides.yml /
WORKDIR /edx/app/edx_ansible/edx_ansible/docker/plays
ARG OPENEDX_RELEASE=master
ENV OPENEDX_RELEASE=${OPENEDX_RELEASE}
RUN /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook xqwatcher.yml \
-i '127.0.0.1,' -c local \
-t "install:base,install:configuration,install:system-requirements,install:app-requirements,install:code" \
-e@/ansible_overrides.yml
--extra-vars="XQWATCHER_VERSION=${OPENEDX_RELEASE}" \
--extra-vars="@/ansible_overrides.yml"
WORKDIR /edx/app
CMD ["/edx/app/supervisor/venvs/supervisor/bin/supervisord", "-n", "--configuration", "/edx/app/supervisor/supervisord.conf"]
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