Skip to content

Commit

Permalink
update doc/guides for AWS and OCI
Browse files Browse the repository at this point in the history
  • Loading branch information
mtulio committed Sep 22, 2023
1 parent 6afdec6 commit dc65c90
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 11 deletions.
11 changes: 11 additions & 0 deletions docs/guides/AWS/installing-quickly-agnostic.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ in an agnostic installation using standard topology.

--8<-- "docs/modules/pre-cfg-varfile.md"

- Discovery the AMI:

```bash
cat <<EOF > ${VARS_FILE}
# discovery AMI ID: ~/.ansible/okd-installer/bin/openshift-install-linux-4.14.0-rc.0 coreos print-stream-json | jq -r '.architectures.x86_64.images.aws.regions["us-east-1"].image'
custom_image_id: ami-0a4a3456fc86deabc
EOF
```



## Install

--8<-- "docs/modules/play-create_all.md"
Expand Down
34 changes: 30 additions & 4 deletions docs/guides/OCI/installing-quickly-external.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Install an OCP cluster in OCI with Platform External as an option and OCI Cloud
- DNS Zone place the DNS zone and exported to variable `${}`
- Compartment used to store the RHCOS image exported to variable `${}`

## OCP Cluster Setup on OCI
## Setup with Platform External type and CCM

### Create the vars file
Create the vars file for okd-installer collection:

```bash
cat <<EOF > ~/.oci/env
Expand Down Expand Up @@ -88,7 +88,7 @@ oci_ccm_namespace: oci-cloud-controller-manager
EOF
```

### Install the cluster
## Install the cluster

```bash
ansible-playbook mtulio.okd_installer.create_all \
Expand All @@ -97,7 +97,33 @@ ansible-playbook mtulio.okd_installer.create_all \
-e @$VARS_FILE
```

### Destroy the cluster
### Approve certificates

```bash
oc get csr \
-o go-template='{{range .items}}{{if not .status}}{{.metadata.name}}{{"\n"}}{{end}}{{end}}' \
| xargs oc adm certificate approve
```

## Testing

Setup the test environment (internal registry, labeling and taint worker node, etc):

```bash
ansible-playbook opct-runner/opct-run-tool-preflight.yaml -e @$VARS_FILE
```

Run the tests:

> TMP note: remove the `-serial`
```bash
~/opct/bin/opct-devel run -w --plugins-image openshift-tests-provider-cert:devel-serial &&\
~/opct/bin/opct-devel retrieve &&\
~/opct/bin/opct-devel report *.tar.gz --save-to /tmp/results --server-skip
```

## Destroy the cluster

```bash
ansible-playbook mtulio.okd_installer.destroy_cluster -e @$VARS_FILE
Expand Down
4 changes: 1 addition & 3 deletions docs/modules/play-destroy_cluster.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
ansible-playbook mtulio.okd_installer.destroy_cluster \
-e provider=${CONFIG_PROVIDER} \
-e cluster_name=${CONFIG_CLUSTER_NAME}
ansible-playbook mtulio.okd_installer.destroy_cluster -e @$VARS_FILE
3 changes: 2 additions & 1 deletion docs/modules/pre-cfg-varfile.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# okd-installer config
cat <<EOF > ${VARS_FILE}
provider: ${PROVIDER}
provider: ${CONFIG_PROVIDER}
config_platform: ${CONFIG_PLATFORM}
cluster_name: ${CLUSTER_NAME}
config_cluster_region: ${CLUSTER_REGION}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ openshift_instance_type: "{{ controlplane_instance | d('m6i.xlarge') }}"
openshift_instance_profile: "{{ cluster_state.compute.iam_profile_bootstrap }}"
# TODO: fix image lookup for agnostic installations
#openshift_image_id: "{{ cluster_state.compute.image_id }}"
openshift_image_id: "ami-0722eb0819717090f"
openshift_image_id: "{{ custom_image_id | d('ami-0a4a3456fc86deabc') }}"
openshift_subnet_name: "{{ openshift_prefix }}-net-public-1a"
openshift_security_groups:
- "{{ openshift_prefix }}-bootstrap-sg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ openshift_instance_type: "{{ compute_instance | d('m6i.xlarge') }}"
openshift_instance_profile: "{{ cluster_state.compute.iam_profile_compute }}"
# TODO: fix image lookup for agnostic installations
#openshift_image_id: "{{ cluster_state.compute.image_id }}"
openshift_image_id: "ami-0722eb0819717090f"
openshift_image_id: "{{ custom_image_id | d('ami-0a4a3456fc86deabc') }}"
openshift_security_groups:
- "{{ openshift_prefix }}-compute-sg"
openshift_tags: "{{ cluster_state.tags }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ openshift_instance_type: "{{ controlplane_instance | d('m6i.xlarge') }}"
openshift_instance_profile: "{{ cluster_state.compute.iam_profile_controlplane }}"
# TODO: fix image lookup for agnostic installations
#openshift_image_id: "{{ custom_image_id |d(cluster_state.compute.image_id) }}"
openshift_image_id: "ami-0722eb0819717090f"
openshift_image_id: "{{ custom_image_id | d('ami-0a4a3456fc86deabc') }}"
openshift_security_groups:
- "{{ openshift_prefix }}-bootstrap-sg"
- "{{ openshift_prefix }}-controlplane-sg"
Expand Down

0 comments on commit dc65c90

Please sign in to comment.