This repository has been archived by the owner on Feb 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
container: Added Dockerfile and startup-all-in-one.sh
To build: docker build -t commissaire . To run: docker run -p 8000:8000 -d --name commissaire commissaire
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |