Last active
August 26, 2024 15:58
-
-
Save JeffersonQin/8fc945200e8393dd587ed129e7fc5a0a to your computer and use it in GitHub Desktop.
Deploy AdaBFT
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
# exit on failure | |
set -e | |
# install jdk | |
wget https://download.oracle.com/java/20/archive/jdk-20.0.2_linux-x64_bin.tar.gz | |
tar -xvf jdk-20.0.2_linux-x64_bin.tar.gz | |
sudo mv jdk-20.0.2 /opt/ | |
JAVA_HOME='/opt/jdk-20.0.2' | |
PATH="$JAVA_HOME/bin:$PATH" | |
export PATH | |
# install maven | |
wget https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz | |
tar -xvf apache-maven-3.6.3-bin.tar.gz | |
sudo mv apache-maven-3.6.3 /opt/ | |
M2_HOME='/opt/apache-maven-3.6.3' | |
PATH="$M2_HOME/bin:$PATH" | |
export PATH | |
# update path in .bashrc | |
echo "export JAVA_HOME='/opt/jdk-20.0.2' | |
export M2_HOME='/opt/apache-maven-3.6.3' | |
export PATH=\"\$M2_HOME/bin:\$JAVA_HOME/bin:\$PATH\"" | cat - .bashrc > .bashrc_temp && mv .bashrc_temp .bashrc | |
# clone repo | |
export GITHUB_USER=JeffersonQin | |
export GITHUB_REPOSITORY=JeffersonQin/AdaBFT | |
git clone https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} | |
# install pip3 and dependencies | |
sudo apt-get update && sudo apt-get install -y python3-pip | |
pip3 install -r ./AdaBFT/scripts/requirements.txt | |
# compile | |
cd AdaBFT/code | |
mvn package | |
mvn dependency:copy-dependencies | |
# exit | |
echo "AdaBFT deployment success" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment