forked from kj89/cosmos_node_monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_monitoring.sh
56 lines (44 loc) · 2.32 KB
/
install_monitoring.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
#!/bin/bash
echo "=================================================="
echo -e "\033[0;35m"
echo " ::: ::: ::::::::::: :::: ::: :::::::: ::::::::: :::::::::: :::::::: ";
echo " :+: :+: :+: :+:+: :+: :+: :+: :+: :+: :+: :+: :+: ";
echo " +:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ ";
echo " +#++:++ +#+ +#+ +:+ +#+ +#+ +:+ +#+ +:+ +#++:++# +#++:++#++ ";
echo " +#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+ +#+ +#+ ";
echo " #+# #+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+# #+# #+# ";
echo " ### ### ##### ### #### ######## ######### ########## ######## ";
echo -e "\e[0m"
echo "=================================================="
sleep 2
echo -e "\e[1m\e[32m1. Updating dependencies... \e[0m" && sleep 1
sudo apt-get update
echo "=================================================="
echo -e "\e[1m\e[32m2. Installing required dependencies... \e[0m" && sleep 1
sudo apt install jq -y
sudo apt install python3-pip -y
sudo pip install yq
echo "=================================================="
echo -e "\e[1m\e[32m3. Checking if Docker is installed... \e[0m" && sleep 1
if ! command -v docker &> /dev/null
then
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
fi
echo "=================================================="
echo -e "\e[1m\e[32m5. Downloading Node Monitoring config files ... \e[0m" && sleep 1
cd $HOME
rm -rf cosmos_node_monitoring
git clone https://github.com/ODIN-PROTOCOL/cosmos_node_monitoring.git
chmod +x $HOME/cosmos_node_monitoring/add_validator.sh