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

Commit

Permalink
Merge pull request #27 from cooktheryan/master
Browse files Browse the repository at this point in the history
shrinks image by 150mb
  • Loading branch information
ashcrow committed Feb 11, 2016
2 parents b5d161b + 3d22c76 commit 0a9dc8f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
FROM fedora
MAINTAINER Red Hat, Inc. <container-tools@redhat.com>

RUN dnf -y update && dnf -y install --setopt=tsflags=nodocs rsync openssh-clients redhat-rpm-config python-pip python-virtualenv git gcc libffi-devel ; dnf clean all

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

# TODO: Pull a release?
RUN git clone https://github.com/projectatomic/commissaire.git && \
# Install required dependencies and commissaire
RUN dnf -y update && dnf -y install --setopt=tsflags=nodocs rsync openssh-clients redhat-rpm-config python-pip python-virtualenv git gcc libffi-devel ; dnf clean all && \
git clone https://github.com/projectatomic/commissaire.git && \
virtualenv /environment && \
. /environment/bin/activate && \
cd commissaire && \
pip install -U pip && \
pip install -r requirements.txt && \
pip freeze > /installed-python-deps.txt

# Clean up
RUN dnf remove -y gcc git redhat-rpm-config libffi-devel && dnf clean all
pip freeze > /installed-python-deps.txt && \
dnf remove -y gcc git redhat-rpm-config libffi-devel && dnf clean all

EXPOSE 8000
WORKDIR /commissaire
Expand Down
32 changes: 19 additions & 13 deletions doc/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@ From the repo root...
...
(virtualenv)$ python setup.py nosetests
Adding a Host Manually
~~~~~~~~~~~~~~~~~~~~~~

.. todo::

Remove this once container registration work is merged.

Verify that etcd is running then execute...

.. code-block:: shell
(virtualenv)$ etcdctl set /commissaire/hosts/10.0.0.1 '{"address": "10.0.0.1","status": "available","os": "atomic","cpus": 2,"memory": 11989228,"space": 487652,"last_check": "2015-12-17T15:48:18.710454","ssh_priv_key": "dGVzdAo=", "cluster": "default"}'
(Optional): Put Configs in Etcd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
commissaire will default back to the local files but using Etcd is where configuration should be stored.
Expand Down Expand Up @@ -95,3 +82,22 @@ To run the image specify the ETCD and KUBE variables pointing towards the specif
docker run -d -e ETCD=http://127.0.0.1:2379 -e KUBE=http://127.0.0.1:8080 commissaire
...
Adding a Cluster
~~~~~~~~~~~~~~~~
Verify that Commissaire is running as a container or in the virtual environment then execute...

.. code-block:: shell
curl -u "a:a" -XPUT -H "Content-Type: application/json" http://localhost:8000/api/v0/cluster/datacenter1
...
Adding a Host
~~~~~~~~~~~~~
Verify that Commissaire is running as a container or in the virtual environment then execute...

.. code-block:: shell
curl -u "a:a" -XPUT -H "Content-Type: application/json" http://localhost:8000/api/v0/host/192.168.1.100 -d '{"host": "192.168.1.100", "cluster": "datacenter1", "ssh_priv_key": "dGVzdAo="}'
...

0 comments on commit 0a9dc8f

Please sign in to comment.