Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:7.0.0
FROM node:20-buster
MAINTAINER Mingyang Wang <miw092@eng.uced.edu>

# Install necessary dependencies and tools
Expand Down
24 changes: 24 additions & 0 deletions load_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Using default shell; no shebang

# Check if brew is installed
brew=$(which -s brew)
echo "$brew"
if [ -z "$brew" ]; then
echo "Please install Brew First"
exit 1
fi

# brew update && brew install vegeta


echo 'GET http://localhost:80/photo/97b72fb0-a84a-11e6-bf37-6d2c86545d91' | \
vegeta attack --rate=300 -duration 5m | vegeta encode | \
jaggr @count=rps \
hist\[100,200,300,400,500\]:code \
p25,p50,p95:latency \
sum:bytes_in \
sum:bytes_out | \
jplot rps+code.hist.100+code.hist.200+code.hist.300+code.hist.400+code.hist.500 \
latency.p95+latency.p50+latency.p25 \
bytes_in.sum+bytes_out.sum

2 changes: 1 addition & 1 deletion proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:1.11.5
FROM nginx:bullseye
MAINTAINER Mingyang Wang <miw092@eng.uced.edu>

# override default configuration
Expand Down
10 changes: 8 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,21 @@ echo "Start running Haystack prototype"
echo "-----------------------------------------------------------"

# Create a bridge network for the components
echo "<Creating bridge network>"
docker network create \
--driver bridge \
--subnet $SUBNET \
--gateway $GATEWAY \
$NETWORK


# Create a data volumn container to simulate Distributed File System
# Create a data volume container to simulate Distributed File System
# docker run -d --name $DATA_CONTAINER $DATA_IMAGE

# Create the Cache server container
# Currently use a Docker data volume to simulate Distributed File System
# indicated by flag '-v'
echo "<Creating a Cache server container>"
docker run -itd \
--name $CACHE_CONTAINER \
--network $NETWORK \
Expand All @@ -103,6 +105,7 @@ docker run -itd \


# Create the Directory server container
echo "<Creating Directory Server>"
docker run -itd \
--name $DIRECTORY_CONTAINER \
--network $NETWORK \
Expand All @@ -113,10 +116,10 @@ docker run -itd \
# Create a tiny table
sleep 30 # wait for Cassandra initialization
docker exec -d $DIRECTORY_CONTAINER cqlsh -f /root/init_table.txt

sleep 30 # wait for Cassandra table creation

# Create the web front server container
echo "<Creating Web Front Server>"
docker run -itd \
--name $WEBFRONT_CONTAINER \
--network $NETWORK \
Expand All @@ -125,6 +128,7 @@ docker run -itd \


# Create the proxy container
echo "<Creating a Nginx Reverse Proxy in front of Web Front Server>"
docker run -itd \
--name $PROXY_CONTAINER \
--network $NETWORK \
Expand All @@ -133,13 +137,15 @@ docker run -itd \
$PROXY_IMAGE

# Create the storage container
echo "<Creating Storage Container Number 1>"
docker run -itd \
--name $STORAGE_CONTAINER1 \
--network $NETWORK \
--ip $STORAGE_IP1 \
-p $STORAGE_SERVER_PORT1:$STORAGE_INTERNAL_PORT \
$STORAGE_IMAGE

echo "<Creating Storage Container Number 2>"
docker run -itd \
--name $STORAGE_CONTAINER2 \
--network $NETWORK \
Expand Down
7 changes: 5 additions & 2 deletions storage/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
FROM node:7.0.0
FROM node:20-buster
MAINTAINER Kun Huang <kuh004@ucsd.edu>, Junbo Ke <juke@ucsd.edu>

# Install necessary dependencies and tools
RUN apt-get update && apt-get install -y redis-server
RUN npm install filepointer


# Create app directory
RUN mkdir -p /root/app
WORKDIR /root/app

# This should be after setting up WORKDIR
RUN npm install filepointer

# Install app dependences
COPY package.json /root/app
RUN npm install
Expand Down
2 changes: 1 addition & 1 deletion webfront/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:7.0.0
FROM node:20-buster
MAINTAINER Mingyang Wang <miw092@eng.uced.edu>

# Install necessary dependencies and tools
Expand Down
3 changes: 1 addition & 2 deletions webfront/start_service.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/usr/bin/redis-server &
node server.js
/usr/bin/redis-server & node server.js