Subnet Blockchain Explorer
In this section, we will learn how to use the ash.avalanche.evm.blockscout
role to deploy a Blockscout instance for an EVM blockchain.
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.
We should also have created a Subnet and a blockchain, see Subnet Creation for details.
Always make sure you have the latest version of the collection installed. See Installation and upgrade.
Requirements
The ash.avalanche.faucet
role uses Docker and the ash.avalanche.install_blockscout_docker
playbook installs Docker through the geerlingguy.docker.
We can make this role available locally with:
ansible-galaxy install -r ansible_collections/ash/avalanche/requirements.yml
Configure Blockscout
The Blockscout instance will be installed as a Docker Compose service on the nodes of the blockscout
Ansible group. In Ansible Avalanche Getting Started, it is the frontend
node by default. You can change this by editing the hosts
file.
Set the blockchain ID in blockscout.yml
(the group_vars
file associated with our hosts' group):
blockscout_blockchain_id: 2dEmExGjJT6MouJRr1PqV4PSQEbScDAjKuPtT6pgqYR5xdUuac
The blockchain ID (2dEmExGjJT6MouJRr1PqV4PSQEbScDAjKuPtT6pgqYR5xdUuac
in our case) should be the one created in the Subnet Creation tutorial.
If you went through all the tutorials with the local
inventory and the default variables, you should be good to go! Otherwise, check out the other variables at ash.avalanche.evm.blockscout
.
Install Blockscout
Running the ash.avalanche.install_blockscout_docker
will install Docker and the docker-compose service:
ansible-playbook ash.avalanche.install_blockscout_docker -i inventories/local
Generate the Blockscout URL and open it in your browser:
echo "http://$(terraform -chdir=terraform/multipass output -raw frontend_ip)"
http://10.117.207.108
The ash.avalanche.evm.blockscout
role is not yet compatible with secured HTTP API endpoints.