Skip to content

Commit

Permalink
creating release 4.13.0-rc.0 installing with ccm+csi
Browse files Browse the repository at this point in the history
  • Loading branch information
mtulio committed Mar 28, 2023
1 parent 5590d30 commit 1d7f705
Show file tree
Hide file tree
Showing 28 changed files with 989 additions and 466 deletions.
17 changes: 17 additions & 0 deletions docs/guides/OCI/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Guides for Oracle Cloud Infrastructure

> WIP
> TODO:
Create guides/docs for OCP/OKD on OCI:

- Installing a cluster with agnostic installation quickly (Platform=None)
- Installing a cluster with Cloud Controller Manager using External provider (Platform=External)
- Installing a cluster with External Cloud provider integration: CCM and `Platform External`
- Installing a cluster with agnostic installation with Assisted Installer as a installation provider

Generic guides:

- Integrate new provider to the Ansible Collection (UPI stacks)
- Adding CCM to existing integrated external provider
12 changes: 12 additions & 0 deletions docs/guides/OCI/oci-image-registry-bucket.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# OCI Image Registry - Use S3 compatibility URL for persistent storage

> WIP
Steps to use the OCI S3 Compatibility API to set the persistent storage for the OpenShift Image Registry with OCI Bucket service.

Steps:

- Create access Key
- Create the secret used by image-registry
- Edit the image registry object adding the s3 configuration
- Test it
107 changes: 107 additions & 0 deletions docs/guides/OCI/oci-install-ccm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
## Install a cluster on OCI with CCM

## Requirements

- Credentials
- Client installed

## OCP Cluster Setup on OCI

### Generate the vars file

```bash
cat <<EOF > ~/.oci/env
# Compartment that the cluster will be installed
OCI_COMPARTMENT_ID="<CHANGE_ME:ocid1.compartment.oc1.UUID>"
# Compartment that the DNS Zone is created (based domain)
# Only RR will be added
OCI_COMPARTMENT_ID_DNS="<CHANGE_ME:ocid1.compartment.oc1.UUID>"
# Compartment that the OS Image will be created
OCI_COMPARTMENT_ID_IMAGE="<CHANGE_ME:ocid1.compartment.oc1.UUID>"
EOF
source ~/.oci/env

cat <<EOF > ~/.openshift/env
export OCP_CUSTOM_RELEASE="docker.io/mtulio/ocp-release:latest"
OCP_RELEASE_413="quay.io/mrbraga/ocp-release:4.13.0-rc.0-x86_64_platexternal-kcmo-mco-3cmo"
EOF
source ~/.openshift/env

CLUSTER_NAME=oci-t13
VAR_FILE=./vars-oci-ha_${CLUSTER_NAME}.yaml

cat <<EOF > ${VAR_FILE}
provider: oci
cluster_name: ${CLUSTER_NAME}
config_cluster_region: us-sanjose-1
#TODO: create compartment validations
#TODO: allow create compartment from a parent
oci_compartment_id: ${OCI_COMPARTMENT_ID}
oci_compartment_id_dns: ${OCI_COMPARTMENT_ID_DNS}
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.13.0-rc.0
version: 4.13.0-rc.0
config_installer_environment:
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: "$OCP_RELEASE_413"
# Define the OS Image mirror
os_mirror: yes
os_mirror_from: stream_artifacts
os_mirror_stream:
architecture: x86_64
artifact: openstack
format: qcow2.gz
os_mirror_to_provider: oci
os_mirror_to_oci:
compartment_id: ${OCI_COMPARTMENT_ID_IMAGE}
bucket: rhcos-images
image_type: QCOW2
## Apply patches to installer manifests (WIP)
# TODO: we must keep the OCI CCM manifests patch more generic
config_patches:
- rm-capi-machines
- mc-kubelet-providerid
- deploy-oci-ccm
- deploy-oci-csi
- yaml_patch
cfg_patch_yaml_patch_specs:
## patch infra object to create External provider
- manifest: /manifests/cluster-infrastructure-02-config.yml
patch: '{"spec":{"platformSpec":{"type":"External","external":{"platformName":"oci"}}},"status":{"platform":"External","platformStatus":{"type":"External","external":{}}}}'
cfg_patch_kubelet_providerid_script: |
PROVIDERID=\$(curl -H "Authorization: Bearer Oracle" -sL http://169.254.169.254/opc/v2/instance/ | jq -r .id);
EOF
```

### Install the cluster

```bash
ansible-playbook mtulio.okd_installer.create_all \
-e certs_max_retries=20 \
-e cert_wait_interval_sec=60 \
-e @$VAR_FILE
```

## Destroy

```bash
ansible-playbook mtulio.okd_installer.destroy_cluster -e @$VAR_FILE
```
90 changes: 90 additions & 0 deletions docs/guides/OCI/oci-installing-quickly-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Installing in OCI with build-in examples

## Export variables

```bash
export OKD_CONFIG_BASE_DOMAIN="splat-oci.devcluster.openshift.com"
export OCI_COMPARTMENT_ID="ocid1.compartment.oc1..aaaaaaaaovt4qpeqi7l4cfefzh7tnggbmbj26ccb3dmv23jwle3gsusqpkjq"
export OCI_COMPARTMENT_ID_DNS="ocid1.compartment.oc1..aaaaaaaabfwx2ct2vckgbmvqybfjvz5pblv4ctjcfxmfhdfspyfojyxtaj6q"
export OCI_COMPARTMENT_ID_IMAGE="ocid1.compartment.oc1..aaaaaaaabfwx2ct2vckgbmvqybfjvz5pblv4ctjcfxmfhdfspyfojyxtaj6q"
export OS_MIRROR_IMAGE_BUCKET_NAME="rhcos-images"
```

### Default vars


## Installing


### Installing a cluster on OCI with Platform Agnostic/None

> TODO
```bash
ansible-playbook examples/create-cluster.yaml \
-e cluster_name=name \
-e @./examples/vars/common.yaml \
-e @./examples/vars/oci/common.yaml \
-e @./examples/vars/oci/ha-platform-none.yaml
```

### Installing a cluster on OCI with Platform Agnostic/None with CSI Driver

```bash
ansible-playbook examples/create-cluster.yaml \
-e cluster_name=name \
-e @./examples/vars/common.yaml \
-e @./examples/vars/oci/common.yaml \
-e @./examples/vars/oci/ha-platform-none-csi.yaml
```

### Installing a cluster on OCI with Platform External

```bash
ansible-playbook examples/create-cluster.yaml \
-e cluster_name=name \
-e @./examples/vars/common.yaml \
-e @./examples/vars/oci/common.yaml \
-e @./examples/vars/oci/ha-platform-external.yaml
```

### Installing a cluster on OCI with Platform External with CCM

```bash
ansible-playbook examples/create-cluster.yaml \
-e cluster_name=name \
-e @./examples/vars/common.yaml \
-e @./examples/vars/oci/common.yaml \
-e @./examples/vars/oci/ha-platform-external-ccm.yaml
```

### Installing a cluster on OCI with Platform External with CCM and CSI Driver

```bash
ansible-playbook examples/create-cluster.yaml \
-e cluster_name=name \
-e @./examples/vars/common.yaml \
-e @./examples/vars/oci/common.yaml \
-e @./examples/vars/oci/ha-platform-external-ccm-csi.yaml
```

### Installing a cluster on OCI with Platform External with CSI Driver

> TODO: OCI CSI Driver can be installed in Platform None with manual changes
<!-- ### Installing a cluster on OCI with Platform None and Assisted Installer as Config Provider
```bash
ansible-playbook examples/create-cluster.yaml \
-e cluster_name=name \
-e @./examples/vars/common.yaml \
-e @./examples/vars/oci/common.yaml \
-e @./examples/vars/oci/AI-ha-platform-none.yaml
``` -->

### Destroy a cluster

```bash
ansible-playbook mtulio.okd_installer.destroy_cluster \
-e cluster_name=name
```
Loading

0 comments on commit 1d7f705

Please sign in to comment.