Skip to main content

Node Upgrade

In this section, we will learn how to upgrade the AvalancheGo version on many nodes simultaneously with a single command.

note

For this tutorial, we will use the local inventory provided by the Ansible Avalanche Getting Started repository. See Create a Local Test Network for details.

tip

Always make sure you have the latest version of the collection installed. See Installation and upgrade.

Check the current AvalancheGo version​

Let's start by checking the current version of my node(s) with the Ash CLI:

Command
multipass exec validator01 -- ash avalanche node info
Output
Node '127.0.0.1:9650':
ID: NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg
Network: local
Public IP: 10.117.207.160
Staking port: 9651
Versions:
AvalancheGo: avalanche/1.11.3
[...]

As we can see above, our node is currently running AvalancheGo version 1.11.3. This is what's expected because of the Ansible role variable avalanchego_version: 1.11.3 set at avalanche_nodes.yml in our inventory.

Upgrade the AvalancheGo version​

Let's upgrade our nodes by changing the avalanchego_version Ansible variable to 1.11.4 with the following command:

sed -i 's/avalanchego_version: 1.11.3/avalanchego_version: 1.11.4/' inventories/local/group_vars/avalanche_nodes.yml

We can then upgrade all the nodes defined in our Ansible inventory by running the provision_nodes playbook again:

ansible-playbook ash.avalanche.provision_nodes -i inventories/local

Verify the new AvalancheGo version​

By running the same command as previously:

multipass exec validator01 -- ash avalanche node info

We can confirm that our node is now running AvalancheGo 1.11.4:

Node '127.0.0.1:9650':
ID: NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg
Network: local
Public IP: 10.117.207.160
Staking port: 9651
Versions:
AvalancheGo: avalanche/1.11.4
[...]