Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion _topic_maps/_topic_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ Topics:
File: installing-aws-china
- Name: Installing a cluster on AWS using CloudFormation templates
File: installing-aws-user-infra
- Name: Installing a cluster using AWS Local Zones
File: installing-aws-localzone
- Name: Installing a cluster on AWS in a restricted network with user-provisioned infrastructure
File: installing-restricted-networks-aws
- Name: Uninstalling a cluster on AWS
Expand Down Expand Up @@ -677,7 +679,7 @@ Topics:
- Name: Dynamic plug-ins
Dir: dynamic-plug-in
Distros: openshift-enterprise,openshift-origin
Topics:
Topics:
- Name: Overview of dynamic plug-ins
File: dynamic-plug-in
- Name: Getting started with dynamic plug-ins
Expand Down
117 changes: 117 additions & 0 deletions installing/installing_aws/installing-aws-localzone.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
:_content-type: ASSEMBLY
[id="installing-aws-localzone"]
= Installing a cluster using AWS Local Zones
include::_attributes/common-attributes.adoc[]
:context: installing-aws-localzone

toc::[]

In {product-title} version {product-version}, you can install a cluster on Amazon Web Services (AWS) into an existing VPC, extending workers to the edge of the Cloud Infrastructure using AWS Local Zones.

AWS Local Zones are a type of infrastructure that place Cloud Resources close to the metropolitan regions. For more information, see the link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-local-zones[AWS Local Zones Documentation].

{product-title} can be installed in existing VPCs with Local Zone subnets. The Local Zone subnets can be used to extend the regular workers' nodes to the edge networks. The edge worker nodes are dedicated to running user workloads.

One way to create the VPC and subnets is to use the provided CloudFormation templates. You can modify the templates to customize your infrastructure or use the information that they contain to create AWS objects according to your company's policies.

[IMPORTANT]
====
The steps for performing an installer-provisioned infrastructure installation are provided as an example only. Installing a cluster with VPC you provide requires knowledge of the cloud provider and the installation process of {product-title}. The CloudFormation templates are provided to assist in completing these steps or to help model your own. You are also free to create the required resources through other methods; the templates are just an example.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a statement that typically appears in UPI doc. Is the use of installer-provisioned infrastructure intentional?

Copy link
Contributor

@kalexand-rh kalexand-rh Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This is IPI not UPI. However, it does use some CF templates to make the VPC and subnets. Unlike the UPI methods, the installation program still stands up all the machines. The VPC and subnet data is added to a custom Kubernetes manifest for the workers to get it done. I think the note still holds.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The steps for performing an installer-provisioned infrastructure installation are provided as an example only. Installing a cluster with VPC you provide requires knowledge of the cloud provider and the installation process of {product-title}. The CloudFormation templates are provided to assist in completing these steps or to help model your own. You are also free to create the required resources through other methods; the templates are just an example.
The steps for performing an installer-provisioned infrastructure installation are provided as an example only. Installing a cluster with a VPC you provide requires knowledge of the cloud provider and the installation process of {product-title}. The CloudFormation templates are provided to assist in completing these steps or to help model your own. You are also free to create the required resources through other methods; the templates are just an example.

====

== Prerequisites

* You reviewed details about the xref:../../architecture/architecture-installation.adoc#architecture-installation[{product-title} installation and update] processes.
* You read the documentation on xref:../../installing/installing-preparing.adoc#installing-preparing[selecting a cluster installation method and preparing it for users].
* You xref:../../installing/installing_aws/installing-aws-account.adoc#installing-aws-account[configured an AWS account] to host the cluster.
+
[IMPORTANT]
====
If you have an AWS profile stored on your computer, it must not use a temporary session token that you generated while using a multi-factor authentication device. The cluster continues to use your current AWS credentials to create AWS resources for the entire life of the cluster, so you must use key-based, long-lived credentials. To generate appropriate keys, see link:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html[Managing Access Keys for IAM Users] in the AWS documentation. You can supply the keys when you run the installation program.
====
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested adding LZ references:

Suggested change
====
====
* You xref:../../installing/installing_aws/installing-aws-account.adoc#installing-aws-account[configured an AWS account] to host the cluster
* You noted the Region and supported [AWS Local Zones locations](https://aws.amazon.com/about-aws/global-infrastructure/localzones/locations) to create the network resources
* You read the [Features](https://aws.amazon.com/about-aws/global-infrastructure/localzones/features/) for each AWS Local Zones location

* You noted the region and supported link:https://aws.amazon.com/about-aws/global-infrastructure/localzones/locations[AWS Local Zones locations] to create the network resources in.
* You read the link:https://aws.amazon.com/about-aws/global-infrastructure/localzones/features/[Features] for each AWS Local Zones location.
* You downloaded the AWS CLI and installed it on your computer. See link:https://docs.aws.amazon.com/cli/latest/userguide/install-bundle.html[Install the AWS CLI Using the Bundled Installer (Linux, macOS, or UNIX)] in the AWS documentation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link redirects to https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html and best I can tell, this page does not have steps to install the AWS CLI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to use https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html. This link is used in five other places in the repo.

* If you use a firewall, you xref:../../installing/install_config/configuring-firewall.adoc#configuring-firewall[configured it to allow the sites] that your cluster requires access to.
+
[NOTE]
====
Be sure to also review this site list if you are configuring a proxy.
====
* If the cloud identity and access management (IAM) APIs are not accessible in your environment, or if you do not want to store an administrator-level credential secret in the `kube-system` namespace, you can xref:../../installing/installing_aws/manually-creating-iam.adoc#manually-creating-iam-aws[manually create and maintain IAM credentials].

include::modules/cluster-entitlements.adoc[leveloffset=+1]

include::modules/installation-aws-tested-machine-types.adoc[leveloffset=+2]
Copy link
Contributor

@mtulio mtulio Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be nice to have the instances c5d.* and r5d.* validated to Local Zones, as some zones in the US are limited in terms of instance types.
Is it could be something to track after this PR?
https://aws.amazon.com/about-aws/global-infrastructure/localzones/features
cc @kalexand-rh

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The types supported by Local Zone are not the same to this list, only few instance types are available [1] in Local Zone, and the types supported by each Local Zone are also different. At present, only m5.xlarge are tested by QE.
I would suggest remove this section or adding a new list for Local Zone separately.

@patrickdillon @mtulio WDYT?

[1] https://aws.amazon.com/about-aws/global-infrastructure/localzones/features/?pg=localzones

Copy link
Contributor

@mtulio mtulio Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The types supported by Local Zone are not the same to this list, only few instance types are available [1] in Local Zone, and the types supported by each Local Zone are also different. At present, only m5.xlarge are tested by QE. I would suggest remove this section or adding a new list for Local Zone separately.

@patrickdillon @mtulio WDYT?

[1] https://aws.amazon.com/about-aws/global-infrastructure/localzones/features/?pg=localzones

@yunjiang29 I agree to add a separate list. I would suggest validating at least three instance types. Some time ago I exported[1] the matrix of instances supported. As the instances can vary between zones, I'd suggest to validated those instances:

  • m5.xlarge
  • m5.2xlarge
  • c5d.2xlarge
  • t3.xlarge

[1] https://gist.github.com/mtulio/c98aa15128a7becb06a372f00d824c42

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtulio To be clear, supported doesn't equal to tested, for example, there are tons of instance types in various AWS regions, but we just tested some of them which are listed in the documentation. (that's why we call it Tested instance types for AWS, but user can use any instance types which meet minimum resource requirements )

I will do validation on above instance types, and create PR on installer side to add a new list next Monday, so that this PR can include it. Following the current rule, the list would be:

m5.*
c5d.*
t3.*

cc @GroceryBoyJr @kalexand-rh

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, I'm making a manual edit to show m5.xlarge, since that is true right now, and we can replace the list as soon as that PR clears.


include::modules/installation-aws-add-local-zone-locations.adoc[leveloffset=+1]

include::modules/installation-aws-marketplace-subscribe.adoc[leveloffset=+1]

include::modules/installation-creating-aws-vpc-localzone.adoc[leveloffset=+1]

include::modules/installation-cloudformation-vpc-localzone.adoc[leveloffset=+2]

include::modules/installation-creating-aws-subnet-localzone.adoc[leveloffset=+1]

include::modules/installation-cloudformation-subnet-localzone.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources

* You can view details about the CloudFormation stacks that you create by navigating to the link:https://console.aws.amazon.com/cloudformation/[AWS CloudFormation console].

include::modules/installation-obtaining-installer.adoc[leveloffset=+1]

include::modules/ssh-agent-using.adoc[leveloffset=+1]

include::modules/installation-user-infra-generate.adoc[leveloffset=+1]

include::modules/installation-generate-aws-user-infra-install-config.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources

* See link:https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html[Configuration and credential file settings] in the AWS documentation for more information about AWS profile and credential configuration.

//include::modules/installation-configure-proxy.adoc[leveloffset=+2]
//Put this back if QE validates it.

include::modules/installation-localzone-generate-k8s-manifest.adoc[leveloffset=+2]

include::modules/installation-launching-installer.adoc[leveloffset=+1]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kalexand-rh Thanks for providing this module. Although, this module has one step that I think is not correct to the create cluster. The Procedure 2 and 3 seems to be unnecessary.


include::modules/cli-installing-cli.adoc[leveloffset=+1]

include::modules/cli-logging-in-kubeadmin.adoc[leveloffset=+1]

include::modules/logging-in-by-using-the-web-console.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources

* See xref:../../web_console/web-console.adoc#web-console[Accessing the web console] for more details about accessing and understanding the {product-title} web console.

include::modules/cluster-telemetry.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm moving these links down to the == Additional resources section down a few lines because they apply to the whole document.


* See xref:../../support/remote_health_monitoring/about-remote-health-monitoring.adoc#about-remote-health-monitoring[About remote health monitoring] for more information about the Telemetry service.

[role="_additional-resources"]
[id="installing-localzone-additional-resources"]
== Additional resources

* See link:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacks.html[Working with stacks] in the AWS documentation for more information about AWS CloudFormation stacks.
* link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#opt-in-local-zone[Opt into AWS Local Zones]
* link:https://aws.amazon.com/about-aws/global-infrastructure/localzones/locations[AWS Local Zones available locations]
* link:https://aws.amazon.com/about-aws/global-infrastructure/localzones/features[AWS Local Zones features]

[id="installing-aws-localzone-next-steps"]
== Next steps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kalexand-rh @GroceryBoyJr
I am thinking if we need to provide a section, or reference, of deploying a simple app in Local Zone worker nodes, which require the user to define the tolerations on the deployment spec. I will check if we have something in our documentation to make the reference. Let me know if you consider it a requirement for now or we can patch it later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtulio, I think that we can patch that in after GA. Let me know if you have a reference doc, and I'll make an issue to track the work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


* xref:../../installing/validating-an-installation.adoc#validating-an-installation[Validating an installation].
* xref:../../post_installation_configuration/cluster-tasks.adoc#available_cluster_customizations[Customize your cluster].
* If necessary, you can xref:../../support/remote_health_monitoring/opting-out-of-remote-health-reporting.adoc#opting-out-remote-health-reporting_opting-out-remote-health-reporting[opt out of remote health reporting].
* If necessary, you can xref:../../authentication/managing_cloud_provider_credentials/cco-mode-mint.adoc#manually-removing-cloud-creds_cco-mode-mint[remove cloud provider credentials].
57 changes: 57 additions & 0 deletions modules/installation-aws-add-local-zone-locations.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Module included in the following assemblies:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found it became a section in the AWS Account Setup. Is it expected? It seems to be confusing for the users who want to follow the user guide. As it is used only for Local Zones, does it make sense to keep it on the Local Zone installing guide?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the rest of the account configuration options in the other topic and a note about when users would need to do it. I'm not opposed to moving it to the installation topic, though.

//
// * installing/installing_aws/installing-aws-localzone.adoc

:_content-type: PROCEDURE
[id="installation-aws-add-local-zone-locations_{context}"]
= Opting into AWS Local Zones
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katherinedube fyi Opt in is a 'word' widely used on AWS Documentation to reference that action of enabling the zone group.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#opt-in-local-zone

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave this open to get a second opinion from the peer review squad.


If you plan to create the subnets in AWS Local Zones, you must opt in to each zone group separately.

.Prerequisites

* You have installed the AWS CLI.
* You have determined into which region you will deploy your {product-title} cluster.

.Procedure

. Export a variable to contain the name of the region in which you plan to deploy your {product-title} cluster by running the following command:
+
[source,terminal]
----
$ export CLUSTER_REGION="<region_name>" <1>
----
<1> For `<region_name>`, specify a valid AWS region name, such as `us-east-1`.

. Review the list of zones that your region contains by running the following command:
+
[source,terminal]
----
$ aws ec2 describe-availability-zones \
--filters Name=region-name,Values=${CLUSTER_REGION} \
--query 'AvailabilityZones[].ZoneName' \
--all-availability-zones
----
+
Depending on the region, the list of available zones can be long. The different zones use the following naming conventions:
+
`${REGION}[a-z]`:: Availability zones available in the region.
`${REGION}-LID-N[a-z]`:: Available AWS Local Zones. `${REGION}LID-N` is the zone group identifier, and `[a-z]` is the zone identifier.
`${REGION}-wl1-LID-wlz-[1-9]`:: Available Wavelength zones.

. Export a variable to contain the name of the Local Zone to host your VPC by running the following command:
+
[source,terminal]
----
$ export ZONE_GROUP_NAME="${CLUSTER_REGION}-<location_identifier>-<zone_identifier>" <1>
----
<1> For `<location_identifier>-<zone_identifier>`, specify the location identifier and zone identifier for the Local Zone that you selected for your region. For example, specify `nyc-1a` to use the US East (New York) Local Zone.

. Opt in to the zone group on your AWS account by running the following command:
+
[source,terminal]
----
$ aws ec2 modify-availability-zone-group \
--group-name "${ZONE_GROUP_NAME}" \
--opt-in-status opted-in
----
6 changes: 6 additions & 0 deletions modules/installation-aws-marketplace-subscribe.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ endif::[]
ifeval::["{context}" == "installing-aws-government-region"]
:ipi:
endif::[]
ifeval::["{context}" == "installing-aws-localzone"]
:ipi:
endif::[]
ifeval::["{context}" == "installing-aws-user-infra"]
:upi:
endif::[]
Expand Down Expand Up @@ -66,6 +69,9 @@ endif::[]
ifeval::["{context}" == "installing-aws-government-region"]
:!ipi:
endif::[]
ifeval::["{context}" == "installing-aws-localzone"]
:!ipi:
endif::[]
ifeval::["{context}" == "installing-aws-user-infra"]
:!upi:
endif::[]
28 changes: 26 additions & 2 deletions modules/installation-aws-tested-machine-types.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,42 @@
// installing/installing_aws/installing-aws-vpc.adoc
// installing/installing_aws/installing-restricted-networks-aws.adoc

ifeval::["{context}" == "installing-aws-localzone"]
:localzone:
endif::[]

[id="installation-aws-tested-machine-types_{context}"]
= Tested instance types for AWS

The following Amazon Web Services (AWS) instance types have been tested with {product-title}.
The following Amazon Web Services (AWS) instance types have been tested with
ifndef::localzone[]
{product-title}.
endif::localzone[]
ifdef::localzone[]
{product-title} for use with AWS Local Zones.
endif::localzone[]


[NOTE]
====
Use the machine types included in the following charts for your AWS instances. If you use an instance type that is not listed in the chart, ensure that the instance size you use matches the minimum resource requirements that are listed in "Minimum resource requirements for cluster installation".
Use the machine types included in the following charts for your AWS instances. If you use an instance type that is not listed in the chart, ensure that the instance size you use matches the minimum resource requirements that are listed in "Minimum resource requirements for cluster installation".
====

ifndef::localzone[]
.Machine types based on x86_64 architecture
[%collapsible]
====
include::https://raw.githubusercontent.com/openshift/installer/master/docs/user/aws/tested_instance_types_x86_64.md[]
====
endif::localzone[]
ifdef::localzone[]
.Machine types based on x86_64 architecture for AWS Local Zones
[%collapsible]
====
* `m5.xlarge`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a now thing, but let's be sure to coordinate with QE on reference a managed list, similar to that of line 37.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kalexand-rh thanks for putting the hardcode here. According previous discussion, I tested c5d.2xlarge and t3.xlarge and get passed.

Now we have two options:

  1. Add c5d.2xlarge and t3.xlarge to the hardcode. (note, m5.2xlarge is NOT applicable )
  2. After auto-include list on installer side added, then update this doc to include them.

Both are acceptable for me.

cc @mtulio

Copy link
Contributor

@mtulio mtulio Jan 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @yunjiang29 , adding only c5d.2xlarge and t3.xlarge, we will exclude:

  • all Local Zones available on the regions eu-*, ap-*, me-*, sa-*[us-east-1-{bue,scl}-*], all outside US
  • will allow only "t3*" instances on the Los Angeles zones (the first announced Local Zone location with the newest resources, and currently the unique including two zones). t3 is also not recommended for production workloads

If we could add/test m5.2xlarge or c5.2xlarge we could cover all of those Local Zones in the mentioned regions, increasing the coverage to +14 zones in/outside US.

I just exported a new matrix of EC2 offering across those regions/zones: https://gist.github.com/mtulio/c98aa15128a7becb06a372f00d824c42

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtulio m5.2xlarge and c5.2xlarge can be added to the list, they have been tested and get passed.

====
endif::localzone[]

ifeval::["{context}" == "installing-aws-localzone"]
:!localzone:
endif::[]
74 changes: 74 additions & 0 deletions modules/installation-cloudformation-subnet-localzone.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// Module included in the following assemblies:
//
// * installing/installing_aws/installing-aws-localzone.adoc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing the content type meta data.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the CF template modules are. I'll fix the ones in this assembly, but it might be worht fixing next time you're in the AWS UPI assembly.

:_content-type: REFERENCE
[id="installation-cloudformation-subnet-localzone_{context}"]
= CloudFormation template for the subnet that uses AWS Local Zones

You can use the following CloudFormation template to deploy the subnet that
you need for your {product-title} cluster that uses AWS Local Zones.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend the break?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I copied so many files for this and did not pay attention to whether or not the editor or the file was doing the breaking. (I mean, I can grant myself an exception, if you'd like. ;) )


.CloudFormation template for the subnet
[%collapsible]
====
[source,yaml]
----
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General comment for this PR, as I see this approach elsewhere. We typically reference GitHub source for CloudFormation templates [1]. Is an update a day-2 item?

[1] Example: https://raw.githubusercontent.com/openshift/installer/release-4.12/upi/aws/cloudformation/01_vpc.yaml

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. @mtulio, do you have a separate task to track getting these added to the /installer repo? I can add a subtask to the docs follow-ups story, if you'd like.

Copy link
Contributor

@mtulio mtulio Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katherinedube I opened a PR last year to minimal changes on the existing CloudFormation templates on installer, but it wasn't reviewed.

openshift/installer#6088

The Phase-1 of Local Zones development should be required and has installer changes. I will add it to the same PR as it is part of the same solution:

https://github.com/openshift/installer/pull/6371/files#diff-f2506b1921b9d250fcbb846a9c79caca23fab3ef60f245085d1389639e149c75

As the PR of the installer for Phase-1 is taking a long to review, feel free to share the needed to create a separate PR for that. (as we are delivering this now, I think it could be a good idea)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjpytlak, do you have a suggestion for who we should tag on the installer team about this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# CloudFormation template used to create Local Zone subnets and dependencies
AWSTemplateFormatVersion: 2010-09-09
Description: Template for Best Practice VPC with 1-3 AZs

Parameters:
ClusterName:
Description: ClusterName used to prefix resource names
Type: String
VpcId:
Description: VPC Id
Type: String
LocalZoneName:
Description: Local Zone Name (Example us-east-1-bos-1)
Type: String
LocalZoneNameShort:
Description: Short name for Local Zone used on tag Name (Example bos1)
Type: String
PublicRouteTableId:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtulio both public and private subnets work well for local zone, I think customer may choose different subnet on demand, how about to change this to LocalZoneRouteTableId, LocalZoneSubnetCidr, LocalZoneSubnet etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yunjiang29 I agree for renaming LocalZoneSubnetCidr, but renaming the LocalZoneRouteTableId for this CloudFormation template could cause confusion, as the RouteTableId is not for Local Zones only, it is created on the VPC CloudFormation template.

Furthermore, to use private subnets on the Local Zones it requires extra steps to associate the Local Zone subntes to one of the PrivateRouteTable within the Regular Region, as the Local Zones do not support Nat Gateway, so it requires a more complex setup which is not covered here. As we are demonstrating, and testing, the steps to set up public subnets when installing in existing VPC, I would suggest to do not mention the steps to use workers on private subnets in LZ.

I think users can customize the template and the deployment, I also think we can further create a guide demonstrating how to do it after GA.

Unless you have tested the scenario with private subnets, I would suggest skipping for now (it is also not covered on the Enhancement).

WDYT?

cc @kalexand-rh @GroceryBoyJr

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtulio Agree. Let's keep it as it is now.

As we are demonstrating, and testing, the steps to set up public subnets when installing in existing VPC, I would suggest to do not mention the steps to use workers on private subnets in LZ.

It makes sense, similar to UPI section , we just demonstrate in these section, user can customize the configuration to meet their requirement.

Unless you have tested the scenario with private subnets, I would suggest skipping for now (it is also not covered on the Enhancement).

We had tested Local Zone in private subnet, as mentioned above, using public subnet is reasonable.

cc @kalexand-rh @GroceryBoyJr

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not making any changes here for GA, but we can talk about adding another guide after GA.

Description: Public Route Table ID to associate the Local Zone subnet
Type: String
PublicSubnetCidr:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-4]))$
ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-24.
Default: 10.0.128.0/20
Description: CIDR block for Public Subnet
Type: String

Resources:
PublicSubnet:
Type: "AWS::EC2::Subnet"
Properties:
VpcId: !Ref VpcId
CidrBlock: !Ref PublicSubnetCidr
AvailabilityZone: !Ref LocalZoneName
Tags:
- Key: Name
Value: !Join
- ""
- [ !Ref ClusterName, "-public-", !Ref LocalZoneNameShort, "-1" ]
- Key: kubernetes.io/cluster/unmanaged
Value: "true"

PublicSubnetRouteTableAssociation:
Type: "AWS::EC2::SubnetRouteTableAssociation"
Properties:
SubnetId: !Ref PublicSubnet
RouteTableId: !Ref PublicRouteTableId

Outputs:
PublicSubnetIds:
Description: Subnet IDs of the public subnets.
Value:
!Join [
"",
[!Ref PublicSubnet]
]
----
====
Loading