Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch CAPA template to external cloud provider by default #387

Merged
merged 2 commits into from
Aug 15, 2024
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: 2 additions & 2 deletions image-builder/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ endif
## Platform and version combinations
## --------------------------------------

AWS_BUILD_NAMES ?= aws-opensuse-leap-155
AWS_BUILD_NAMES ?= aws-opensuse-leap-156

## --------------------------------------
## Dynamic build targets
Expand All @@ -71,5 +71,5 @@ $(AWS_BUILD_TARGETS):
## Document dynamic build targets
## --------------------------------------
##@ Builds
build-aws-opensuse-leap-155: ## Builds an AMI for OpenSUSE Leap 15.5
build-aws-opensuse-leap-156: ## Builds an AMI for OpenSUSE Leap 15.6
build-aws-all: $(AWS_BUILD_TARGETS) ## Builds all AMIs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"ami_filter_name": "openSUSE-Leap-15-5-v20240311-hvm-ssd-x86_64-5535c495-72d4-4355-b169-54ffa874f849",
"ami_filter_name": "openSUSE-Leap-15-6-v20240703-hvm-ssd-x86_64-5535c495-72d4-4355-b169-54ffa874f849",
"ami_filter_owners": "679593333241",
"ami_regions": "us-west-1",
"build_name": "openSUSE-leap-15.5-rke2",
"build_name": "openSUSE-leap-15.6-rke2",
"distribution": "openSUSE",
"distribution_release": "Leap",
"distribution_version": "15.5",
"distribution_version": "15.6",
"root_device_name": "/dev/sda1",
"source_ami": "",
"ssh_username": "ec2-user",
Expand Down
10 changes: 3 additions & 7 deletions samples/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@ clusterctl init --bootstrap rke2 --control-plane rke2 --infrastructure aws

Before creating a workload clusters, it is required to build an AMI for the RKE2 version that is going to be installed on the cluster. You can follow the steps in the [image-builder README](../../image-builder/README.md#aws) to build the AMI.

The `internal` folder contains cluster templates to deploy an RKE2 cluster on AWS using the internal cloud provider (is DEPRECATED in favor of the external one), and the `external` folder contains the cluster templates to deploy a cluster with the external cloud provider.

We will use the `internal` one for this guide, however the same steps apply for the `external` example.

You will need to set the following environment variables:

```bash
export CONTROL_PLANE_MACHINE_COUNT=3
export WORKER_MACHINE_COUNT=1
export RKE2_VERSION=v1.26.0+rke2r1
export RKE2_VERSION=v1.30.2+rke2r1
export AWS_NODE_MACHINE_TYPE=t3a.large
export AWS_CONTROL_PLANE_MACHINE_TYPE=t3a.large
export AWS_SSH_KEY_NAME="aws-ssh-key"
Expand All @@ -40,7 +36,7 @@ export AWS_AMI_ID="ami-id"
Now, we can generate the YAML files from the templates using `clusterctl generate yaml` command:

```bash
clusterctl generate cluster --from https://github.com/rancher/cluster-api-provider-rke2/blob/main/samples/aws/internal/cluster-template.yaml -n example-aws rke2-aws > aws-rke2-clusterctl.yaml
clusterctl generate cluster --from https://github.com/rancher/cluster-api-provider-rke2/blob/main/samples/aws/cluster-template.yaml -n example-aws rke2-aws > aws-rke2-clusterctl.yaml
```

After examining the result YAML file, you can apply to the management cluster using :
Expand Down Expand Up @@ -98,6 +94,6 @@ export AWS_S3_BUCKET_NAME=<YOUR_AWS_S3_BUCKET_NAME>
Now you can generate manifests from the cluster template:

```bash
clusterctl generate cluster --from https://github.com/rancher/cluster-api-provider-rke2/blob/main/samples/aws/ignition-external/cluster-template-aws-ignition-external-cloud-provider.yaml -n example-aws rke2-aws > aws-rke2-clusterctl.yaml
clusterctl generate cluster --from https://github.com/rancher/cluster-api-provider-rke2/blob/main/samples/aws/ignition/cluster-template-ignition.yaml -n example-aws rke2-aws > aws-rke2-clusterctl.yaml
```

Loading
Loading