Skip to content

Commit

Permalink
docker: add Ceph-Dashboard support
Browse files Browse the repository at this point in the history
Signed-off-by: Ernesto Puerta <[email protected]>
  • Loading branch information
epuertat committed Jan 12, 2024
1 parent 4300218 commit 9c5c5f5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
24 changes: 22 additions & 2 deletions Dockerfile.ceph
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# syntax = docker/dockerfile:1.4
# vim: syntax=dockerfile
FROM quay.io/centos/centos:stream9-minimal AS build

ARG CEPH_CLUSTER_VERSION
Expand Down Expand Up @@ -27,11 +28,22 @@ ARG CEPH_PACKAGES="\
ceph-osd \
ceph-mds \
ceph-mgr \
ceph-mgr-dashboard \
ceph-radosgw \
ceph-exporter \
hostname \
jq \
net-tools \
iproute \
"
ARG EXTRA_PACKAGES="\
python3-grpcio \
"
ARG DEBUG_PACKAGES="\
procps-ng \
strace \
perf \
ltrace \
"

RUN rpm -vih https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
Expand All @@ -47,7 +59,9 @@ RUN \
--setopt=install_weak_deps=0 \
--setopt=keepcache=1 \
--setopt=cachedir=/var/cache/microdnf \
$CEPH_PACKAGES
$CEPH_PACKAGES \
$EXTRA_PACKAGES \
$DEBUG_PACKAGES

#------------------------------------------------------------------------------
FROM build
Expand All @@ -67,7 +81,7 @@ ENV MON=1 \
RGW=0 \
NFS=0 \
CEPH_PORT=10000 \
CEPH_VSTART_ARGS="--without-dashboard"
CEPH_VSTART_ARGS="--memstore"

ENV CEPH_BIN=/usr/bin \
CEPH_LIB=/usr/lib64/ceph \
Expand All @@ -88,6 +102,12 @@ USER ceph
WORKDIR /ceph
ADD --chown=ceph:ceph --chmod=755 https://raw.githubusercontent.com/ceph/ceph/v$CEPH_CLUSTER_VERSION/src/vstart.sh .

COPY <<EOF ./CMakeCache.txt
ceph_SOURCE_DIR:STATIC=/ceph
WITH_MGR_DASHBOARD_FRONTEND:BOOL=ON
WITH_RBD:BOOL=ON
EOF

ENTRYPOINT \
./vstart.sh --new $CEPH_VSTART_ARGS && \
sleep infinity
3 changes: 1 addition & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ services:
labels:
io.ceph.nvmeof:
environment:
CEPH_VSTART_ARGS:
VSTART_ARGS: --without-dashboard --memstore
VSTART_ARGS: --memstore
TOUCHFILE: /tmp/ceph.touch
entrypoint: >-
sh -c './vstart.sh --new $$VSTART_ARGS &&
Expand Down

0 comments on commit 9c5c5f5

Please sign in to comment.