-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kaijia Chen
committed
Aug 21, 2021
1 parent
685cf4d
commit 03e85fe
Showing
14 changed files
with
148 additions
and
46 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,5 @@ | ||
FROM rackspacedot/python38 | ||
COPY requirements.txt /tmp/ | ||
RUN pip install -r /tmp/requirements.txt | ||
COPY . /home/distributed_obj_storage_system | ||
WORKDIR /home/distributed_obj_storage_system |
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,19 @@ | ||
# python-simple-object-storage | ||
|
||
--- | ||
### Environment Installation | ||
pip install -r requirements.txt | ||
docker network create --subnet=172.32.0.0/16 obj | ||
|
||
--- | ||
### Simple object storage system | ||
python frontend.py --name 'obj01' --content 'helloworld' | ||
cat /tmp/objs/obj01 | ||
|
||
--- | ||
### distributed object storage system | ||
|
||
python frontend.py --type uo --name obj01 --version 1.7.3 --file /home/distributed\_obj\_storage\_system/distributed\_obj\_system/test | ||
python frontend.py --type do --name obj01 --version 1.7.3 | ||
python frontend.py --type ol --name obj01 --version 1.7.3 | ||
python frontend.py --type vl --name obj01 |
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
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,12 @@ | ||
# start data service | ||
for v in 100 101 102 103 104 105 106 | ||
do | ||
docker run -d --name "data$v" --net=obj --ip "172.32.1.$v" -v $(cd "$(dirname "$0")"; pwd)../../../:/home/distributed_obj_storage_system objsystem:latest python distributed_obj_system/backend/data/run.py | ||
done | ||
|
||
for v in 50 | ||
do | ||
docker run -d --name "api$v" --net=obj --ip "172.32.1.$v" -v $(cd "$(dirname "$0")"; pwd)../../../:/home/distributed_obj_storage_system objsystem:latest python distributed_obj_system/backend/api/run.py | ||
done | ||
|
||
docker run -dt --name frontend --net=obj -v $(cd "$(dirname "$0")"; pwd)../../../:/home/distributed_obj_storage_system -w /home/distributed_obj_storage_system/distributed_obj_system objsystem:latest |
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 |
---|---|---|
|
@@ -9,3 +9,4 @@ do | |
docker rm "api$v" -f | ||
done | ||
|
||
docker rm frontend -f |
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,2 @@ | ||
docker run --name kafka --net=obj --ip 172.32.1.10 -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=172.32.1.10 --env ADVERTISED_PORT=9092 -d spotify/kafka | ||
docker run --name redis --net=obj --ip 172.32.1.11 -d redis |
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,2 @@ | ||
docker rm kafka -f | ||
docker rm redis -f |
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 was deleted.
Oops, something went wrong.
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
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