Skip to content

Commit

Permalink
Updated run script
Browse files Browse the repository at this point in the history
  • Loading branch information
victorzimmer committed Oct 23, 2024
1 parent 47ae7d4 commit 34eaca5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/run-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
echo "Deploying on node $nodename:$port"

BINARY_FILE="inf2300-a1-bin-x86_64-unknown-linux-gnu"
BINARY_FILE_URL="https://github.com/SeraMadeleine/INF3200-1B/releases/download/v0.4.0/inf2300-a1-bin-x86_64-unknown-linux-gnu"
BINARY_FILE_URL="https://github.com/SeraMadeleine/INF3200-2/releases/download/v0.5.0/inf2300-a1-bin-x86_64-unknown-linux-gnu"

if [ -f $BINARY_FILE ]; then
echo "Binary already present."
Expand Down
5 changes: 2 additions & 3 deletions src/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,10 @@ do

if [ $deployed_nodes_count -eq 0 ]
then
echo "Initializing network on first node."
curl -v -X "PUT" -H "Content-Type: application/json" --data "{\"network_id\": \"chord-network\"}" "http://$node:$port/network/initialize"
echo "Created first node."
else
echo "Joining node to previous node."
curl -v -X "PUT" -H "Content-Type: application/json" --data "{\"hostname\": \"$previous_node\", \"port\":$previous_port}" "http://$node:$port/network/join"
curl -v -X "POST" "http://$node:$port/join?nprime=$previous_node"
fi
deployed_nodes_count=$deployed_nodes_count+1
previous_node=$node
Expand Down

0 comments on commit 34eaca5

Please sign in to comment.