Conduit: Create the initial conduit demo (
Bug 1348880). r?mars
This conduit demo starts the hg server, starts the commitindex service, loads and enables VCT mercurial extensions, and proves that the mercurial server's commitindex prints out a log as it receives a POST
MozReview-Commit-ID: 6u4MQpP42S2
new file mode 100644
--- /dev/null
+++ b/conduitdemo/docker-compose.yml
@@ -0,0 +1,60 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+version: '2'
+services:
+
+ demo:
+ build:
+ context: ./docker-vct-hg
+ dockerfile: ./Dockerfile
+ environment:
+ - HG_RELEASE=4.1
+
+ ## staginghgserver
+ hgserver:
+ build:
+ context: ../staginghgserver/docker
+ dockerfile: ./Dockerfile
+ volumes:
+ - data-volume:/repos
+ - ../staginghgserver/extensions:/hgext
+ - ../staginghgserver/docker/hgweb.conf:/etc/hg/hgweb.conf
+ environment:
+ - HG_RELEASE=4.1
+ - HG_WEB_CONF=/etc/hg/hgweb.conf
+ depends_on:
+ - hgrepoinit
+
+ hgrepoinit:
+ build:
+ context: ../staginghgserver/docker
+ dockerfile: ./Dockerfile
+ volumes:
+ - data-volume:/repos
+ environment:
+ - HG_RELEASE=4.1
+ - HG_WEB_CONF=/etc/hg/hgweb.conf
+ entrypoint:
+ - hg
+ - init
+ - /repos/testrepo
+
+ ## commitindex
+ commitindex:
+ build:
+ context: ../commitindex
+ dockerfile: ./docker/commitindex/dockerfile-dev
+ volumes:
+ - ./:/app
+ depends_on:
+ - mountebank
+
+ mountebank:
+ build:
+ context: ../docker/mountebank/
+ command: start --logfile /mb.log --debug --mock
+
+volumes:
+ data-volume:
new file mode 100644
--- /dev/null
+++ b/conduitdemo/docker-vct-hg/Dockerfile
@@ -0,0 +1,25 @@
+FROM alpine:3.5
+
+ENV HG_RELEASE=4.1 \
+ VCT_VERSION=tip
+
+WORKDIR /root
+
+RUN apk --no-cache add python ca-certificates curl
+RUN apk --no-cache add --virtual build-dependencies \
+ build-base \
+ python-dev \
+ py-pip \
+ && pip install --no-cache mercurial==$HG_RELEASE \
+ && apk del build-dependencies
+
+RUN hg clone https://hg.mozilla.org/hgcustom/version-control-tools -r $VCT_VERSION /root/version-control-tools
+
+## TEMPORARY; remove once Israel's work is merged
+RUN cd /root/version-control-tools \
+ && hg pull -r fd329852530424742191e3c3c73f5eb2304f8b8a https://reviewboard-hg.mozilla.org/version-control-tools \
+ && hg update tip
+
+COPY hgrc /root/.hgrc
+
+CMD /bin/sh
new file mode 100644
--- /dev/null
+++ b/conduitdemo/docker-vct-hg/hgrc
@@ -0,0 +1,6 @@
+[ui]
+username = Wavid Dalsh <wdalsh@mozilla.com>
+
+[extensions]
+reviewboard = /root/version-control-tools/hgext/reviewboard/client.py
+conduit = /root/version-control-tools/hgext/conduit-client/client.py