-
Notifications
You must be signed in to change notification settings - Fork 2
/
Setup.sh
65 lines (37 loc) · 1.41 KB
/
Setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
function configureXinFinNode(){
read -p "Please enter your XinFin MasterNode Name :- " MasterNodeName
echo "Your Masternode Name is ${MasterNodeName}"
echo "Installing Git "
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
git \
software-properties-common -y
echo "Clone Xinfin Node"
git clone -b cloud https://github.com/xinfinorg/XinFin-Node && cd XinFin-Node
sed -i "s/INSTANCE_NAME=XF_MasterNode/INSTANCE_NAME=${MasterNodeName}_XF/g" .env
echo "Installing Docker"
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce -y
echo "Installing Docker-Compose"
curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
sleep 5
echo "Docker Compose Installed successfully"
sudo docker-compose -f docker-services.yml up -d
}
function init(){
configureXinFinNode
}
function main(){
init
}
main