Files
hpcore/test/vm-cluster/setup-hp.sh
Ravidu Lashan 1238e96423 State synchronization logic (#67)
* Added flat buffer state message request

* Added state vote

* Added state to ledger history and did necessary changes

* Completed receiveing state request

* State read/write helpers.

* Added new fbs schema

* Added more state_store helper methods.

* Started processing response

* Fixed compile errors

* Added get file length.

* Handled state content response

* Statefs code cleanup and fixes.

* Completed response handling

* Completed changes in handling state response

* State sync integration fixes.

* Fuse mount waiting logic.

* Fixed state syncing issues

* state sync fixes

* fixes

* State sync fixes.

* Fixed fs entries retrieval issues.

* changed desync logic

* Added directory helper functions.

* Handled return statemetns from statefs

* Fixed state folder deletion.

* handled errors from statefs

* Working for small files

* Got state sync working.

* Removed cout.

* Fixed catering for stae issue

* Fixed block hash map flatbuf issue.

* Added expected hash

* Added helpers for expected hash comparison.

* Improved state req/resp awaiting logic.

* Fixes.

* Fixes.

* Block request ordering fix.

* Removed couts

* Closed non-closed file descriptors

* Minor fixes.

* Cluster create script changes.

* Fixed reset time off issue.
2019-12-13 10:20:41 +05:30

45 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
if [ -x "$(command -v node)" ]; then
echo "NodeJs already installed."
else
echo "Installing NodeJs..."
sudo apt-get update
sudo apt-get -y install curl
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs
fi
# if [ -x "$(command -v fusermount3)" ]; then
# echo "FUSE already installed."
# else
echo "Installing FUSE..."
sudo cp ./libfuse3.so.3 /usr/local/lib/
sudo ldconfig
sudo cp ./fusermount3 /usr/local/bin/
# fi
sudo rm -r ~/contract > /dev/null 2>&1
./hpcore new ./contract
pushd ./contract/cfg > /dev/null 2>&1
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout tlskey.pem -out tlscert.pem \
-subj "/C=AU/ST=ST/L=L/O=O/OU=OU/CN=localhost/emailAddress=hp@example" > /dev/null 2>&1
popd > /dev/null 2>&1
sudo mkdir -p ./contract/statehist/0
sudo mkdir -p ./contract/statehist/0/data
FILE=fuse-3.8.0.tar.xz
FILE2=fuse-3.8.0
if [ -f "$FILE" ]; then
if [ -f "$FILE2" ]; then
sudo cp -r ./fuse-3.8.0 ~/contract/statehist/0/data
else
sudo tar -xf fuse-3.8.0.tar.xz -C ~/contract/statehist/0/data
fi
else
sudo wget https://github.com/libfuse/libfuse/releases/download/fuse-3.8.0/fuse-3.8.0.tar.xz -
sudo tar -xf fuse-3.8.0.tar.xz -C ~/contract/statehist/0/data
fi