Created
October 29, 2021 15:22
-
-
Save bloqhub/77692d4acc0bd60c69146e57828986ba to your computer and use it in GitHub Desktop.
Stargaze cosmovisor - Ru
This file contains hidden or 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
0. Необходимо обновить ноду согласно офциаильной документаии до версии 1.0.0 и обязательно обновить pre-genesis. | |
Документация: | |
https://github.com/public-awesome/mainnet/tree/main/stargaze-1 | |
1.Установка космовизор | |
cd ~ | |
git clone https://github.com/cosmos/cosmos-sdk | |
cd cosmos-sdk | |
git checkout v0.42.7 | |
make cosmovisor | |
cp cosmovisor/cosmovisor /usr/local/bin/cosmovisor | |
cd $HOME | |
2. Создать требуемые директории | |
mkdir -p ~/.starsd/cosmovisor | |
mkdir -p ~/.starsd/cosmovisor/genesis | |
mkdir -p ~/.starsd/cosmovisor/genesis/bin | |
mkdir -p ~/.starsd/cosmovisor/upgrades | |
3. Настроить параметры среды | |
echo "# Setup stargaze Cosmovisor" >> ~/.profile | |
echo "export DAEMON_NAME=starsd" >> ~/.profile | |
echo "export DAEMON_HOME=$HOME/.starsd" >> ~/.profile | |
echo "export DAEMON_RESTART_AFTER_UPGRADE=true" >> ~/.profile | |
source ~/.profile | |
4. Скопировать бинарный файл starsd в директорию супервизора | |
cp $GOPATH/bin/starsd ~/.starsd/cosmovisor/genesis/bin/ | |
5. Создание сервиса | |
sudo tee /etc/systemd/system/stargaze.service > /dev/null <<EOF | |
[Unit] | |
Description=Stargaze cosmovisor Daemon | |
After=network-online.target | |
[Service] | |
User=$USER | |
ExecStart=cosmovisor start | |
Restart=always | |
RestartSec=3 | |
LimitNOFILE=65535 | |
Environment="DAEMON_HOME=$HOME/.starsd" | |
Environment="DAEMON_NAME=starsd" | |
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true" | |
Environment="DAEMON_RESTART_AFTER_UPGRADE=true" | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
6. Запуск сервиса | |
sudo systemctl daemon-reload | |
sudo systemctl enable stargaze | |
sudo systemctl start stargaze | |
7. Просмотр логов и состояния ноды | |
journalctl -u stargaze -f | |
8. Получить p2p адрес ноды | |
echo $(starsd tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.starsd/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//') | |
9. Опубликовать адрес ноды | |
https://hackmd.io/GRsY7WQVTVmIAjwznaKAMg?both | |
Настоятельно советуе запускать деоны не из под root. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment