From 749b501bf3d7cf85a95f933a6a90dce7a597da8a Mon Sep 17 00:00:00 2001 From: bmcelvee Date: Wed, 10 Apr 2019 10:12:51 -0400 Subject: [PATCH] Add registry storage configuration modules --- .../registry-configuring-storage-aws-upi.adoc | 48 +++++++++++++++ ...egistry-configuring-storage-baremetal.adoc | 59 +++++++++++++++++++ .../registry-configuring-storage-vsphere.adoc | 57 ++++++++++++++++++ registry/configuring-registry-operator.adoc | 8 +++ 4 files changed, 172 insertions(+) create mode 100644 modules/registry-configuring-storage-aws-upi.adoc create mode 100644 modules/registry-configuring-storage-baremetal.adoc create mode 100644 modules/registry-configuring-storage-vsphere.adoc diff --git a/modules/registry-configuring-storage-aws-upi.adoc b/modules/registry-configuring-storage-aws-upi.adoc new file mode 100644 index 000000000000..3ebf44d0a265 --- /dev/null +++ b/modules/registry-configuring-storage-aws-upi.adoc @@ -0,0 +1,48 @@ +// Module included in the following assemblies: +// +//* architecture/installation-.adoc + +[id="registry-configuring-storage-aws-upi_{context}"] += Configuring registry storage for AWS with user-provisioned infrastructure + +During installation, your cloud credentials are sufficient to create an S3 bucket +and the Registry Operator will automatically configure storage. + +If the Registry Operator cannot create an S3 bucket, and automatically configure +storage, you can create a S3 bucket and configure storage with the following +procedure. + +.Prerequisites + +* A cluster on AWS with user-provisioned infrastructure. + +.Procedure + +Use the following procedure if the Registry Operator cannot create an S3 bucket +and automatically configure storage. + +. Create a S3 bucket: ++ +---- +$ oc create configs.imageregistry.operator.openshift.io + +storage: + s3: + bucket: + region: +---- + +. Set up a link:https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config[Bucket Lifecycle Policy] +to abort incomplete multipart uploads that are one day old. + +. Fill in the storage configuration in +`configs.imageregistry.operator.openshift.io/cluster`: ++ +---- +$ oc edit configs.imageregistry.operator.openshift.io/cluster + +storage: + s3: + bucket: + region: +---- diff --git a/modules/registry-configuring-storage-baremetal.adoc b/modules/registry-configuring-storage-baremetal.adoc new file mode 100644 index 000000000000..271a8a06ce6f --- /dev/null +++ b/modules/registry-configuring-storage-baremetal.adoc @@ -0,0 +1,59 @@ +// Module included in the following assemblies: +// +//* architecture/installation-.adoc + +[id="registry-configuring-storage-baremetal_{context}"] += Configuring registry storage for bare metal + +As a cluster administrator, following installation you must configure your +registry to use storage. + +.Prerequisites + +* Cluster administrator permissions. +* A cluster on bare metal. +* A provisioned persistent volume (PV) with `ReadWriteMany` access mode, such as +Azure File or NFS. +* Must have "100Gi" capacity. + +.Procedure + +. To configure your registry to use storage, change the `spec.storage.pvc` in +the `configs.imageregistry/cluster` resource. + +. Verify you do not have a registry pod: ++ +---- +$ oc get configs.imageregistry.operator.openshift.io/cluster -o yaml +---- + +. Check the registry configuration: ++ +---- +$ oc edit configs.imageregistry.operator.openshift.io + +storage: +pvc: +claim: +---- ++ +Leave the `claim` field blank to allow the automatic creation of an +`image-registry-storage` PVC. + +. Check the `clusteroperator` status: ++ +---- +$ oc get clusteroperator image-registry +---- +//+ +//There will be warning similar to: +//+ +//---- +//- lastTransitionTime: 2019-03-26T12:45:46Z +//message: storage backend not configured +//reason: StorageNotConfigured +//status: "True" +//type: Degraded +//---- + +​​ diff --git a/modules/registry-configuring-storage-vsphere.adoc b/modules/registry-configuring-storage-vsphere.adoc new file mode 100644 index 000000000000..fe8d5a25e034 --- /dev/null +++ b/modules/registry-configuring-storage-vsphere.adoc @@ -0,0 +1,57 @@ +// Module included in the following assemblies: +// +//* architecture/installation-.adoc + +[id="registry-configuring-storage-vsphere_{context}"] += Configuring registry storage for vSphere + +As a cluster administrator, following installation you must configure your +registry to use storage. + +.Prerequisites + +* Cluster administrator permissions. +* A cluster on vSphere. +* A provisioned persistent volume (PV) with `ReadWriteMany` access mode, such as +Azure File or NFS. +* Must have "100Gi" capacity. + +.Procedure + +. To configure your registry to use storage, change the `spec.storage.pvc` in the +`configs.imageregistry/cluster` resource. + +. Verify you do not have a registry pod: ++ +---- +$ oc get pod -n openshift-image-registry +---- + +. Check the registry configuration: ++ +---- +$ oc edit configs.imageregistry.operator.openshift.io + +storage: +pvc: +claim: +---- ++ +Leave the `claim` field blank to allow the automatic creation of an +`image-registry-storage` PVC. + +. Check the `clusteroperator` status: ++ +---- +$ oc get clusteroperator image-registry +---- +//+ +//There will be warning similar to: +//+ +//---- +//- lastTransitionTime: 2019-03-26T12:45:46Z +//message: storage backend not configured +//reason: StorageNotConfigured +//status: "True" +//type: Degraded +//---- diff --git a/registry/configuring-registry-operator.adoc b/registry/configuring-registry-operator.adoc index 970caf13281e..2d0eebba17fd 100644 --- a/registry/configuring-registry-operator.adoc +++ b/registry/configuring-registry-operator.adoc @@ -35,3 +35,11 @@ include::modules/registry-operator-configuration-resource-overview.adoc[leveloff include::modules/registry-operator-config-resources.adoc[leveloffset=+1] include::modules/registry-operator-default-crd.adoc[leveloffset=+1] + +== Configuring Image Registry Storage + +include::modules/registry-configuring-storage-aws-upi.adoc[leveloffset=+2] + +include::modules/registry-configuring-storage-baremetal.adoc[leveloffset=+2] + +include::modules/registry-configuring-storage-vsphere.adoc[leveloffset=+2]