Conduit: Create the initial conduit demo (Bug 1348880). r?mars draft
authorDavid Walsh <dwalsh@mozilla.com>
Mon, 20 Mar 2017 11:27:10 -0500
changeset 5529 96ab89c5910087f27414414b787d3c291d0f6523
parent 5512 41108a19c22d74e66c6692c0fc4f5c1b58ae80b5
push id170
push userbmo:dwalsh@mozilla.com
push dateMon, 20 Mar 2017 18:46:10 +0000
reviewersmars
bugs1348880
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
conduitdemo/docker-compose.yml
conduitdemo/docker-vct-hg/Dockerfile
conduitdemo/docker-vct-hg/hgrc
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