Skip to content

Commit

Permalink
Merge pull request MaterializeInc#22287 from MaterializeInc/roshan/us…
Browse files Browse the repository at this point in the history
…-west-2-assorted

Assorted doc & mz cli changes for aws/us-west-2 launch
  • Loading branch information
rjobanp authored Oct 12, 2023
2 parents 83e2171 + b75d3b5 commit c171503
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions doc/developer/platform/ux.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ by Materialize Cloud:

* aws:us-east-1
* aws:eu-west-1
* aws:us-west-2

### Cluster

Expand Down
1 change: 1 addition & 0 deletions doc/user/content/releases/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Region | Day of week | Time
--------------|-------------|-----------------------------
aws/eu-west-1 | Wednesday | 2100-2300 [Europe/Dublin]
aws/us-east-1 | Thursday | 0500-0700 [America/New_York]
aws/us-west-2 | Thursday | 0200-0400 [America/Los_Angeles]

{{< note >}}
Upgrade windows follow any daylight saving time or summer time rules
Expand Down
2 changes: 1 addition & 1 deletion doc/user/layouts/shortcodes/replica-options.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Field | Value | Description
------------------------------------|------------|-------------------------------------
`SIZE` | `text` | The size of the replica. For valid sizes, see [Size](/sql/create-cluster-replica#size).
`AVAILABILITY ZONE` | `text` | The availability zone of the underlying clodu provider in which to provision the replica. You must specify an [AWS availability zone ID](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html) in either `us-east-1` or `eu-west-1`, e.g. `use1-az1`. Note that you must use the zone's ID, not its name.
`AVAILABILITY ZONE` | `text` | The availability zone of the underlying clodu provider in which to provision the replica. You must specify an [AWS availability zone ID](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html) in either `us-east-1`, `eu-west-1`, or `us-west-2`, e.g. `use1-az1`. Note that you must use the zone's ID, not its name.
`INTROSPECTION INTERVAL` | `interval` | The interval at which to collect introspection data. See [Troubleshooting](/ops/troubleshooting) for details about introspection data. The special value `0` entirely disables the gathering of introspection data.<br>Default: `1s`
`INTROSPECTION DEBUGGING` | `bool` | Whether to introspect the gathering of the introspection data.<br>Default: `FALSE`
`IDLE ARRANGEMENT MERGE EFFORT` | `integer` | ***Unstable.** This option may be changed or removed at any time.*<br>The amount of effort the replica should exert on compacting arrangements during idle periods.
Expand Down
7 changes: 7 additions & 0 deletions src/cloud-api/src/client/cloud_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ impl CloudProvider {
match self.id.as_str() {
"aws/us-east-1" => Ok(CloudProviderRegion::AwsUsEast1),
"aws/eu-west-1" => Ok(CloudProviderRegion::AwsEuWest1),
"aws/us-west-2" => Ok(CloudProviderRegion::AwsUsWest2),
_ => Err(Error::CloudProviderRegionParseError),
}
}
Expand All @@ -83,6 +84,9 @@ pub enum CloudProviderRegion {
/// Represents `aws/eu-west-1` cloud provider and region
#[serde(rename = "aws/eu-west-1")]
AwsEuWest1,
/// Represents `aws/us-west-2` cloud provider and region
#[serde(rename = "aws/us-west-2")]
AwsUsWest2,
}

impl CloudProviderRegion {
Expand All @@ -91,6 +95,7 @@ impl CloudProviderRegion {
match cloud_provider.id.as_str() {
"aws/us-east-1" => Ok(CloudProviderRegion::AwsUsEast1),
"aws/eu-west-1" => Ok(CloudProviderRegion::AwsEuWest1),
"aws/us-west-2" => Ok(CloudProviderRegion::AwsUsWest2),
_ => Err(Error::CloudProviderRegionParseError),
}
}
Expand All @@ -101,6 +106,7 @@ impl Display for CloudProviderRegion {
match self {
CloudProviderRegion::AwsUsEast1 => write!(f, "aws/us-east-1"),
CloudProviderRegion::AwsEuWest1 => write!(f, "aws/eu-west-1"),
CloudProviderRegion::AwsUsWest2 => write!(f, "aws/us-west-2"),
}
}
}
Expand All @@ -112,6 +118,7 @@ impl FromStr for CloudProviderRegion {
match s.to_lowercase().as_str() {
"aws/us-east-1" => Ok(CloudProviderRegion::AwsUsEast1),
"aws/eu-west-1" => Ok(CloudProviderRegion::AwsEuWest1),
"aws/us-west-2" => Ok(CloudProviderRegion::AwsUsWest2),
_ => Err(Error::CloudProviderRegionParseError),
}
}
Expand Down
1 change: 1 addition & 0 deletions src/mz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ SUBCOMMANDS:
```
aws/us-east-1 enabled
aws/eu-west-1 disabled
aws/us-west-2 disabled
```

4. Launch a SQL shell connected to one of the enabled regions in your
Expand Down
11 changes: 6 additions & 5 deletions test/mz-e2e/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
)
from materialize.mzcompose.services.mz import Mz

REGION = "aws/us-east-1"
REGION = "aws/us-west-2"
ENVIRONMENT = os.getenv("ENVIRONMENT", "production")
USERNAME = os.getenv("NIGHTLY_MZ_USERNAME", "infra+bot@materialize.com")
APP_PASSWORD = os.environ["MZ_CLI_APP_PASSWORD"]
Expand Down Expand Up @@ -207,10 +207,11 @@ def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None:
# Enable, disable and show are already tested.
output = c.run("mz", "region", "list", "--format", "json", capture=True)
regions = json.loads(output.stdout)
us_region = regions[0]
if us_region["region"] != "aws/us-east-1":
us_region = regions[1]
assert "enabled" == us_region["status"]
us_region = None
for region in regions:
if region["region"] == REGION:
us_region = region
assert us_region is not None and "enabled" == us_region["status"]

# Verify the content is ok
print(f"Path: {psql_config_path}")
Expand Down

0 comments on commit c171503

Please sign in to comment.