diff --git a/docs/guides/AWS/installing-quickly-agnostic.md b/docs/guides/AWS/installing-quickly-agnostic.md index c6a47e8..87ebb67 100644 --- a/docs/guides/AWS/installing-quickly-agnostic.md +++ b/docs/guides/AWS/installing-quickly-agnostic.md @@ -20,6 +20,17 @@ in an agnostic installation using standard topology. --8<-- "docs/modules/pre-cfg-varfile.md" +- Discovery the AMI: + +```bash +cat < ${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" diff --git a/docs/guides/OCI/installing-quickly-external.md b/docs/guides/OCI/installing-quickly-external.md index d542526..9d3b873 100644 --- a/docs/guides/OCI/installing-quickly-external.md +++ b/docs/guides/OCI/installing-quickly-external.md @@ -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 < ~/.oci/env @@ -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 \ @@ -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 diff --git a/docs/modules/play-destroy_cluster.sh b/docs/modules/play-destroy_cluster.sh index bfb6134..b33373a 100644 --- a/docs/modules/play-destroy_cluster.sh +++ b/docs/modules/play-destroy_cluster.sh @@ -1,3 +1 @@ -ansible-playbook mtulio.okd_installer.destroy_cluster \ - -e provider=${CONFIG_PROVIDER} \ - -e cluster_name=${CONFIG_CLUSTER_NAME} \ No newline at end of file +ansible-playbook mtulio.okd_installer.destroy_cluster -e @$VARS_FILE \ No newline at end of file diff --git a/docs/modules/pre-cfg-varfile.sh b/docs/modules/pre-cfg-varfile.sh index 83cebb7..dfd8bc9 100644 --- a/docs/modules/pre-cfg-varfile.sh +++ b/docs/modules/pre-cfg-varfile.sh @@ -1,6 +1,7 @@ # okd-installer config cat < ${VARS_FILE} -provider: ${PROVIDER} +provider: ${CONFIG_PROVIDER} +config_platform: ${CONFIG_PLATFORM} cluster_name: ${CLUSTER_NAME} config_cluster_region: ${CLUSTER_REGION} diff --git a/playbooks/vars/aws/profiles/HighlyAvailable/node-bootstrap.yaml b/playbooks/vars/aws/profiles/HighlyAvailable/node-bootstrap.yaml index 966bcb9..f4c72f8 100644 --- a/playbooks/vars/aws/profiles/HighlyAvailable/node-bootstrap.yaml +++ b/playbooks/vars/aws/profiles/HighlyAvailable/node-bootstrap.yaml @@ -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" diff --git a/playbooks/vars/aws/profiles/HighlyAvailable/node-compute.yaml b/playbooks/vars/aws/profiles/HighlyAvailable/node-compute.yaml index d510475..80a814f 100644 --- a/playbooks/vars/aws/profiles/HighlyAvailable/node-compute.yaml +++ b/playbooks/vars/aws/profiles/HighlyAvailable/node-compute.yaml @@ -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 }}" diff --git a/playbooks/vars/aws/profiles/HighlyAvailable/node-controlplane.yaml b/playbooks/vars/aws/profiles/HighlyAvailable/node-controlplane.yaml index e672597..4427db8 100644 --- a/playbooks/vars/aws/profiles/HighlyAvailable/node-controlplane.yaml +++ b/playbooks/vars/aws/profiles/HighlyAvailable/node-controlplane.yaml @@ -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"