openshift: improve prepare error handling, add OKD notes (#250)
This commit is contained in:
parent
0f9f13b07f
commit
9b4342380f
|
@ -31,11 +31,18 @@ From the [OpenShift GCP UPI documentation](https://cloud.redhat.com/openshift/in
|
|||
- the Command Line CLI
|
||||
- your pull secret
|
||||
|
||||
*Optional:* if you want to use a specific GCP RHCOS image, download it from the [RedHat library](https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.7/4.7.7/), then import it as a GCE image and configure the relevant Terraform variable before bootstrap. An alternative is to run through the install steps manually via the `prepare.py` script, and use the GCP image shared by the ``rhcos-cloud` project set in the Machine manifests.
|
||||
*Optional:* if you want to use a specific GCP RHCOS image, download it from the [RedHat library](https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.7/4.7.7/), then import it as a GCE image and configure the relevant Terraform variable before bootstrap. An alternative is to run through the install steps manually via the `prepare.py` script, and use the GCP image shared by the ``rhcos-cloud` project set in the `Machine` manifests. Once you have an image URL, set it in the `rhcos_image` Terraform variable.
|
||||
|
||||
### OKD
|
||||
|
||||
For OKD, use the [OKD installer](https://github.com/openshift/okd/releases), and prepare an FCOS machine image on GCP after [downloading the raw file](https://getfedora.org/en/coreos/download?tab=cloud_operators&stream=stable). If the `prepare.py` command fails, run the installer by hand and check for missing system packages (eg on Debian you might need to install `libvirt0`).
|
||||
For OKD you need to use
|
||||
|
||||
- the [OKD installer](https://github.com/openshift/okd/releases)
|
||||
- an FCOS image
|
||||
|
||||
For FCOS, you can [download the raw file for GCP](https://getfedora.org/en/coreos/download?tab=cloud_operators&stream=stable) and prepare an image, or use the one from the Machine manifests (a recent one is in a comment in the `variables.tf` file for convenience). Then set the image URL in the `rhcos_image` Terraform variable
|
||||
|
||||
If the `prepare.py` command fails, check error messages for missing system packages (eg on Debian you might need to install `libvirt0`).
|
||||
|
||||
### GCP projects and VPC
|
||||
|
||||
|
|
|
@ -92,8 +92,8 @@ def _run_installer(cmdline, env=None):
|
|||
out = out.decode('utf-8', errors='ignore')
|
||||
err = err.decode('utf-8', errors='ignore')
|
||||
retcode = p.returncode
|
||||
if retcode == 1:
|
||||
raise Error(f'Return error from command ({retcode}): {out} {err}')
|
||||
if retcode > 0:
|
||||
raise Error(f'Error in openshift-installer ({retcode}): {err}')
|
||||
|
||||
|
||||
@click.group(invoke_without_command=True,
|
||||
|
|
|
@ -116,7 +116,9 @@ variable "region" {
|
|||
variable "rhcos_gcp_image" {
|
||||
description = "RHCOS image used."
|
||||
type = string
|
||||
default = "projects/rhcos-cloud/global/images/rhcos-47-83-202102090044-0-gcp-x86-64"
|
||||
# okd
|
||||
# default = "projects/fedora-coreos-cloud/global/images/fedora-coreos-33-20210217-3-0-gcp-x86-64"
|
||||
default = "projects/rhcos-cloud/global/images/rhcos-47-83-202102090044-0-gcp-x86-64"
|
||||
}
|
||||
|
||||
variable "service_project" {
|
||||
|
|
Loading…
Reference in New Issue