From 0202c40d425de4391363747101d3ba013cb93763 Mon Sep 17 00:00:00 2001 From: Marco Braga Date: Sat, 21 Oct 2023 14:12:17 -0300 Subject: [PATCH] update instructions to deploy arm --- .../AWS/installing-quickly-agnostic-arm.md | 88 +++++++++++++++++++ .../OCI/installing-customization-infra.md | 2 +- .../guides/OCI/installing-quickly-agnostic.md | 22 +++-- .../guides/OCI/installing-quickly-external.md | 19 +++- .../vars/oci/profiles/ha/node-compute.yaml | 4 +- .../oci/profiles/ha/node-controlplane.yaml | 4 +- 6 files changed, 125 insertions(+), 14 deletions(-) create mode 100644 docs/guides/AWS/installing-quickly-agnostic-arm.md diff --git a/docs/guides/AWS/installing-quickly-agnostic-arm.md b/docs/guides/AWS/installing-quickly-agnostic-arm.md new file mode 100644 index 0000000..fd2d628 --- /dev/null +++ b/docs/guides/AWS/installing-quickly-agnostic-arm.md @@ -0,0 +1,88 @@ +# Installing a cluster quickly on OCI with platform agnostic (None) + +The steps below describes how to validate the OpenShift cluster installed +in an agnostic installation using standard topology. + +## Prerequisites + +--8<-- "docs/modules/pre-env-creds-aws.md" + +## Setup + +--8<-- "docs/modules/pre-env-distributions.md" + +### Export the emvironment variables for cloud provider + +--8<-- "docs/modules/pre-env-aws-none.md" +--8<-- "docs/modules/pre-env-cfg.md" + +### Create the okd-installer var file + +--8<-- "docs/modules/pre-cfg-varfile.md" + +- Discovery the AMI: + +```bash +DISTRIBUTION="ocp" +RELEASE_REPO="quay.io/openshift-release-dev/ocp-release" +VERSION="4.14.0-rc.6" +#RELEASE_VERSION="${VERSION}-x86_64" +PULL_SECRET_FILE="${HOME}/.openshift/pull-secret-latest.json" + +# Provider Information +export CONFIG_PROVIDER=aws +export CONFIG_PLATFORM=none + +# Cluster Install Configuration +CLUSTER_NAME="aws-n412rc6a0" +CLUSTER_REGION=us-east-1 +CLUSTER_DOMAIN="devcluster.openshift.com" +VARS_FILE=./vars_${DISTRIBUTION}-${CLUSTER_NAME}.yaml + +# okd-installer config +cat < ${VARS_FILE} +provider: ${CONFIG_PROVIDER} +config_platform: ${CONFIG_PLATFORM} +cluster_name: ${CLUSTER_NAME} +config_cluster_region: ${CLUSTER_REGION} + +config_cluster_version: ${VERSION} +version: ${VERSION} + +config_default_architecture: arm64 +controlplane_instance: m6g.xlarge +compute_instance: m6g.xlarge + +cluster_profile: ha +destroy_bootstrap: no + +config_base_domain: ${CLUSTER_DOMAIN} +config_ssh_key: "$(cat ~/.ssh/openshift-dev.pub)" +config_pull_secret_file: "${PULL_SECRET_FILE}" +EOF + +# Install the clients (installer) and extract the image ID from stream information. +ansible-playbook mtulio.okd_installer.install_clients -e @$VARS_FILE + +IMAGE_ID=$(~/.ansible/okd-installer/bin/openshift-install-linux-${VERSION} coreos print-stream-json | jq -r ".architectures[\"aarch64\"].images.aws.regions[\"$CLUSTER_REGION\"].image") + +cat <> ${VARS_FILE} +custom_image_id: ${IMAGE_ID} +EOF + +# create the cluster +ansible-playbook mtulio.okd_installer.create_all \ + -e cert_max_retries=30 \ + -e cert_wait_interval_sec=60 \ + -e @$VARS_FILE +``` + +## Install + +--8<-- "docs/modules/play-create_all.md" + +--8<-- "docs/modules/play-approve_certs.md" + +## Destroy + +--8<-- "docs/modules/play-destroy_cluster.md" \ No newline at end of file diff --git a/docs/guides/OCI/installing-customization-infra.md b/docs/guides/OCI/installing-customization-infra.md index 6787c2f..3dc60b9 100644 --- a/docs/guides/OCI/installing-customization-infra.md +++ b/docs/guides/OCI/installing-customization-infra.md @@ -1,3 +1,3 @@ > TODO -- Describe how to customize infra deployment changing default vars +- Describe how to customize infra deployment changing default vars (inherit from AWS) diff --git a/docs/guides/OCI/installing-quickly-agnostic.md b/docs/guides/OCI/installing-quickly-agnostic.md index 500c54c..5625cc2 100644 --- a/docs/guides/OCI/installing-quickly-agnostic.md +++ b/docs/guides/OCI/installing-quickly-agnostic.md @@ -54,13 +54,15 @@ OCP_RELEASE_413="quay.io/mrbraga/ocp-release:4.13.0-rc.0-x86_64_platexternal-kcm EOF source ~/.openshift/env -CLUSTER_NAME=oci-e414rc0 +CLUSTER_NAME=oci-e414rc6ad3 VARS_FILE=./vars-oci-ha_${CLUSTER_NAME}.yaml cat < ${VARS_FILE} provider: oci cluster_name: ${CLUSTER_NAME} -config_cluster_region: us-sanjose-1 + +config_cluster_region: us-ashburn-1 +config_base_domain: us-ashburn-1.splat-oci.devcluster.openshift.com #TODO: create compartment validations #TODO: allow create compartment from a parent @@ -71,12 +73,11 @@ oci_compartment_id_image: ${OCI_COMPARTMENT_ID_IMAGE} cluster_profile: ha destroy_bootstrap: no -config_base_domain: splat-oci.devcluster.openshift.com config_ssh_key: "$(cat ~/.ssh/id_rsa.pub;cat ~/.ssh/openshift-dev.pub)" config_pull_secret_file: "${HOME}/.openshift/pull-secret-latest.json" -config_cluster_version: 4.14.0-rc.0 -version: 4.14.0-rc.0 +config_cluster_version: 4.14.0-rc.6 +version: 4.14.0-rc.6 # config_installer_environment: # OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: "quay.io/mrbraga/ocp-release:4.14.0-rc.0-x86_64_platexternal-kcmo-mco-3cmo" @@ -122,6 +123,17 @@ oci_ccm_version: v1.25.0 #compute_shape: "BM.Standard.E2.64" #compute_shape_config: {} +# spread nodes between "AZs" +oci_availability_domains: +- gzqB:US-ASHBURN-AD-1 +- gzqB:US-ASHBURN-AD-2 +- gzqB:US-ASHBURN-AD-3 + +oci_fault_domains: +- FAULT-DOMAIN-1 +- FAULT-DOMAIN-2 +- FAULT-DOMAIN-3 + EOF ``` diff --git a/docs/guides/OCI/installing-quickly-external.md b/docs/guides/OCI/installing-quickly-external.md index bdfa230..f37ea16 100644 --- a/docs/guides/OCI/installing-quickly-external.md +++ b/docs/guides/OCI/installing-quickly-external.md @@ -31,13 +31,15 @@ Create the vars file for okd-installer collection: ```bash # MCO patch without revendor (w/o disabling FG) -CLUSTER_NAME=oci-e414rc2 +CLUSTER_NAME=oci-e414rc2ad3v1 VARS_FILE=./vars-oci-ha_${CLUSTER_NAME}.yaml cat < ${VARS_FILE} provider: oci cluster_name: ${CLUSTER_NAME} -config_cluster_region: us-sanjose-1 + +config_cluster_region: us-ashburn-1 +config_base_domain: us-ashburn-1.splat-oci.devcluster.openshift.com oci_compartment_id: ${OCI_COMPARTMENT_ID} oci_compartment_id_dns: ${OCI_COMPARTMENT_ID_DNS} @@ -46,8 +48,6 @@ oci_compartment_id_image: ${OCI_COMPARTMENT_ID_IMAGE} cluster_profile: ha destroy_bootstrap: no -config_base_domain: splat-oci.devcluster.openshift.com - config_ssh_key: "$(cat ~/.ssh/openshift-dev.pub)" config_pull_secret_file: "${HOME}/.openshift/pull-secret-latest.json" @@ -95,6 +95,17 @@ os_mirror_to_oci: # Mount control plane as a second volume # cfg_patch_mc_varlibetcd: # device_path: /dev/sdb + +# spread nodes between "AZs" +oci_availability_domains: +- gzqB:US-ASHBURN-AD-1 +- gzqB:US-ASHBURN-AD-2 +- gzqB:US-ASHBURN-AD-3 + +oci_fault_domains: +- FAULT-DOMAIN-1 +- FAULT-DOMAIN-2 +- FAULT-DOMAIN-3 EOF ``` diff --git a/playbooks/vars/oci/profiles/ha/node-compute.yaml b/playbooks/vars/oci/profiles/ha/node-compute.yaml index 6087ab1..c0e4d09 100644 --- a/playbooks/vars/oci/profiles/ha/node-compute.yaml +++ b/playbooks/vars/oci/profiles/ha/node-compute.yaml @@ -12,8 +12,8 @@ _shape_config_default: #node_compute_single_fault_domain: FAULT-DOMAIN-1 default_availability_domain: "gzqB:US-ASHBURN-AD-1" default_fault_domain: FAULT-DOMAIN-1 -_compute_availability_domain: "{{ oci_availability_domains }}" -_compute_fault_domains: "{{ oci_fault_domains }}" +_compute_availability_domain: "{{ oci_availability_domains | d([default_availability_domain]) }}" +_compute_fault_domains: "{{ oci_fault_domains | d([default_fault_domain]) }}" _shape: "{{ compute_shape | d('VM.Standard.E4.Flex') }}" _shape_config: "{{ compute_shape_config | d(_shape_config_default) }}" diff --git a/playbooks/vars/oci/profiles/ha/node-controlplane.yaml b/playbooks/vars/oci/profiles/ha/node-controlplane.yaml index afbe836..8fe6a68 100644 --- a/playbooks/vars/oci/profiles/ha/node-controlplane.yaml +++ b/playbooks/vars/oci/profiles/ha/node-controlplane.yaml @@ -17,8 +17,8 @@ _shape_config: #node_controlplane_single_fault_domain: "FAULT-DOMAIN-1" default_availability_domain: "gzqB:US-ASHBURN-AD-1" default_fault_domain: FAULT-DOMAIN-1 -_controlplane_availability_domain: "{{ oci_availability_domains }}" -_controlplane_fault_domains: "{{ oci_fault_domains }}" +_controlplane_availability_domain: "{{ oci_availability_domains | d([default_availability_domain]) }}" +_controlplane_fault_domains: "{{ oci_fault_domains | d([default_fault_domain]) }}" _agent_config: are_all_plugins_disabled: true