Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Tools to deploy a Polkadot/Kusama validator node.

License

NotificationsYou must be signed in to change notification settings

Nexus2k/polkadot-ansible

Repository files navigation

Ansible scripts to deploy up to two Docker based polkadot validator nodes. No need for compiling and complicated dependency management :)

Please Nominate or Tip Me!

Getting started

Prerequisits:

  • VPS or dedicated server meeting the Polkadot/Kusama requirements (you might want to have a beefier machine as we're going to run two validators on one machine)
  • ansible (2.11.6+)
  • ansible-playbook (2.11.6+)

First copy thehosts.ini-sample tohosts.ini then:

  1. Rename the twomy_node_* entries to a name you like, also replace the<IP of your server> with the actual IP of your server
  2. Copy/Renamehost_vars/my_node_*.yml files to the same name you just called the host in thehosts.ini file.
  3. Update the values in thehost_vars/my_node_*.yml files, you always want to:
  4. Update thenode_name this is the node name your validator will show up with in the Telemetry dashboards
  5. Update thepolkadot_db_snapshot_url andpolkadot_db_snapshot_checksum with the latest values fromhttps://polkashots.io/
  6. Update yourstash_addr with your stash address. (If you don't know what a stash address is you probably don't want to run your own validator!)
  7. Place an exportedwallet.json andpassword file inroles/polkadot-claimer/files adding a -kusama or -polkadot suffix to the file name.

Deployment

If you feel adventerous you can deploy the whole server using:

$ ansible-playbook -i hosts.ini all.yml

This will execute the following roles:

  • polkadot-setup
    • Setup Docker
    • Setup Journald
    • Setup motd (message of the day)
  • polkadot-restore-db
    • Downloads the in the host_vars defined snapshot and unpacks it to the futuredb_path
  • polkadot-validator
    • Starts the polkadot/kusama validators as docker containers
  • polkadot-claimer
    • Copies the wallet.json & password files to the server
    • Setups a cronjob which executes a docker container that claims the staking rewards
  • polkadot-rotate-keys
    • Rotates the session keys so you can use for theSetSessionKeys extrinsic
  • watchtower (not run automatically, run usingansible-playbook -i hosts.ini setup_watchtower.yml)
    • Sets up a watchtower container which monitors upstream container image repositories for new releases and upgrades automatically.

You can also run the individual roles using thesetup_*.yml playbooks instead ofall.yml.

Polkadot upgrades

To upgrade to the latest Polkadot version you can simply restart the containers using thepolkadot-validator playbook.

Notes

Monitoring is not yet covered in these ansible playbooks. Do NOT run a Polkadot/Kusama validator w/o proper monitoring or you will get slashed.

You should not useroot user on the server, instead replace theansible_user field inhosts.ini with an unpriviledged user (which has docker rights).

About

Tools to deploy a Polkadot/Kusama validator node.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp