Skip to content

Commit

Permalink
update instructions to deploy arm
Browse files Browse the repository at this point in the history
  • Loading branch information
mtulio committed Oct 21, 2023
1 parent 459b509 commit 0202c40
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 14 deletions.
88 changes: 88 additions & 0 deletions docs/guides/AWS/installing-quickly-agnostic-arm.md
Original file line number Diff line number Diff line change
@@ -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 <<EOF > ${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 <<EOF >> ${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"
2 changes: 1 addition & 1 deletion docs/guides/OCI/installing-customization-infra.md
Original file line number Diff line number Diff line change
@@ -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)
22 changes: 17 additions & 5 deletions docs/guides/OCI/installing-quickly-agnostic.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF > ${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
Expand All @@ -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"
Expand Down Expand Up @@ -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

```
Expand Down
19 changes: 15 additions & 4 deletions docs/guides/OCI/installing-quickly-external.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF > ${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}
Expand All @@ -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"
Expand Down Expand Up @@ -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
```

Expand Down
4 changes: 2 additions & 2 deletions playbooks/vars/oci/profiles/ha/node-compute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}"
Expand Down
4 changes: 2 additions & 2 deletions playbooks/vars/oci/profiles/ha/node-controlplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0202c40

Please sign in to comment.