Skip to content

Commit

Permalink
rm cert
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcchen committed Oct 7, 2024
1 parent c4fffcd commit ab6dfd5
Show file tree
Hide file tree
Showing 43 changed files with 59 additions and 109 deletions.
2 changes: 1 addition & 1 deletion scripts/deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ Before running, place the private IP addresses of your machines in the file ``co

Run the script:

./performance/run_performance.sh config/kv_performance_server.conf
./performance/pbft_performance.sh config/kv_performance_server.conf

Results will be saved locally and be shown on the screen as well.
10 changes: 5 additions & 5 deletions scripts/deploy/config/kv_performance_server.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
iplist=(
172.31.41.205
172.31.43.69
172.31.41.203
172.31.41.181
172.31.42.42
172.31.25.4
172.31.27.205
172.31.27.141
172.31.20.222
172.31.28.162
)

client_num=1
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
172.31.25.4
172.31.27.205
172.31.27.141
172.31.20.222
172.31.28.162
)

2 changes: 1 addition & 1 deletion scripts/deploy/data/cert/admin.key.pri
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

ë|q¸‰àõuw™q&‹07®!6f°áùa's˜»|ñ
4B790BCC48862950DA85216F3F1335CB
2 changes: 1 addition & 1 deletion scripts/deploy/data/cert/admin.key.pub
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

u>��,����Nb+R�m����.�dQ|;V;݅ 
4B790BCC48862950DA85216F3F1335CB
Binary file removed scripts/deploy/data/cert/cert_1.cert
Binary file not shown.
7 changes: 0 additions & 7 deletions scripts/deploy/data/cert/cert_2.cert

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/deploy/data/cert/cert_3.cert

This file was deleted.

6 changes: 0 additions & 6 deletions scripts/deploy/data/cert/cert_4.cert

This file was deleted.

8 changes: 0 additions & 8 deletions scripts/deploy/data/cert/cert_5.cert

This file was deleted.

Binary file removed scripts/deploy/data/cert/cert_6.cert
Binary file not shown.
6 changes: 0 additions & 6 deletions scripts/deploy/data/cert/cert_7.cert

This file was deleted.

Binary file removed scripts/deploy/data/cert/cert_8.cert
Binary file not shown.
7 changes: 0 additions & 7 deletions scripts/deploy/data/cert/cert_9.cert

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node1.key.pri

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/deploy/data/cert/node1.key.pub

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node2.key.pri

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node2.key.pub

This file was deleted.

Binary file removed scripts/deploy/data/cert/node3.key.pri
Binary file not shown.
3 changes: 0 additions & 3 deletions scripts/deploy/data/cert/node3.key.pub

This file was deleted.

Binary file removed scripts/deploy/data/cert/node4.key.pri
Binary file not shown.
2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node4.key.pub

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node5.key.pri

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/deploy/data/cert/node5.key.pub

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node6.key.key.pri

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node6.key.key.pub

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node6.key.pri

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node6.key.pub

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node7.key.key.pri

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node7.key.key.pub

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node7.key.pri

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node7.key.pub

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node8.key.key.pri

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node8.key.key.pub

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node8.key.pri

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node8.key.pub

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node9.key.key.pri

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node9.key.key.pub

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node9.key.pri

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/deploy/data/cert/node9.key.pub

This file was deleted.

1 change: 1 addition & 0 deletions scripts/deploy/performance/pbft_performance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@

export server=//benchmark/protocols/pbft:kv_server_performance
#export TEMPLATE_PATH=$PWD/config/pbft.config
export performance=true

./performance/run_performance.sh $*
19 changes: 15 additions & 4 deletions scripts/deploy/script/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ echo "deploy to :"${deploy_iplist[@]}
cd ${script_path}
echo "where am i:"$PWD

deploy/script/generate_admin_key.sh ${BAZEL_WORKSPACE_PATH} ${admin_key_path}
deploy/script/generate_key.sh ${BAZEL_WORKSPACE_PATH} ${output_key_path} ${#iplist[@]}
deploy/script/generate_config.sh ${BAZEL_WORKSPACE_PATH} ${output_key_path} ${output_cert_path} ${output_path} ${admin_key_path} ${deploy_iplist[@]}

Expand All @@ -79,6 +80,7 @@ fi

# commands functions
function run_cmd(){
echo "run cmd:"$1
count=1
idx=1
for ip in ${deploy_iplist[@]};
Expand All @@ -95,27 +97,36 @@ function run_cmd(){
}

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

run_cmd "killall -9 ${server_bin}"
#run_cmd "rm -rf ${server_bin}; rm ${server_bin}*.log; rm -rf server.config; rm -rf cert;"
if [ $performance ];
then
run_cmd "rm -rf /home/ubuntu/${main_folder}"
fi

idx=1
for ip in ${deploy_iplist[@]};
do
run_one_cmd "mkdir -p ${main_folder}/$idx" &
run_one_cmd "mkdir -p /home/ubuntu/${main_folder}/$idx" &
folder="/home/ubuntu/${main_folder}/$idx"
run_one_cmd "rm -rf ${folder}/${server_bin}; rm ${folder}/${server_bin}*.log; rm -rf ${folder}/server.config; rm -rf ${folder}/cert;"
((count++))
((idx++))
done

while [ $count -gt 0 ]; do
wait $pids
count=`expr $count - 1`
done


#run_cmd "killall -9 ${server_bin}"
#run_cmd "rm -rf ${server_bin}; rm ${server_bin}*.log; rm -rf server.config; rm -rf cert;"
#run_cmd "rm -rf ${main_folder};"

sleep 1

# upload config files and binary
echo "upload configs"
idx=1
Expand Down
30 changes: 30 additions & 0 deletions scripts/deploy/script/generate_admin_key.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
bazel_path=$1; shift
output_path=$1; shift
key_num=$1

echo "generate key in:"${output_path}
echo "key num:"$key_num

bazel build //tools:key_generator_tools
rm -rf ${output_path}
mkdir -p ${output_path}

echo `${bazel_path}/bazel-bin/tools/key_generator_tools "${output_path}/admin" "AES"`

0 comments on commit ab6dfd5

Please sign in to comment.