4. Avalanche Nodes Deployment
The Ash Console is currently in alpha and not production-ready. It is under active development and subject to breaking changes.
We can finally deploy our 5 Avalanche node resources!
Set shared configuration at the project level
It is common that resources of the same project share some configuration. For example, all the Avalanche nodes of our devnet will have the same AvalancheGo version.
We will use the sharedResourceConfig
field of the project to set this shared configuration:
ash console project update devnet-guide '{
sharedResourceConfig: {
avalancheNodeConfig: {
avalanchego_version: 1.10.17,
avalanchego_vms_install: {
subnet-evm: 0.5.10
}
}
}
}'
To see the sharedResourceConfig
of a project, use the console project info
command with the --json
flag:
ash console project info devnet-guide --json | jq
{
"cloudRegionsIds": {
"aws/us-east-1": "634d78b0-c8ba-44ac-a08b-5b27300ac9d9"
},
"created": "2023-12-21T15:55:06.285003",
"id": "ac00583b-7b98-4a3a-9a43-2402f8796673",
"name": "devnet-guide",
"network": "local",
"ownerId": "287090ee-7fae-4bd7-9263-d690959edc26",
"resourcesIds": {},
"sharedResourceConfig": {
"avalancheNodeConfig": {
"avalanchego_version": "1.10.17"
}
}
}
Bootstrap node creation
Gather the cloud region secret ID from the previous steps.
Create the
avalancheNode
"local-node-01" resource with theconsole resource create
command:Commandash console resource create '{
name: local-node-01,
resourceType: avalancheNode,
cloudRegionId: aws/us-east-1,
nodeIdSecretId: local-node-id-01,
size: medium,
nodeConfig: {
isBootstrapNode: true
}
}'OutputResource successfully created in project 'devnet-guide'!
+-------------------+-------------+---------------+-----------------+--------+------------------+---------+--------------------------+
| Resource name | Resource ID | Type | Cloud region ID | Size | Created at | Status | Resource specific |
+===================+=============+===============+=================+========+==================+=========+==========================+
| local-node-01 | 9419...6722 | AvalancheNode | 634d...c9d9 | Medium | 2023-12-21T16:01 | Pending | IP address | None |
| | | | | | | | Running | false |
| | | | | | | | Bootstrapped | [false] |
| | | | | | | | Healthy | [false] |
| | | | | | | | Restart req. | false |
+-------------------+-------------+---------------+-----------------+--------+------------------+---------+--------------------------+Note: See Resource sizes for available resource sizes.
local-node-01
is the "bootstrap" node. It has a different configuration than the other nodes of the local Avalanche network. See the Create a resource for more information.
Other nodes creation
Create the 4 other avalancheNode
resources with the console resource create
command:
for i in {2..5}; do
ash console resource create "{
name: local-node-0$i,
resourceType: avalancheNode,
cloudRegionId: aws/us-east-1,
nodeIdSecretId: local-node-id-0$i,
size: medium,
nodeConfig: {
isBootstrapNode: false
},
nodeBootstrapResourceId: local-node-01
}"
done
- The above command takes about 1 minute to complete.
- Providing a
nodeBootstrapResourceId
is only supported for resources created in the same cloud region as the bootstrap node.
Health
It will take a few minutes before the local network is
Bootstrapped
andHealthy
. You can get its updated status with theconsole resource info
command:Commandash console resource info local-node-01
OutputResource 'local-node-01' of project 'devnet-guide':
+-------------------+-------------+---------------+-----------------+--------+------------------+---------+--------------------------------+
| Resource name | Resource ID | Type | Cloud region ID | Size | Created at | Status | Resource specific |
+===================+=============+===============+=================+========+==================+=========+================================+
| local-node-01 | 9419...6722 | AvalancheNode | 634d...c9d9 | Medium | 2023-12-21T16:01 | Running | IP address | 3.210.183.166 |
| | | | | | | | Running | true |
| | | | | | | | Bootstrapped | [false] |
| | | | | | | | Healthy | [false] |
| | | | | | | | Restart req. | false |
+-------------------+-------------+---------------+-----------------+--------+------------------+---------+--------------------------------+Once a node is
Running
, you can also query the nodeinfo
endpoint with theavalanche node info
command:Commandash avalanche node info -n 3.210.183.166
OutputNode '3.210.183.166:9650':
ID: NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg
Network: local
Public IP: 3.210.183.166
Staking port: 9651
Versions:
AvalancheGo: avalanche/1.10.17
Database: v1.4.5
RPC Protocol: 28
Git commit: 145dfb0dc179d688f45ad44067ef6f9821148b36
VMs:
AvalancheVM: v1.10.17
Coreth: v0.12.5
PlatformVM: v1.10.17
Subnet VMs: []
Uptime:
Rewarding stake: 100%
Weighted average: 100%noteYour node IP address will be different.
Your local Avalanche network is now up and running!
See the reference for more information about resources lifecycle management.