Skip to content

Commit

Permalink
0.7.3
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed May 28, 2023
1 parent 449c8ea commit 0782953
Show file tree
Hide file tree
Showing 14 changed files with 88 additions and 87 deletions.
6 changes: 3 additions & 3 deletions avalanche-kms/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "avalanche-kms"
version = "0.7.2" # https://github.com/ava-labs/avalanche-ops/releases
version = "0.7.3" # https://github.com/ava-labs/avalanche-ops/releases
edition = "2021"
rust-version = "1.69"

[dependencies]
avalanche-types = { version = "0.0.391", features = ["jsonrpc_client", "wallet", "wallet_evm", "kms_aws"] } # https://crates.io/crates/avalanche-types
aws-manager = { version = "0.28.0", features = ["kms", "sts"] } # https://github.com/gyuho/aws-manager/tags
avalanche-types = { version = "0.0.392", features = ["jsonrpc_client", "wallet", "wallet_evm", "kms_aws"] } # https://crates.io/crates/avalanche-types
aws-manager = { version = "0.28.1", features = ["kms", "sts"] } # https://github.com/gyuho/aws-manager/tags
clap = { version = "4.3.0", features = ["cargo", "derive"] } # https://github.com/clap-rs/clap/releases
crossterm = "0.26.1"
dialoguer = "0.10.4"
Expand Down
6 changes: 3 additions & 3 deletions avalanche-ops/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "avalanche-ops"
version = "0.7.2" # https://crates.io/crates/avalanche-ops
version = "0.7.3" # https://crates.io/crates/avalanche-ops
edition = "2021"
rust-version = "1.69"
publish = true
Expand All @@ -10,8 +10,8 @@ readme = "README.md"
license = "Apache-2.0"

[dependencies]
avalanche-types = { version = "0.0.391", features = ["avalanchego"] } # https://crates.io/crates/avalanche-types
aws-manager = { version = "0.28.0", features = ["ec2", "sts"] } # https://github.com/gyuho/aws-manager/tags
avalanche-types = { version = "0.0.392", features = ["avalanchego"] } # https://crates.io/crates/avalanche-types
aws-manager = { version = "0.28.1", features = ["ec2", "sts"] } # https://github.com/gyuho/aws-manager/tags
compress-manager = "0.0.10"
dir-manager = "0.0.1"
env_logger = "0.10.0"
Expand Down
25 changes: 11 additions & 14 deletions avalanche-ops/src/aws/cfn-templates/asg_ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ Parameters:
Type: AWS::EC2::SecurityGroup::Id
Description: EC2 security group ID

ArchType:
Type: String
Default: "amd64"
Description: The name of the CPU architecture. Used for cloudwatch agent download links.

RustOsType:
Type: String
AllowedValues: ["ubuntu20.04"]
Default: "ubuntu20.04"
Description: The name of the OS distribution and kind. Used for Rust binary download links.

ImageId:
Type: String
Default: ""
Expand All @@ -66,22 +77,8 @@ Parameters:
ImageIdSsmParameter:
Type: AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>
Default: /aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id
# Default: /aws/service/canonical/ubuntu/server/20.04/stable/current/arm64/hvm/ebs-gp2/ami-id
Description: AWS Systems Manager Parameter Store parameter of the AMI ID.

ArchType:
Type: String
AllowedValues: ["amd64", "arm64"]
Default: "amd64"
# Default: "arm64"
Description: The name of the CPU architecture. Used for cloudwatch agent download links.

RustOsType:
Type: String
AllowedValues: ["unknown", "ubuntu20.04"]
Default: "unknown"
Description: The name of the OS distribution and kind. Used for Rust binary download links.

AvalancheGoReleaseTag:
Type: String
Default: "v1.10.0"
Expand Down
6 changes: 3 additions & 3 deletions avalanched-aws/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "avalanched-aws"
version = "0.7.2" # https://github.com/ava-labs/avalanche-ops/releases
version = "0.7.3" # https://github.com/ava-labs/avalanche-ops/releases
edition = "2021"
rust-version = "1.69"

Expand All @@ -12,9 +12,9 @@ path = "src/main.rs"
avalanche-installer = "0.0.75" # https://crates.io/crates/avalanche-installer
avalanche-ops = { path = "../avalanche-ops" }
avalanche-telemetry-cloudwatch-installer = "0.0.106" # https://crates.io/crates/avalanche-telemetry-cloudwatch
avalanche-types = { version = "0.0.391", features = ["avalanchego", "jsonrpc_client", "subnet_evm"] } # https://crates.io/crates/avalanche-types
avalanche-types = { version = "0.0.392", features = ["avalanchego", "jsonrpc_client", "subnet_evm"] } # https://crates.io/crates/avalanche-types
aws-ip-provisioner-installer = "0.0.91" # https://crates.io/crates/aws-ip-provisioner-installer
aws-manager = { version = "0.28.0", features = ["autoscaling", "cloudwatch", "ec2", "s3"] } # https://github.com/gyuho/aws-manager/tags
aws-manager = { version = "0.28.1", features = ["autoscaling", "cloudwatch", "ec2", "s3"] } # https://github.com/gyuho/aws-manager/tags
aws-sdk-cloudwatch = "0.28.0" # https://github.com/awslabs/aws-sdk-rust/releases
aws-sdk-ec2 = "0.28.0" # https://github.com/awslabs/aws-sdk-rust/releases
aws-sdk-s3 = "0.28.0" # https://github.com/awslabs/aws-sdk-rust/releases
Expand Down
8 changes: 4 additions & 4 deletions avalancheup-aws/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "avalancheup-aws"
version = "0.7.2" # https://github.com/ava-labs/avalanche-ops/releases
version = "0.7.3" # https://github.com/ava-labs/avalanche-ops/releases
edition = "2021"
rust-version = "1.69"

Expand All @@ -10,9 +10,9 @@ path = "src/main.rs"

[dependencies]
avalanche-ops = { path = "../avalanche-ops" }
avalanche-types = { version = "0.0.391", features = ["avalanchego", "jsonrpc_client", "wallet", "subnet", "subnet_evm", "kms_aws"] } # https://crates.io/crates/avalanche-types
aws-dev-machine = "0.0.4"
aws-manager = { version = "0.28.0", features = ["cloudformation", "cloudwatch", "ec2", "s3", "ssm", "sts"] } # https://github.com/gyuho/aws-manager/tags
avalanche-types = { version = "0.0.392", features = ["avalanchego", "jsonrpc_client", "wallet", "subnet", "subnet_evm", "kms_aws"] } # https://crates.io/crates/avalanche-types
aws-dev-machine = "0.0.5"
aws-manager = { version = "0.28.1", features = ["cloudformation", "cloudwatch", "ec2", "s3", "ssm", "sts"] } # https://github.com/gyuho/aws-manager/tags
aws-sdk-cloudformation = "0.28.0" # https://github.com/awslabs/aws-sdk-rust/releases
aws-sdk-ec2 = "0.28.0" # https://github.com/awslabs/aws-sdk-rust/releases
aws-sdk-s3 = "0.28.0" # https://github.com/awslabs/aws-sdk-rust/releases
Expand Down
45 changes: 23 additions & 22 deletions avalancheup-aws/src/apply/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -815,14 +815,15 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
format!("{}", spec.machine.volume_size_in_gb).as_str(),
),
build_param("ArchType", &spec.machine.arch_type),
build_param("RustOsType", &spec.machine.rust_os_type),
build_param(
"ImageIdSsmParameter",
&format!(
"/aws/service/canonical/ubuntu/server/20.04/stable/current/{}/hvm/ebs-gp2/ami-id",
spec.machine.arch_type
),
&ec2::default_image_id_ssm_parameter(
&spec.machine.arch_type,
&spec.machine.rust_os_type,
)
.unwrap(),
),
build_param("RustOsType", &spec.machine.rust_os_type),
build_param(
"AvalanchedAwsArgs",
&format!("agent {}", spec.avalanched_config.to_flags()),
Expand Down Expand Up @@ -874,15 +875,16 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
format!("{}", spec.machine.volume_size_in_gb),
);
common_dev_machine_params.insert("ArchType".to_string(), spec.machine.arch_type.clone());
common_dev_machine_params
.insert("RustOsType".to_string(), spec.machine.rust_os_type.clone());
common_dev_machine_params.insert(
"ImageIdSsmParameter".to_string(),
format!(
"/aws/service/canonical/ubuntu/server/20.04/stable/current/{}/hvm/ebs-gp2/ami-id",
spec.machine.arch_type
),
ec2::default_image_id_ssm_parameter(
&spec.machine.arch_type,
&spec.machine.rust_os_type,
)
.unwrap(),
);
common_dev_machine_params
.insert("RustOsType".to_string(), spec.machine.rust_os_type.clone());
common_dev_machine_params.insert(
"ProvisionerInitialWaitRandomSeconds".to_string(),
"90".to_string(),
Expand Down Expand Up @@ -2635,17 +2637,16 @@ default-spec --log-level=info --funded-keys={funded_keys} --region={region} --up
);
regional_common_dev_machine_asg_params
.insert("ArchType".to_string(), dev_machine.arch_type.clone());
if dev_machine.rust_os_type != "al2" {
regional_common_dev_machine_asg_params.insert(
"ImageIdSsmParameter".to_string(),
format!(
"/aws/service/canonical/ubuntu/server/20.04/stable/current/{}/hvm/ebs-gp2/ami-id",
dev_machine.arch_type
),
);
regional_common_dev_machine_asg_params
.insert("RustOsType".to_string(), "ubuntu20.04".to_string());
}
regional_common_dev_machine_asg_params
.insert("RustOsType".to_string(), "ubuntu20.04".to_string());
regional_common_dev_machine_asg_params.insert(
"ImageIdSsmParameter".to_string(),
ec2::default_image_id_ssm_parameter(
&spec.machine.arch_type,
&spec.machine.rust_os_type,
)
.unwrap(),
);

let regional_shared_config = aws_manager::load_config(
Some(spec.resource.regions[0].clone()),
Expand Down
14 changes: 10 additions & 4 deletions avalancheup-aws/src/default_spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::{
};

use avalanche_types::avalanchego::config as avalanchego_config;
use aws_manager::ec2;
use clap::{value_parser, Arg, Command};
use crossterm::{
execute,
Expand Down Expand Up @@ -78,17 +79,22 @@ pub fn command() -> Command {
.help("Sets the machine architecture")
.required(true)
.num_args(1)
.value_parser(["amd64", "arm64"])
.default_value("amd64"),
.value_parser([
ec2::ArchType::Amd64.as_str(),
ec2::ArchType::Arm64.as_str(),
])
.default_value(ec2::ArchType::Amd64.as_str()),
)
.arg(
Arg::new("RUST_OS_TYPE")
.long("rust-os-type")
.help("Sets Rust OS type")
.required(true)
.num_args(1)
.value_parser(["ubuntu20.04"])
.default_value("ubuntu20.04"),
.value_parser([
ec2::OsType::Ubuntu2004.as_str(),
])
.default_value(ec2::OsType::Ubuntu2004.as_str()),
)
.arg(
Arg::new("ANCHOR_NODES")
Expand Down
6 changes: 3 additions & 3 deletions blizzard-aws/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "blizzard-aws"
version = "0.7.2" # https://github.com/ava-labs/avalanche-ops/releases
version = "0.7.3" # https://github.com/ava-labs/avalanche-ops/releases
edition = "2021"
rust-version = "1.69"

Expand All @@ -9,8 +9,8 @@ name = "blizzard-aws"
path = "src/main.rs"

[dependencies]
avalanche-types = { version = "0.0.391", features = ["jsonrpc_client", "wallet", "wallet_evm"] } # https://crates.io/crates/avalanche-types
aws-manager = { version = "0.28.0", features = ["cloudwatch", "ec2", "s3"] } # https://github.com/gyuho/aws-manager/tags
avalanche-types = { version = "0.0.392", features = ["jsonrpc_client", "wallet", "wallet_evm"] } # https://crates.io/crates/avalanche-types
aws-manager = { version = "0.28.1", features = ["cloudwatch", "ec2", "s3"] } # https://github.com/gyuho/aws-manager/tags
aws-sdk-cloudwatch = "0.28.0" # https://github.com/awslabs/aws-sdk-rust/releases
aws-sdk-ec2 = "0.28.0" # https://github.com/awslabs/aws-sdk-rust/releases
aws-sdk-s3 = "0.28.0" # https://github.com/awslabs/aws-sdk-rust/releases
Expand Down
6 changes: 3 additions & 3 deletions blizzardup-aws/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "blizzardup-aws"
version = "0.7.2" # https://github.com/ava-labs/avalanche-ops/releases
version = "0.7.3" # https://github.com/ava-labs/avalanche-ops/releases
edition = "2021"
rust-version = "1.69"

Expand All @@ -9,8 +9,8 @@ name = "blizzardup-aws"
path = "src/main.rs"

[dependencies]
avalanche-types = { version = "0.0.391", features = ["avalanchego", "jsonrpc_client", "subnet_evm"] } # https://crates.io/crates/avalanche-types
aws-manager = { version = "0.28.0", features = ["cloudformation", "cloudwatch", "ec2", "s3", "sts"] } # https://github.com/gyuho/aws-manager/tags
avalanche-types = { version = "0.0.392", features = ["avalanchego", "jsonrpc_client", "subnet_evm"] } # https://crates.io/crates/avalanche-types
aws-manager = { version = "0.28.1", features = ["cloudformation", "cloudwatch", "ec2", "s3", "sts"] } # https://github.com/gyuho/aws-manager/tags
aws-sdk-cloudformation = "0.28.0" # https://github.com/awslabs/aws-sdk-rust/releases
aws-sdk-ec2 = "0.28.0" # https://github.com/awslabs/aws-sdk-rust/releases
aws-sdk-s3 = "0.28.0" # https://github.com/awslabs/aws-sdk-rust/releases
Expand Down
23 changes: 11 additions & 12 deletions blizzardup-aws/cfn-templates/asg_ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ Parameters:
Type: AWS::EC2::SecurityGroup::Id
Description: EC2 security group ID

ArchType:
Type: String
Default: "amd64"
Description: The name of the architecture.

RustOsType:
Type: String
AllowedValues: ["ubuntu20.04"]
Default: "ubuntu20.04"
Description: The name of the OS distribution and kind. Used for Rust binary download links.

ImageId:
Type: String
Default: ""
Expand All @@ -44,18 +55,6 @@ Parameters:
Default: /aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id
Description: AWS Systems Manager Parameter Store parameter of the AMI ID.

ArchType:
Type: String
AllowedValues: ["amd64", "arm64"]
Default: "amd64"
Description: The name of the architecture.

RustOsType:
Type: String
AllowedValues: ["unknown", "ubuntu20.04"]
Default: "unknown"
Description: The name of the OS distribution and kind. Used for Rust binary download links.

InstanceTypes:
Type: CommaDelimitedList
Default: c6a.xlarge,m6a.xlarge,m5.xlarge,c5.xlarge
Expand Down
16 changes: 7 additions & 9 deletions blizzardup-aws/src/apply/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,7 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
build_param("Id", &spec.id),
build_param("NodeKind", "worker"),
build_param("S3BucketName", &resources.s3_bucket),
build_param(
"Ec2KeyPairName",
&resources.ec2_key_name.clone().unwrap(),
),
build_param("Ec2KeyPairName", &resources.ec2_key_name.clone().unwrap()),
build_param(
"InstanceProfileArn",
&resources
Expand All @@ -453,14 +450,15 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
),
build_param("PublicSubnetIds", &public_subnet_ids.join(",")),
build_param("ArchType", &spec.machine.arch_type),
build_param("RustOsType", &spec.machine.rust_os_type),
build_param(
"ImageIdSsmParameter",
&format!(
"/aws/service/canonical/ubuntu/server/20.04/stable/current/{}/hvm/ebs-gp2/ami-id",
spec.machine.arch_type
),
&ec2::default_image_id_ssm_parameter(
&spec.machine.arch_type,
&spec.machine.rust_os_type,
)
.unwrap(),
),
build_param("RustOsType", &spec.machine.rust_os_type),
]);

if !spec.machine.instance_types.is_empty() {
Expand Down
4 changes: 2 additions & 2 deletions devnet-faucet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "devnet-faucet"
version = "0.7.2" # https://github.com/ava-labs/avalanche-ops/releases
version = "0.7.3" # https://github.com/ava-labs/avalanche-ops/releases
edition = "2021"
license = "MIT OR Apache-2.0"

Expand All @@ -9,7 +9,7 @@ name = "devnet-faucet"
path = "src/main.rs"

[dependencies]
avalanche-types = { version = "0.0.391", features = ["evm", "jsonrpc_client", "wallet", "wallet_evm"] } # https://crates.io/crates/avalanche-types
avalanche-types = { version = "0.0.392", features = ["evm", "jsonrpc_client", "wallet", "wallet_evm"] } # https://crates.io/crates/avalanche-types
bytes = "1.4.0"
clap = { version = "4.3.0", features = ["cargo", "derive"] } # https://github.com/clap-rs/clap/releases
env_logger = "0.10.0"
Expand Down
6 changes: 3 additions & 3 deletions staking-key-cert-s3-downloader/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "staking-key-cert-s3-downloader"
version = "0.7.2" # https://github.com/ava-labs/avalanche-ops/releases
version = "0.7.3" # https://github.com/ava-labs/avalanche-ops/releases
edition = "2021"
rust-version = "1.69"

[dependencies]
avalanche-types = { version = "0.0.391", features = [] } # https://crates.io/crates/avalanche-types
aws-manager = { version = "0.28.0", features = ["kms", "s3"] } # https://github.com/gyuho/aws-manager/tags
avalanche-types = { version = "0.0.392", features = [] } # https://crates.io/crates/avalanche-types
aws-manager = { version = "0.28.1", features = ["kms", "s3"] } # https://github.com/gyuho/aws-manager/tags
clap = { version = "4.3.0", features = ["cargo", "derive"] } # https://github.com/clap-rs/clap/releases
env_logger = "0.10.0"
log = "0.4.17"
Expand Down
4 changes: 2 additions & 2 deletions staking-signer-key-s3-downloader/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "staking-signer-key-s3-downloader"
version = "0.7.2" # https://github.com/ava-labs/avalanche-ops/releases
version = "0.7.3" # https://github.com/ava-labs/avalanche-ops/releases
edition = "2021"
rust-version = "1.69"

[dependencies]
aws-manager = { version = "0.28.0", features = ["kms", "s3"] } # https://github.com/gyuho/aws-manager/tags
aws-manager = { version = "0.28.1", features = ["kms", "s3"] } # https://github.com/gyuho/aws-manager/tags
clap = { version = "4.3.0", features = ["cargo", "derive"] } # https://github.com/clap-rs/clap/releases
env_logger = "0.10.0"
log = "0.4.17"
Expand Down

0 comments on commit 0782953

Please sign in to comment.