Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Dockerfile and Entrypoint for containerization
- Loading branch information
Showing
3 changed files
with
60 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,17 @@ | ||
FROM centos:7 | ||
MAINTAINER Christian Eichelmann "christian@crapworks.de" | ||
|
||
ENV CEPH_VERSION jewel | ||
|
||
# Install Ceph | ||
RUN rpm --import 'https://download.ceph.com/keys/release.asc' | ||
RUN rpm -Uvh http://download.ceph.com/rpm-${CEPH_VERSION}/el7/noarch/ceph-release-1-1.el7.noarch.rpm | ||
RUN yum install -y epel-release && yum clean all | ||
RUN yum install -y ceph python27 python-pip && yum clean all | ||
|
||
COPY . /cephdash | ||
WORKDIR /cephdash | ||
RUN pip install -r requirements.txt | ||
|
||
ENTRYPOINT ["/cephdash/contrib/docker/entrypoint.sh"] | ||
CMD ["ceph-dash.py"] |
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
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,32 @@ | ||
#!/usr/bin/env sh | ||
|
||
CEPHCONFIG="/etc/ceph/ceph.conf" | ||
CEPHKEYRING="/etc/ceph/keyring" | ||
|
||
echo "# REQUIRED ENVIRONMENT VARIABLES" | ||
echo "* CEPHMONS (comma separated list of ceph monitor ip addresses)" | ||
echo "* KEYRING (full keyring to deploy in docker container)" | ||
echo "" | ||
echo "# OPTIONAL ENVIRONMENT VARIABLES" | ||
echo "* NAME (keyring name to use)" | ||
echo "* ID (keyting id to use)" | ||
echo "" | ||
|
||
echo "${KEYRING}" > ${CEPHKEYRING} | ||
echo -e "[global]\nmon host = ${CEPHMONS}" > ${CEPHCONFIG} | ||
|
||
echo "# CEPH STATUS" | ||
ceph -s | ||
|
||
export CEPHDASH_CEPHCONFIG="${CEPHCONFIG}" | ||
export CEPHDASH_KEYRING="${CEPHKEYRING}" | ||
|
||
if [ -n "${NAME}" ]; then | ||
export CEPHDASH_NAME="${NAME}" | ||
fi | ||
|
||
if [ -n "${ID}" ]; then | ||
export CEPHDASH_ID="${ID}" | ||
fi | ||
|
||
python $* |
eff852c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!! Thanks Christian! I'll test this as soon as I get a hold of a cluster and report back.