Skip to content

Commit 12ac3c1

Browse files
author
FallenGravity
committed
first commit
0 parents  commit 12ac3c1

File tree

10 files changed

+866
-0
lines changed

10 files changed

+866
-0
lines changed

.DS_Store

6 KB
Binary file not shown.

debian/install.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/usr/bin/env sh
2+
_user="$(id -u -n)"
3+
4+
echo '**************************'
5+
echo 'Installing misc dependencies'
6+
echo '**************************'
7+
# install dependencies
8+
sudo apt-get update && sudo apt-get install systemd unzip wget -y
9+
10+
echo '**************************'
11+
echo 'Installing Ether-1 Node binary'
12+
echo '**************************'
13+
# Download node binary
14+
sudo systemctl stop ether1node
15+
16+
sudo rm geth
17+
18+
wget https://files.ether1.org/releases/Ether1-MN-SN-0.0.9.1.tar.gz
19+
20+
tar -xzf Ether1-MN-SN-0.0.9.1.tar.gz
21+
22+
# Make node executable
23+
chmod +x geth
24+
25+
# Remove and cleanup
26+
rm Ether1-MN-SN-0.0.9.1.tar.gz
27+
28+
echo '**************************'
29+
echo 'Creating and setting up system service'
30+
echo '**************************'
31+
32+
cat > /tmp/ether1node.service << EOL
33+
[Unit]
34+
Description=Ether1 Masternode/Service Node
35+
After=network.target
36+
37+
[Service]
38+
39+
User=$_user
40+
Group=$_user
41+
42+
Type=simple
43+
Restart=always
44+
45+
ExecStart=/usr/sbin/geth --syncmode=fast --cache=512
46+
47+
[Install]
48+
WantedBy=default.target
49+
EOL
50+
sudo \mv /tmp/ether1node.service /etc/systemd/system
51+
sudo \rm /usr/sbin/geth
52+
sudo \mv geth /usr/sbin/
53+
sudo systemctl enable ether1node && systemctl stop ether1node && systemctl start ether1node
54+
systemctl status ether1node --no-pager --full
55+
56+
echo 'Done.'
57+

debian/setup.sh

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/usr/bin/env sh
2+
_user="$(id -u -n)"
3+
4+
echo '**************************'
5+
echo 'Installing misc dependencies'
6+
echo '**************************'
7+
# install dependencies
8+
sudo apt-get update && sudo apt-get install systemd unzip wget -y
9+
10+
echo '**************************'
11+
echo 'Installing Ether-1 Node binary'
12+
echo '**************************'
13+
# Download node binary
14+
15+
wget https://ether1.org/releases/Ether1-MN-SN-0.0.9.tar.gz
16+
17+
tar -xzf Ether1-MN-SN-0.0.9.tar.gz
18+
19+
# Make node executable
20+
chmod +x geth
21+
22+
# Remove and cleanup
23+
rm Ether1-MN-SN-0.0.9.tar.gz
24+
25+
echo '**************************'
26+
echo 'Creating and setting up system service'
27+
echo '**************************'
28+
29+
cat > /tmp/ether1node.service << EOL
30+
[Unit]
31+
Description=Ether1 Masternode/Service Node
32+
After=network.target
33+
34+
[Service]
35+
36+
User=$_user
37+
Group=$_user
38+
39+
Type=simple
40+
Restart=always
41+
42+
ExecStart=/usr/sbin/geth --syncmode=fast --cache=512
43+
44+
[Install]
45+
WantedBy=default.target
46+
EOL
47+
sudo \mv /tmp/ether1node.service /etc/systemd/system
48+
sudo \mv geth /usr/sbin/
49+
sudo systemctl enable ether1node && systemctl start ether1node
50+
systemctl status ether1node --no-pager --full
51+
52+
echo 'Done.'
53+

debian/setupETHOFS.sh

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
#!/usr/bin/env sh
2+
[ $SUDO_USER ] && _user=$SUDO_USER || _user=`whoami`
3+
_upgrade="No"
4+
_nodetype="masternode"
5+
6+
for opt in "$@"
7+
do
8+
if [ $opt = "-servicenode" ] ; then
9+
_nodetype="servicenode"
10+
elif [ $opt = "-masternode" ] ; then
11+
_nodetype="masternode"
12+
elif [ $opt = "-gatewaynode" ] ; then
13+
_nodetype="gatewaynode"
14+
elif [ $opt = "-upgrade" ] ; then
15+
_upgrade="Yes"
16+
else
17+
echo "Invalid option: $opt"
18+
fi
19+
done
20+
21+
if [ $_nodetype = "gatewaynode" ] ; then
22+
echo "ethoFS Gateway Node Setup Initiated"
23+
fi
24+
if [ $_nodetype = "masternode" ] ; then
25+
echo "Ether-1 Masternode Setup Initiated"
26+
fi
27+
if [ $_nodetype = "servicenode" ] ; then
28+
echo "Ether-1 Service Node Setup Initiated"
29+
fi
30+
if [ $_upgrade = "Yes" ] ; then
31+
echo "Upgrade Option Selected"
32+
fi
33+
34+
echo '**************************'
35+
echo 'Installing misc dependencies'
36+
echo '**************************'
37+
# install dependencies
38+
sudo apt-get update && sudo apt-get install systemd unzip wget build-essential -y
39+
40+
echo '**************************'
41+
echo 'Installing Ether-1 Node binary'
42+
echo '**************************'
43+
# Download node binary
44+
45+
wget https://files.ether1.org/releases/Ether1-MN-SN-0.0.9.1.tar.gz
46+
47+
tar -xzf Ether1-MN-SN-0.0.9.1.tar.gz
48+
49+
# Make node executable
50+
chmod +x geth
51+
52+
# Remove and cleanup
53+
rm Ether1-MN-SN-0.0.9.1.tar.gz
54+
55+
echo '**************************'
56+
echo 'Creating and setting up Masternode/Service Node system service'
57+
echo '**************************'
58+
59+
cat > /tmp/ether1node.service << EOL
60+
[Unit]
61+
Description=Ether1 Masternode/Service Node
62+
After=network.target
63+
64+
[Service]
65+
66+
User=$_user
67+
Group=$_user
68+
69+
Type=simple
70+
Restart=always
71+
72+
ExecStart=/usr/sbin/geth --syncmode=fast --cache=512 --datadir=$HOME/.ether1
73+
74+
[Install]
75+
WantedBy=default.target
76+
EOL
77+
sudo systemctl stop ether1node
78+
sudo \mv /tmp/ether1node.service /etc/systemd/system
79+
sudo \mv geth /usr/sbin/
80+
sudo systemctl daemon-reload
81+
sudo systemctl enable ether1node && systemctl start ether1node
82+
sudo systemctl restart ether1node
83+
sudo systemctl status ether1node --no-pager --full
84+
85+
echo '**************************'
86+
echo 'Masternode Setup Complete....Deploying IPFS'
87+
echo '**************************'
88+
89+
cd $HOME
90+
wget https://files.ether1.org/releases/ipfs.tar.gz
91+
tar -xzf ipfs.tar.gz
92+
chmod +x ipfs
93+
94+
# Remove and cleanup
95+
rm ipfs.tar.gz
96+
97+
echo '**************************'
98+
echo 'Creating and setting up IPFS system service'
99+
echo '**************************'
100+
101+
cat > /tmp/ipfs.service << EOL
102+
[Unit]
103+
Description=IPFS Node System Service
104+
After=network.target
105+
106+
[Service]
107+
User=$_user
108+
Group=$_user
109+
110+
Type=simple
111+
Restart=always
112+
113+
ExecStart=/usr/sbin/ipfs daemon --migrate --enable-namesys-pubsub --enable-gc
114+
115+
[Install]
116+
WantedBy=default.target
117+
EOL
118+
sudo systemctl stop ipfs
119+
sudo \mv /tmp/ipfs.service /etc/systemd/system
120+
sudo \mv ipfs /usr/sbin/
121+
if [ $_upgrade = "No" ] ; then
122+
sudo rm -r $HOME/.ipfs
123+
ipfs init
124+
fi
125+
ipfs bootstrap rm --all
126+
if [ $_nodetype = "gatewaynode" ] ; then
127+
_maxstorage="78GB"
128+
sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/ipfs
129+
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/80
130+
fi
131+
if [ $_nodetype = "masternode" ] ; then
132+
_maxstorage="38GB"
133+
fi
134+
if [ $_nodetype = "servicenode" ] ; then
135+
_maxstorage="18GB"
136+
fi
137+
ipfs config Datastore.StorageMax $_maxstorage
138+
ipfs config --json Swarm.ConnMgr.LowWater 400
139+
ipfs config --json Swarm.ConnMgr.HighWater 600
140+
ipfs bootstrap add /ip4/207.148.27.84/tcp/4001/ipfs/QmTFUcUuMSN7KLytjtqnHCjixqd4ig3PrSbdQ2mW9Q8qeY
141+
ipfs bootstrap add /ip4/66.42.109.75/tcp/4001/ipfs/QmV856mLWnTDaj5LQvS3dCa3qjz4DNC9cKQJNSrwtqcHzT
142+
ipfs bootstrap add /ip4/95.179.136.216/tcp/4001/ipfs/QmdFCa2ix51sV8FADGKDadKPGB55kdEQMZm9VKVSRTbVhC
143+
ipfs bootstrap add /ip4/45.63.116.102/tcp/4001/ipfs/QmSfEKCzPWA6MmG2ZLK4Vqnq6oB6rvrLyUpHdNqng5nQ4t
144+
ipfs bootstrap add /ip4/149.28.167.176/tcp/4001/ipfs/QmRwQ49Zknc2dQbywrhT8ArMDS9JdmnEyGGy4mZ1wDkgaX
145+
ipfs bootstrap add /ip4/140.82.54.221/tcp/4001/ipfs/QmeG81bELkgLBZFYZc53ioxtvRS8iNVzPqxUBKSuah2rcQ
146+
ipfs bootstrap add /ip4/45.77.170.137/tcp/4001/ipfs/QmTZsBNb7dfJJmwuAdXBjKZ7ZH6XbpestZdURWGJVyAmj2
147+
sudo chown -R $_user:$_user $HOME/.ipfs
148+
cat > /tmp/swarm.key << EOL
149+
/key/swarm/psk/1.0.0/
150+
/base16/
151+
38307a74b2176d0054ffa2864e31ee22d0fc6c3266dd856f6d41bddf14e2ad63
152+
EOL
153+
sudo \mv /tmp/swarm.key $HOME/.ipfs
154+
sudo systemctl daemon-reload
155+
sudo systemctl enable ipfs && systemctl start ipfs
156+
sudo systemctl restart ipfs
157+
sudo systemctl status ipfs --no-pager --full
158+
echo '**************************'
159+
echo 'IPFS Setup Complete....Deploying ethoFS'
160+
echo '**************************'
161+
cd $HOME
162+
wget https://files.ether1.org/releases/ethoFS.tar.gz
163+
tar -xzf ethoFS.tar.gz
164+
chmod +x ethoFS
165+
166+
# Remove and cleanup
167+
rm ethoFS.tar.gz
168+
169+
echo '**************************'
170+
echo 'Creating and setting up ethoFS system service'
171+
echo '**************************'
172+
173+
cat > /tmp/ethoFS.service << EOL
174+
[Unit]
175+
Description=ethoFS Node System Service
176+
After=network.target
177+
178+
[Service]
179+
User=$_user
180+
Group=$_user
181+
182+
Type=simple
183+
Restart=always
184+
185+
ExecStart=/usr/sbin/ethoFS -$_nodetype
186+
187+
[Install]
188+
WantedBy=default.target
189+
EOL
190+
sudo systemctl stop ethoFS
191+
sudo \mv /tmp/ethoFS.service /etc/systemd/system
192+
sudo \mv ethoFS /usr/sbin/
193+
sudo systemctl daemon-reload
194+
sudo systemctl enable ethoFS && systemctl start ethoFS
195+
sudo systemctl restart ethoFS
196+
sudo systemctl status ethoFS --no-pager --full
197+
echo '**************************'
198+
echo 'ethoFS Setup Complete'
199+
echo '**************************'

0 commit comments

Comments
 (0)