Skip to content

Commit b05d92c

Browse files
committed
creating release 4.13.0-rc.0 installing with ccm+csi
1 parent 5590d30 commit b05d92c

28 files changed

+989
-466
lines changed

docs/guides/OCI/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Guides for Oracle Cloud Infrastructure
2+
3+
> WIP
4+
5+
> TODO:
6+
7+
Create guides/docs for OCP/OKD on OCI:
8+
9+
- Installing a cluster with agnostic installation quickly (Platform=None)
10+
- Installing a cluster with Cloud Controller Manager using External provider (Platform=External)
11+
- Installing a cluster with External Cloud provider integration: CCM and `Platform External`
12+
- Installing a cluster with agnostic installation with Assisted Installer as a installation provider
13+
14+
Generic guides:
15+
16+
- Integrate new provider to the Ansible Collection (UPI stacks)
17+
- Adding CCM to existing integrated external provider
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# OCI Image Registry - Use S3 compatibility URL for persistent storage
2+
3+
> WIP
4+
5+
Steps to use the OCI S3 Compatibility API to set the persistent storage for the OpenShift Image Registry with OCI Bucket service.
6+
7+
Steps:
8+
9+
- Create access Key
10+
- Create the secret used by image-registry
11+
- Edit the image registry object adding the s3 configuration
12+
- Test it

docs/guides/OCI/oci-install-ccm.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
## Install a cluster on OCI with CCM
2+
3+
## Requirements
4+
5+
- Credentials
6+
- Client installed
7+
8+
## OCP Cluster Setup on OCI
9+
10+
### Generate the vars file
11+
12+
```bash
13+
cat <<EOF > ~/.oci/env
14+
# Compartment that the cluster will be installed
15+
OCI_COMPARTMENT_ID="<CHANGE_ME:ocid1.compartment.oc1.UUID>"
16+
17+
# Compartment that the DNS Zone is created (based domain)
18+
# Only RR will be added
19+
OCI_COMPARTMENT_ID_DNS="<CHANGE_ME:ocid1.compartment.oc1.UUID>"
20+
21+
# Compartment that the OS Image will be created
22+
OCI_COMPARTMENT_ID_IMAGE="<CHANGE_ME:ocid1.compartment.oc1.UUID>"
23+
EOF
24+
source ~/.oci/env
25+
26+
cat <<EOF > ~/.openshift/env
27+
export OCP_CUSTOM_RELEASE="docker.io/mtulio/ocp-release:latest"
28+
29+
OCP_RELEASE_413="quay.io/mrbraga/ocp-release:4.13.0-rc.0-x86_64_platexternal-kcmo-mco-3cmo"
30+
EOF
31+
source ~/.openshift/env
32+
33+
CLUSTER_NAME=oci-t13
34+
VAR_FILE=./vars-oci-ha_${CLUSTER_NAME}.yaml
35+
36+
cat <<EOF > ${VAR_FILE}
37+
provider: oci
38+
cluster_name: ${CLUSTER_NAME}
39+
config_cluster_region: us-sanjose-1
40+
41+
#TODO: create compartment validations
42+
#TODO: allow create compartment from a parent
43+
oci_compartment_id: ${OCI_COMPARTMENT_ID}
44+
oci_compartment_id_dns: ${OCI_COMPARTMENT_ID_DNS}
45+
oci_compartment_id_image: ${OCI_COMPARTMENT_ID_IMAGE}
46+
47+
cluster_profile: ha
48+
destroy_bootstrap: no
49+
50+
config_base_domain: splat-oci.devcluster.openshift.com
51+
config_ssh_key: "$(cat ~/.ssh/id_rsa.pub;cat ~/.ssh/openshift-dev.pub)"
52+
config_pull_secret_file: "${HOME}/.openshift/pull-secret-latest.json"
53+
54+
config_cluster_version: 4.13.0-rc.0
55+
version: 4.13.0-rc.0
56+
config_installer_environment:
57+
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: "$OCP_RELEASE_413"
58+
59+
# Define the OS Image mirror
60+
os_mirror: yes
61+
os_mirror_from: stream_artifacts
62+
os_mirror_stream:
63+
architecture: x86_64
64+
artifact: openstack
65+
format: qcow2.gz
66+
67+
os_mirror_to_provider: oci
68+
os_mirror_to_oci:
69+
compartment_id: ${OCI_COMPARTMENT_ID_IMAGE}
70+
bucket: rhcos-images
71+
image_type: QCOW2
72+
73+
## Apply patches to installer manifests (WIP)
74+
# TODO: we must keep the OCI CCM manifests patch more generic
75+
76+
config_patches:
77+
- rm-capi-machines
78+
- mc-kubelet-providerid
79+
- deploy-oci-ccm
80+
- deploy-oci-csi
81+
- yaml_patch
82+
83+
cfg_patch_yaml_patch_specs:
84+
## patch infra object to create External provider
85+
- manifest: /manifests/cluster-infrastructure-02-config.yml
86+
patch: '{"spec":{"platformSpec":{"type":"External","external":{"platformName":"oci"}}},"status":{"platform":"External","platformStatus":{"type":"External","external":{}}}}'
87+
88+
cfg_patch_kubelet_providerid_script: |
89+
PROVIDERID=\$(curl -H "Authorization: Bearer Oracle" -sL http://169.254.169.254/opc/v2/instance/ | jq -r .id);
90+
91+
EOF
92+
```
93+
94+
### Install the cluster
95+
96+
```bash
97+
ansible-playbook mtulio.okd_installer.create_all \
98+
-e certs_max_retries=20 \
99+
-e cert_wait_interval_sec=60 \
100+
-e @$VAR_FILE
101+
```
102+
103+
## Destroy
104+
105+
```bash
106+
ansible-playbook mtulio.okd_installer.destroy_cluster -e @$VAR_FILE
107+
```
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Installing in OCI with build-in examples
2+
3+
## Export variables
4+
5+
```bash
6+
export OKD_CONFIG_BASE_DOMAIN="<CHANGE_ME:base_domain_value>"
7+
export OCI_COMPARTMENT_ID="<CHANGE_ME:compartment_id>"
8+
export OCI_COMPARTMENT_ID_DNS="<CHANGE_ME:compartment_id>"
9+
export OCI_COMPARTMENT_ID_IMAGE="<CHANGE_ME:compartment_id>"
10+
export OS_MIRROR_IMAGE_BUCKET_NAME="rhcos-images"
11+
```
12+
13+
### Default vars
14+
15+
16+
## Installing
17+
18+
19+
### Installing a cluster on OCI with Platform Agnostic/None
20+
21+
> TODO
22+
23+
```bash
24+
ansible-playbook examples/create-cluster.yaml \
25+
-e cluster_name=name \
26+
-e @./examples/vars/common.yaml \
27+
-e @./examples/vars/oci/common.yaml \
28+
-e @./examples/vars/oci/ha-platform-none.yaml
29+
```
30+
31+
### Installing a cluster on OCI with Platform Agnostic/None with CSI Driver
32+
33+
```bash
34+
ansible-playbook examples/create-cluster.yaml \
35+
-e cluster_name=name \
36+
-e @./examples/vars/common.yaml \
37+
-e @./examples/vars/oci/common.yaml \
38+
-e @./examples/vars/oci/ha-platform-none-csi.yaml
39+
```
40+
41+
### Installing a cluster on OCI with Platform External
42+
43+
```bash
44+
ansible-playbook examples/create-cluster.yaml \
45+
-e cluster_name=name \
46+
-e @./examples/vars/common.yaml \
47+
-e @./examples/vars/oci/common.yaml \
48+
-e @./examples/vars/oci/ha-platform-external.yaml
49+
```
50+
51+
### Installing a cluster on OCI with Platform External with CCM
52+
53+
```bash
54+
ansible-playbook examples/create-cluster.yaml \
55+
-e cluster_name=name \
56+
-e @./examples/vars/common.yaml \
57+
-e @./examples/vars/oci/common.yaml \
58+
-e @./examples/vars/oci/ha-platform-external-ccm.yaml
59+
```
60+
61+
### Installing a cluster on OCI with Platform External with CCM and CSI Driver
62+
63+
```bash
64+
ansible-playbook examples/create-cluster.yaml \
65+
-e cluster_name=name \
66+
-e @./examples/vars/common.yaml \
67+
-e @./examples/vars/oci/common.yaml \
68+
-e @./examples/vars/oci/ha-platform-external-ccm-csi.yaml
69+
```
70+
71+
### Installing a cluster on OCI with Platform External with CSI Driver
72+
73+
> TODO: OCI CSI Driver can be installed in Platform None with manual changes
74+
75+
<!-- ### Installing a cluster on OCI with Platform None and Assisted Installer as Config Provider
76+
77+
```bash
78+
ansible-playbook examples/create-cluster.yaml \
79+
-e cluster_name=name \
80+
-e @./examples/vars/common.yaml \
81+
-e @./examples/vars/oci/common.yaml \
82+
-e @./examples/vars/oci/AI-ha-platform-none.yaml
83+
``` -->
84+
85+
### Destroy a cluster
86+
87+
```bash
88+
ansible-playbook mtulio.okd_installer.destroy_cluster \
89+
-e cluster_name=name
90+
```

0 commit comments

Comments
 (0)