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