You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/05/30 14:39:17 UTC

[14/14] allura git commit: [#7806] ticket:778 Add docker docs

[#7806] ticket:778 Add docker docs


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/a50a2a81
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/a50a2a81
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/a50a2a81

Branch: refs/heads/ib/7806
Commit: a50a2a81290e51612dfbfcba58d41710cefb11c7
Parents: c57f2e8
Author: Igor Bondarenko <je...@gmail.com>
Authored: Sat May 30 15:37:05 2015 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Sat May 30 15:37:05 2015 +0300

----------------------------------------------------------------------
 INSTALL-docker.markdown | 112 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 112 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/a50a2a81/INSTALL-docker.markdown
----------------------------------------------------------------------
diff --git a/INSTALL-docker.markdown b/INSTALL-docker.markdown
new file mode 100644
index 0000000..5330084
--- /dev/null
+++ b/INSTALL-docker.markdown
@@ -0,0 +1,112 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# General info
+
+## Allura runs on following docker containers:
+
+- web
+- mongo
+- taskd
+- solr
+- inmail
+- outmail
+
+## Host-mounted volumes (created on first run)
+
+Current directory mounted as `/allura` inside containers.
+
+Python environment:
+
+- `env-docker/python`
+- `env-docker/bin`
+
+Services data:
+
+- `/allura-data/mongo` - mongo data
+- `/allura-data/solr` - SOLR index
+- `/allura-data/scm/{git,hg,svn}` - code repositories
+- `/allura-data/scm/snapshots` - generated code snapshots
+
+## Ports, exposed to host system:
+
+- 8080 - webapp
+- 8983 - SOLR admin panel (http://localhost:8983/solr/)
+- 8825 - incoming mail listener
+
+
+# First run
+
+Install [Docker](http://docs.docker.com/installation/) 
+and [Docker Compose](https://docs.docker.com/compose/install/).
+
+Build/fetch all required images:
+
+    ~$ docker-compose build
+
+Install requirements:
+
+    ~$ docker-compose run web pip install -r requirements.txt
+
+Install Allura packages:
+
+    ~$ docker-compose run web ./rebuild-all.bash
+
+Initialize database with test data:
+
+    ~$ docker-compose run web bash -c 'cd Allura && paster setup-app docker-dev.ini'
+
+Start containers in background:
+
+    ~$ docker-compose up -d
+
+# Useful commands
+
+Restarting all containers:
+
+    ~$ docker-compose up -d
+
+View logs from all services:
+
+    ~$ docker-compose logs
+
+You can specify one or more services to view logs only from them, e.g. to see
+outgoing mail:
+
+    ~$ docker-compose logs outmail
+
+Update requirements and reinstall apps:
+
+    ~$ docker-compose run web pip install -r requirements.txt
+    ~$ docker-compose run web ./rebuild-all.bash
+
+You may want to restart at least taskd container after that in order for it to
+pick up changes.
+
+Running all tests:
+
+    ~$ docker-compose run web ./run_tests
+
+Running subset of tests:
+
+    ~$ docker-compose run web bash -c 'cd ForgeGit && nosetests forgegit.tests.functional.test_controllers:TestFork'
+
+Connecting to mongo directly:
+
+    ~$ docker-compose run mongo mongo --host mongo