Skip to content
This repository has been archived by the owner on Feb 2, 2018. It is now read-only.

Commit

Permalink
container: Added Dockerfile and startup-all-in-one.sh
Browse files Browse the repository at this point in the history
To build:

    docker build -t commissaire .

To run:

    docker run -p 8000:8000 -d --name commissaire commissaire
  • Loading branch information
ashcrow authored and mbarnes committed Jan 26, 2017
1 parent 0e3f843 commit fc4df83
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM fedora:25
MAINTAINER Red Hat, Inc. <container-tools@redhat.com>

ENV MHM_RELEASE v0.1.0
ENV PYTHONPATH /commissaire/src/

# Install required dependencies and commissaire
RUN dnf -y update && dnf -y install --setopt=tsflags=nodocs rsync openssh-clients redhat-rpm-config python3-pip python3-virtualenv git gcc libffi-devel openssl-devel etcd redis; dnf clean all && \
git clone https://github.com/projectatomic/commissaire-service.git && \
git clone https://github.com/projectatomic/commissaire-http.git && \
virtualenv-3 /environment && \
. /environment/bin/activate && \
cd commissaire-service && \
pip install -U pip && \
pip install -r requirements.txt && \
pip install . && \
cd ../commissaire-http && \
pip install -r requirements.txt && \
pip install . && \
cd .. && \
pip freeze > /installed-python-deps.txt && \
dnf remove -y gcc git redhat-rpm-config libffi-devel && \
dnf clean all && \
mkdir -p /etc/commissaire && \
cp -r /commissaire-service/conf/*.conf /etc/commissaire/ && \
cp -r /commissaire-http/conf/*.conf /etc/commissaire/ && \
sed -i 's|"listen-interface": "127.0.0.1"|"listen-interface": "0.0.0.0"|' /etc/commissaire/commissaire.conf

# Add the all-in-one start script
ADD tools/startup-all-in-one.sh /commissaire/
# Add the etcd init script
ADD tools/etcd_init.sh /commissaire/

# commissaire-server address
EXPOSE 8000
WORKDIR /commissaire
CMD /commissaire/startup-all-in-one.sh
21 changes: 21 additions & 0 deletions tools/startup-all-in-one.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
#
# Start file for all-in-one
set -eo pipefail

# Start up required services
redis-server &
etcd &

# Enter the virtual environment
. /environment/bin/activate
# Populat etcd
./etcd_init.sh

# Start up commissaire services
commissaire-storage-service &
commissaire-clusterexec-service &
commissaire-investigator-service &
commissaire-watcher-service &
commissaire-containermgr-service &
commissaire-server

0 comments on commit fc4df83

Please sign in to comment.