Skip to content

Commit e30ae00

Browse files
committed
0.6.0-beta.0: better logging
Signed-off-by: Gyuho Lee <[email protected]>
1 parent cf0496c commit e30ae00

File tree

10 files changed

+36
-38
lines changed

10 files changed

+36
-38
lines changed

avalanche-kms/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "avalanche-kms"
3-
version = "0.5.5-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
3+
version = "0.6.0-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
44
edition = "2021"
55
rust-version = "1.69"
66

avalanche-ops/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "avalanche-ops"
3-
version = "0.5.5-beta.0" # https://crates.io/crates/avalanche-ops
3+
version = "0.6.0-beta.0" # https://crates.io/crates/avalanche-ops
44
edition = "2021"
55
rust-version = "1.69"
66
publish = true

avalanched-aws/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "avalanched-aws"
3-
version = "0.5.5-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
3+
version = "0.6.0-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
44
edition = "2021"
55
rust-version = "1.69"
66

avalancheup-aws/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "avalancheup-aws"
3-
version = "0.5.5-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
3+
version = "0.6.0-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
44
edition = "2021"
55
rust-version = "1.69"
66

avalancheup-aws/src/apply/mod.rs

+27-29
Original file line numberDiff line numberDiff line change
@@ -377,21 +377,21 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
377377

378378
let regional_shared_config =
379379
aws_manager::load_config(Some(region.clone()), Some(Duration::from_secs(30))).await;
380-
381380
let regional_kms_manager = kms::Manager::new(&regional_shared_config);
381+
382+
sleep(Duration::from_secs(1)).await;
383+
execute!(
384+
stdout(),
385+
SetForegroundColor(Color::Green),
386+
Print(format!(
387+
"\n\n\nSTEP: create KMS encrypt key in '{region}'\n"
388+
)),
389+
ResetColor
390+
)?;
382391
if regional_resource
383392
.kms_symmetric_default_encrypt_key
384393
.is_none()
385394
{
386-
sleep(Duration::from_secs(1)).await;
387-
execute!(
388-
stdout(),
389-
SetForegroundColor(Color::Green),
390-
Print(format!(
391-
"\n\n\nSTEP: create encryption KMS key in '{region}'\n"
392-
)),
393-
ResetColor
394-
)?;
395395
let key = regional_kms_manager
396396
.create_symmetric_default_key(format!("{}-kms-key", spec.id).as_str(), false)
397397
.await
@@ -413,7 +413,7 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
413413
.await
414414
.unwrap();
415415
} else {
416-
log::info!("skipping creating kms default encrypt key");
416+
log::info!("skipping creating KMS default encrypt key");
417417
}
418418

419419
let regional_envelope_manager = envelope::Manager::new(
@@ -492,19 +492,18 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
492492
aws_manager::load_config(Some(region.clone()), Some(Duration::from_secs(30))).await;
493493
let regional_cloudformation_manager = cloudformation::Manager::new(&regional_shared_config);
494494

495+
execute!(
496+
stdout(),
497+
SetForegroundColor(Color::Green),
498+
Print(format!(
499+
"\n\n\nSTEP: creating EC2 instance role in the region '{region}'\n"
500+
)),
501+
ResetColor
502+
)?;
495503
if regional_resource
496504
.cloudformation_ec2_instance_profile_arn
497505
.is_none()
498506
{
499-
execute!(
500-
stdout(),
501-
SetForegroundColor(Color::Green),
502-
Print(format!(
503-
"\n\n\nSTEP: creating EC2 instance role in the region '{region}'\n"
504-
)),
505-
ResetColor
506-
)?;
507-
508507
let ec2_instance_role_tmpl =
509508
avalanche_ops::aws::artifacts::ec2_instance_role_yaml().unwrap();
510509
let ec2_instance_role_stack_name = regional_resource
@@ -618,6 +617,14 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
618617
aws_manager::load_config(Some(region.clone()), Some(Duration::from_secs(30))).await;
619618
let regional_cloudformation_manager = cloudformation::Manager::new(&regional_shared_config);
620619

620+
execute!(
621+
stdout(),
622+
SetForegroundColor(Color::Green),
623+
Print(format!(
624+
"\n\n\nSTEP: creating a VPC in the region '{region}'\n"
625+
)),
626+
ResetColor
627+
)?;
621628
if regional_resource.cloudformation_vpc_id.is_none()
622629
&& regional_resource
623630
.cloudformation_vpc_security_group_id
@@ -626,15 +633,6 @@ pub async fn execute(log_level: &str, spec_file_path: &str, skip_prompt: bool) -
626633
.cloudformation_vpc_public_subnet_ids
627634
.is_none()
628635
{
629-
execute!(
630-
stdout(),
631-
SetForegroundColor(Color::Green),
632-
Print(format!(
633-
"\n\n\nSTEP: creating a VPC in the region '{region}'\n"
634-
)),
635-
ResetColor
636-
)?;
637-
638636
let vpc_tmpl = avalanche_ops::aws::artifacts::vpc_yaml().unwrap();
639637
let vpc_stack_name = regional_resource.cloudformation_vpc.clone().unwrap();
640638
let vpc_params = Vec::from([

blizzard-aws/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "blizzard-aws"
3-
version = "0.5.5-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
3+
version = "0.6.0-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
44
edition = "2021"
55
rust-version = "1.69"
66

blizzardup-aws/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "blizzardup-aws"
3-
version = "0.5.5-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
3+
version = "0.6.0-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
44
edition = "2021"
55
rust-version = "1.69"
66

devnet-faucet/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "devnet-faucet"
3-
version = "0.5.5-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
3+
version = "0.6.0-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66

staking-key-cert-s3-downloader/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "staking-key-cert-s3-downloader"
3-
version = "0.5.5-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
3+
version = "0.6.0-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
44
edition = "2021"
55
rust-version = "1.69"
66

staking-signer-key-s3-downloader/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "staking-signer-key-s3-downloader"
3-
version = "0.5.5-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
3+
version = "0.6.0-beta.0" # https://github.com/ava-labs/avalanche-ops/releases
44
edition = "2021"
55
rust-version = "1.69"
66

0 commit comments

Comments
 (0)