Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Commelina committed Aug 22, 2024
1 parent 669205c commit dd07937
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
6 changes: 5 additions & 1 deletion docker/base-hornbill/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG HORNBILL_IMAGE="hstreamdb/hornbill:latest"
ARG HORNBILL_IMAGE="ghcr.io/hstreamdb/hornbill:latest"
FROM ${HORNBILL_IMAGE}

ENV DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -61,6 +61,10 @@ RUN apt-get -qy --no-install-recommends install \
# Config SSH for Jepsen connection
COPY ./init-ssh.sh /usr/local/bin/init-ssh

# Install FoundationDB cli tool
COPY --from=foundationdb/foundationdb:7.3.43 /usr/bin/fdbcli /usr/bin/fdbcli
RUN chmod +x /usr/bin/fdbcli

EXPOSE 22

RUN chmod +x /usr/local/bin/init-ssh
12 changes: 7 additions & 5 deletions docker/fdb-hornbill/start.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FDB_CLUSTER_FILE="/etc/foundationdb/fdb.cluster"
FDB_PORT=4500
FDB_NETWORKING_MODE="container"
fdbcli="/usr/bin/fdbcli"
export FDB_CLUSTER_FILE="/etc/foundationdb/fdb.cluster"
export FDB_PORT=4500
export FDB_NETWORKING_MODE="container"
export fdbcli="/usr/bin/fdbcli"

## start fdb server
/var/fdb/scripts/fdb.bash >> /tmp/$HOSTNAME.log 2>&1 &
/var/fdb/scripts/fdb.bash >>/tmp/$HOSTNAME.log 2>&1 &

## wait & configure
# wait for fdb.cluster file
while [ ! -f $FDB_CLUSTER_FILE ]; do sleep 0.1; done
# Attempt to connect. Configure the database if necessary.
if ! $fdbcli -C $FDB_CLUSTER_FILE --exec status --timeout 1 ; then
config="configure new single ssd; status"
Expand Down
5 changes: 5 additions & 0 deletions docker/meta-hornbill/start-meta.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
echo "docker:docker@fdb:4500" > /etc/fdb.cluster

while ! fdbcli -C /etc/fdb.cluster --exec "tenant get hstream" --timeout 1 ; do
sleep 1;
done

/usr/local/bin/hstream-meta-server --host 0.0.0.0 \
--port 8964 \
--log-level trace \
Expand Down
4 changes: 4 additions & 0 deletions docker/node-hornbill/start-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

echo "docker:docker@fdb:4500" > /etc/fdb.cluster

while ! fdbcli -C /etc/fdb.cluster --exec "tenant get hstream" --timeout 1 ; do
sleep 1;
done

SERVER_ID=$(echo $(hostname) | cut -c 2-) # n_i -> i
MY_IP=$(hostname -I | head -n1 | awk '{print $1;}')
/usr/local/bin/hstream-server \
Expand Down

0 comments on commit dd07937

Please sign in to comment.