Struct avalanche_ops::aws::spec::Spec
source · pub struct Spec {Show 18 fields
pub version: usize,
pub id: String,
pub aad_tag: String,
pub resource: Resource,
pub machine: Machine,
pub upload_artifacts: Option<UploadArtifacts>,
pub avalanchego_release_tag: Option<String>,
pub avalanched_config: Flags,
pub create_dev_machine: bool,
pub dev_machine: Option<DevMachine>,
pub enable_nlb: bool,
pub disable_logs_auto_removal: bool,
pub metrics_fetch_interval_seconds: u64,
pub primary_network_validate_period_in_days: u64,
pub prefunded_keys: Option<Vec<Info>>,
pub avalanchego_config: Config,
pub coreth_chain_config: Config,
pub avalanchego_genesis_template: Option<Genesis>,
}Expand description
Represents network-level configuration shared among all nodes. The node-level configuration is generated during each bootstrap process (e.g., certificates) and not defined in this cluster-level “Config”. At the beginning, the user is expected to provide this configuration. “Clone” is for deep-copying.
Fields§
§version: usize§id: StringUser-provided ID of the cluster/test. This is NOT the avalanche node ID. This is NOT the avalanche network ID.
aad_tag: StringAAD tag used for envelope encryption with KMS.
resource: ResourceAWS resources if run in AWS.
machine: MachineDefines how the underlying infrastructure is set up. MUST BE NON-EMPTY.
upload_artifacts: Option<UploadArtifacts>Upload artifacts from the local machine to share with remote machines.
avalanchego_release_tag: Option<String>Non-empty to specify avalanchego release tag to download. Discarded if avalanchego binary was uploaded to S3.
avalanched_config: FlagsFlag to pass to the “avalanched” command-line interface.
create_dev_machine: boolSet “true” to create a dev machine.
dev_machine: Option<DevMachine>§enable_nlb: boolSet “true” to enable NLB.
disable_logs_auto_removal: boolSet “true” to disable CloudWatch log auto removal.
metrics_fetch_interval_seconds: u64Interval in seconds to fetch system and avalanche node metrics. Set to 0 to disable metrics collection.
primary_network_validate_period_in_days: u64§prefunded_keys: Option<Vec<Info>>Required for custom networks with pre-funded wallets! These are used for custom primary network genesis generation and will be pre-funded. The first key will have locked P-chain balance with initial stake duration in genesis. Except the first key in the list, all keys have immediately unlocked P-chain balance. Should never be used for mainnet as it’s store in plaintext for testing purposes only.
avalanchego_config: ConfigRepresents the configuration for “avalanchego”. Set as if run in remote machines. For instance, “config-file” must be the path valid in the remote machines. MUST BE “kebab-case” to be compatible with “avalanchego”.
coreth_chain_config: ConfigIf non-empty, the JSON-encoded data are saved to a file in Path::new(&avalanchego_config.chain_config_dir).join(“C”).
avalanchego_genesis_template: Option<Genesis>If non-empty, the JSON-encoded data are saved to a file and used for “–genesis” in Path::new(&avalanchego_config.genesis). This includes “coreth_genesis::Genesis”. Names after “_template” since it has not included initial stakers yet with to-be-created node IDs.
Implementations§
source§impl Spec
impl Spec
sourcepub async fn default_aws(opts: DefaultSpecOption) -> Result<(Self, String)>
pub async fn default_aws(opts: DefaultSpecOption) -> Result<(Self, String)>
Creates a default spec.
sourcepub fn encode_yaml(&self) -> Result<String>
pub fn encode_yaml(&self) -> Result<String>
Converts to string in YAML format.
sourcepub fn sync(&self, file_path: &str) -> Result<()>
pub fn sync(&self, file_path: &str) -> Result<()>
Saves the current spec to disk and overwrites the file.