Last active
December 28, 2020 19:56
-
-
Save duccas/72750cfe3336a640dfc475ed9bb3bf76 to your computer and use it in GitHub Desktop.
First you need to specify key password. echo 'export CODA_PRIVKEY_PASS="YOUR PASS"' >> $HOME/.bashrc
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
#!/bin/bash | |
MINA_IMAGE=gcr.io/o1labs-192920/coda-daemon-baked:0.1.1-add-testworld-ledger-bbda99d-testworld-4af8f09 | |
curl -s https://gist.githubusercontent.com/icohigh/cb9eff63294a96bcb63a4590c1dc238c/raw/6d9bbfb563b97d6fb893793b9a12734af9f2b9f0/components.sh | bash | |
sleep 2 | |
wget http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb \ | |
&& sudo apt install ./libffi6_3.2.1-8_amd64.deb \ | |
&& wget https://repo.percona.com/apt/pool/main/j/jemalloc/libjemalloc1_3.6.0-2.focal_amd64.deb \ | |
&& sudo apt install ./libjemalloc1_3.6.0-2.focal_amd64.deb \ | |
&& wget http://archive.ubuntu.com/ubuntu/pool/main/p/procps/libprocps6_3.3.12-3ubuntu1_amd64.deb \ | |
&& sudo apt install ./libprocps6_3.3.12-3ubuntu1_amd64.deb | |
echo "" | |
echo "--------PACKAGES FOR UBUNTU 20.04 INSTALLED--------" | |
echo "" | |
sleep 2 | |
chmod 700 $HOME/keys \ | |
&& chmod 600 $HOME/keys/my-wallet \ | |
&& echo 'export KEYPATH=$HOME/keys/my-wallet' >> $HOME/.bashrc \ | |
&& echo 'export MINA_PUBLIC_KEY=$(cat $HOME/keys/my-wallet.pub)' >> $HOME/.bashrc \ | |
&& source ~/.bashrc \ | |
&& wget -O ~/peers.txt https://raw.githubusercontent.com/MinaProtocol/coda-automation/bug-bounty-net/terraform/testnets/testworld/peers.txt \ | |
&& sudo iptables -A INPUT -p tcp --dport 8302:8303 -j ACCEPT \ | |
&& iptables -I INPUT 1 -p tcp --sport 3085 -j DROP \ | |
&& mkdir .coda-config | |
echo "" | |
echo "--------KEYS AND FIREWALL ARE NOW SET--------" | |
echo "" | |
sleep 2 | |
sudo docker pull $MINA_IMAGE | |
echo "" | |
echo "--------DOCKER IMAGE DOWNLOADED--------" | |
echo "" | |
sleep 2 | |
sudo docker run --name mina -d \ | |
--restart always \ | |
-p 8301-8305:8301-8305 \ | |
-p 127.0.0.1:3085:3085 \ | |
-v $(pwd)/peers.txt:$HOME/peers.txt \ | |
-v $(pwd)/keys:$HOME/keys:ro \ | |
-v $(pwd)/.coda-config:$HOME/.coda-config \ | |
$MINA_IMAGE daemon \ | |
-peer-list-file $HOME/peers.txt \ | |
-block-producer-key $KEYPATH \ | |
-block-producer-password $CODA_PRIVKEY_PASS \ | |
-insecure-rest-server \ | |
-file-log-level Debug \ | |
-log-level Info | |
echo "" | |
echo "--------DOCKER STARTED--------" | |
echo "" | |
echo "--------NOW YOU CAN VIEW LOGS--------" | |
echo "--------Type "docker logs --follow mina -f" to view--------" | |
sleep 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment