Skip to main content

Resource Management

caution

The Ash Console is currently in alpha and not production-ready. It is under active development and subject to breaking changes.

Resources are the core feature of the Ash Console. They are the building blocks of your infrastructure, deployed in cloud regions of your cloud account/subscription/project and managed by Ash.

info

The Ash Console alpha supports AvalancheNode resources.

note

Resources live under a project and a cloud region. To manage resources, you need to have at least one project and one cloud region.

See Project Management and Cloud Region Management.

Types of resources

There are several types of resources. See Resource for more information.

List resources

tip

The Ash CLI displays information in a table format by default. To get a more detailed output (or for scripting), use the --json flag.

To list resources you have access to, run:

Command
ash console resource list
Output
Resources of project 'my-devnet-project':
+---------------+-------------+------+--------------+------+------------+--------+-------------------+
| Resource name | Resource ID | Type | Cloud region | Size | Created at | Status | Resource specific |
+===============+=============+======+==============+======+============+========+===================+
+---------------+-------------+------+--------------+------+------------+--------+-------------------+

Create a resource

Each resource type has specific requirements, e.g. a nodeId secret is required to create an AvalancheNode resource.

Resource specific requirements
AvalancheNode
{
"name": "my-avalanche-node",
"resourceType": "avalancheNode",
"cloudRegionId": "ff69b281-917e-4ebb-b1e0-f5dc1da297fa",
"nodeIdSecretId": "4cc8f792-83af-475d-8be0-20c35efc1bd4",
"size": "small",
"nodeConfig": {
"isBootstrapNode": true,
"avalancheNodeConfig": {
"avalanchego_version": "1.10.10"
}
}
}

You can pass any variable available in the ash.avalanche.node role under nodeConfig.avalancheNodeConfig.

tip

You can provide the secrets' or cloud regions' names instead of their IDs.

To create a new resource, use the create resource command and provide the required resource properties as JSON.

Command
ash console resource create '{
name: my-avalanche-node,
resourceType: avalancheNode,
cloudRegionId: ff69b281-917e-4ebb-b1e0-f5dc1da297fa,
nodeIdSecretId: my-node-id,
size: small,
nodeConfig: {
isBootstrapNode: true,
avalancheNodeConfig: {
avalanchego_version: 1.10.10
}
}
}'
Output
Resource successfully created in project '399b6f5b-eed2-4713-8b68-993643babfd0'!
+--------------------------------------+-------------------+---------------+--------------------------------------+-------+------------------+---------+--------------------------+
| Resource ID | Name | Type | Cloud region ID | Size | Created at | Status | Resource specific |
+======================================+===================+===============+======================================+=======+==================+=========+==========================+
| 70877036-e8df-4ad3-af95-c0f085a094a6 | my-avalanche-node | AvalancheNode | ff69b281-917e-4ebb-b1e0-f5dc1da297fa | Small | 2023-11-10T16:41 | Pending | IP address | pending |
| | | | | | | | Running | false |
| | | | | | | | Bootstrapped | [false] |
| | | | | | | | Healthy | [false] |
| | | | | | | | Restart req. | false |
+--------------------------------------+-------------------+---------------+--------------------------------------+-------+------------------+---------+--------------------------+

Note: See Resource sizes for a list of available resource sizes.

Get a resource and its status

A resource can be in one of the following statuses:

  • pending: the resource is pending for a machine to be allocated in the cloud region
  • configuring: the resource is being configured
  • running: the resource is running
  • stopped: the resource is stopped
  • error: the resource is in an error state
  • destroying: the resource is being destroyed
tip

You can also provide the resource name instead of its ID.

To get information about a resource, including its status, use the resource info command and provide the resource ID.

Command
ash console resource info 70877036-e8df-4ad3-af95-c0f085a094a6
Output
Resource '70877036-e8df-4ad3-af95-c0f085a094a6' of project '399b6f5b-eed2-4713-8b68-993643babfd0':
+--------------------------------------+-------------------+---------------+--------------------------------------+-------+------------------+---------+------------------------------+
| Resource ID | Name | Type | Cloud region ID | Size | Created at | Status | Resource specific |
+======================================+===================+===============+======================================+=======+==================+=========+==============================+
| 70877036-e8df-4ad3-af95-c0f085a094a6 | my-avalanche-node | AvalancheNode | ff69b281-917e-4ebb-b1e0-f5dc1da297fa | Small | 2023-11-10T16:41 | Running | IP address | 20.74.16.34 |
| | | | | | | | Running | true |
| | | | | | | | Bootstrapped | [false] |
| | | | | | | | Healthy | [false] |
| | | | | | | | Restart req. | false |
+--------------------------------------+-------------------+---------------+--------------------------------------+-------+------------------+---------+------------------------------+

Update a resource

info

For some resource types, updates will not take effect until the resource is restarted. See Restart a resource.

The properties that can be updated depend on the resource type. For example, you can update an avalancheNode resource's name and nodeConfig:

Command
ash console resource update my-avalanche-node '{name: my-avalanche-node-v2}'
Output
Resource updated successfully!
+--------------------------------------+----------------------+---------------+--------------------------------------+-------+------------------+---------+------------------------------+
| Resource ID | Name | Type | Cloud region ID | Size | Created at | Status | Resource specific |
+======================================+======================+===============+======================================+=======+==================+=========+==============================+
| 70877036-e8df-4ad3-af95-c0f085a094a6 | my-avalanche-node-v2 | AvalancheNode | ff69b281-917e-4ebb-b1e0-f5dc1da297fa | Small | 2023-11-10T16:41 | Running | IP address | 20.74.16.34 |
| | | | | | | | Running | true |
| | | | | | | | Bootstrapped | [false] |
| | | | | | | | Healthy | [false] |
| | | | | | | | Restart req. | false |
+--------------------------------------+----------------------+---------------+--------------------------------------+-------+------------------+---------+------------------------------+

Restart a resource

Restarting a resource will apply any pending configuration changes and is required if the resource has "restartRequired": true in its status.

caution

Restarting a resource will interrupt its service for a few seconds/minutes.

The CLI will ask for confirmation before restarting the resource. To skip the confirmation, use the --yes flag.

Command
ash console resource restart 70877036-e8df-4ad3-af95-c0f085a094a6
Output
Resource updated successfully!
+--------------------------------------+----------------------+---------------+--------------------------------------+-------+------------------+---------+------------------------------+
| Resource ID | Name | Type | Cloud region ID | Size | Created at | Status | Resource specific |
+======================================+======================+===============+======================================+=======+==================+=========+==============================+
| 70877036-e8df-4ad3-af95-c0f085a094a6 | my-avalanche-node-v2 | AvalancheNode | ff69b281-917e-4ebb-b1e0-f5dc1da297fa | Small | 2023-11-10T16:41 | Running | IP address | 20.74.16.34 |
| | | | | | | | Running | true |
| | | | | | | | Bootstrapped | [false] |
| | | | | | | | Healthy | [false] |
| | | | | | | | Restart req. | false |
+--------------------------------------+----------------------+---------------+--------------------------------------+-------+------------------+---------+------------------------------+

Delete a resource

info

Removing a resource is not instantaneous. The resource will be in status destroying for a few seconds/minutes before it is completely removed.

The CLI will ask for confirmation before deleting the resource. To skip the confirmation, use the --yes flag.

Command
ash console resource delete 70877036-e8df-4ad3-af95-c0f085a094a6
Output
> Are you sure you want to delete this resource? Yes
Resource deleted successfully!

Resource sizes

The size property of a resource is used to determine the machine type to use. The available sizes depend on the cloud provider.

Here are the available sizes per resource type and their corresponding machine types in each cloud provider:

AvalancheNode

SizeRAMCPUDiskAzure VM typeAWS EC2 instance typeGCP machine type
small1-2GB1-28-32 (OS) + 50 GiB (resource storage)Standard_B1mst2.smalle2-small
medium8GB48-32 (OS) + 200 GiB (resource storage)Standard_F4sc5.xlargec2d-highcpu-4
large16GB88-32 (OS) + 1000 GiB (resource storage)Standard_F8sc5.2xlargec2d-highcpu-8