Skip to content

Commit

Permalink
Minor fixes to the Dockerfile, Entrypoint and Readme (apache#157)
Browse files Browse the repository at this point in the history
* Minor fixes to the Dockerfile, Entrypoint and Readme

* Update README.md

---------

Co-authored-by: gopuman <[email protected]>
  • Loading branch information
2 people authored and Gabe Bai committed Oct 3, 2024
1 parent 9a2b697 commit c82d5c7
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
deps/*/
scripts/deploy/config/key.conf
scripts/deploy/config_out/
deploy/kv_server/output/
.idea/
Expand Down
2 changes: 1 addition & 1 deletion Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel
&& mv bazel.gpg /etc/apt/trusted.gpg.d/ \
&& echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \
&& curl https://bazel.build/bazel-release.pub.gpg | apt-key add - \
&& apt-get update && apt-get install -y bazel=5.0.0 \
&& apt-get update && apt-get install -y bazel=6.0.0 \
&& rm /etc/apt/sources.list.d/bazel.list

# Set the working directory
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,4 +356,11 @@ We also provide access to a [deployment script](https://github.com/resilientdb/r
docker exec -it myserver bash
```

5. **NOTE: If you encounter a Connection Refused error**

Run the following command within the container:
```shell
./service/tools/kv/server_tools/start_kv_service.sh
```

Verify the functionality of the service by performing set and get operations provided above [functions](README.md#functions).
2 changes: 2 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand Down
10 changes: 5 additions & 5 deletions scripts/deploy/config/kv_server.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
iplist=(
172.31.57.186
172.31.57.186
172.31.57.186
172.31.57.186
172.31.57.186
128.105.145.52
128.105.145.56
128.105.145.48
128.105.145.43
128.105.145.52
)

10 changes: 5 additions & 5 deletions scripts/deploy/script/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ deploy/script/generate_key.sh ${BAZEL_WORKSPACE_PATH} ${output_key_path} ${#ipli
deploy/script/generate_config.sh ${BAZEL_WORKSPACE_PATH} ${output_key_path} ${output_cert_path} ${output_path} ${admin_key_path} ${deploy_iplist[@]}

# build kv server
bazel build ${server}
bazel build ${server} --copt=-Wno-implicit-function-declaration

if [ $? != 0 ]
then
Expand All @@ -83,7 +83,7 @@ function run_cmd(){
idx=1
for ip in ${deploy_iplist[@]};
do
ssh -i ${key} -n -o BatchMode=yes -o StrictHostKeyChecking=no ubuntu@${ip} "cd ${main_folder}/$idx; $1" &
ssh -i ${key} -n -o BatchMode=yes -o StrictHostKeyChecking=no gabbai@${ip} "cd ${main_folder}/$idx; $1" &
((count++))
((idx++))
done
Expand All @@ -95,7 +95,7 @@ function run_cmd(){
}

function run_one_cmd(){
ssh -i ${key} -n -o BatchMode=yes -o StrictHostKeyChecking=no ubuntu@${ip} "$1"
ssh -i ${key} -n -o BatchMode=yes -o StrictHostKeyChecking=no gabbai@${ip} "$1"
}

idx=1
Expand All @@ -118,7 +118,7 @@ idx=1
count=0
for ip in ${deploy_iplist[@]};
do
scp -i ${key} -r ${bin_path} ${output_path}/server.config ${output_path}/cert ubuntu@${ip}:/home/ubuntu/${main_folder}/$idx &
scp -i ${key} -r ${bin_path} ${output_path}/server.config ${output_path}/cert gabbai@${ip}:/users/gabbai/${main_folder}/$idx &
((count++))
((idx++))
done
Expand Down Expand Up @@ -154,7 +154,7 @@ do
resp=""
while [ "$resp" = "" ]
do
resp=`ssh -i ${key} -n -o BatchMode=yes -o StrictHostKeyChecking=no ubuntu@${ip} "cd ${main_folder}/$idx; grep \"receive public size:${#iplist[@]}\" ${server_bin}.log"`
resp=`ssh -i ${key} -n -o BatchMode=yes -o StrictHostKeyChecking=no gabbai@${ip} "cd ${main_folder}/$idx; grep \"receive public size:${#iplist[@]}\" ${server_bin}.log"`
if [ "$resp" = "" ]; then
sleep 1
fi
Expand Down

0 comments on commit c82d5c7

Please sign in to comment.