-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add registry storage configuration modules #14390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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: <region-name> | ||
| ---- | ||
|
|
||
| . 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`: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you delete all s3 part on AWS with UPI, it will be generated automatically, admin doesn't need to input manually.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Admin may want to create a cluster with credentials that doesn't allow to create buckets. In this case the administrator should configure it manually. |
||
| + | ||
| ---- | ||
| $ oc edit configs.imageregistry.operator.openshift.io/cluster | ||
|
|
||
| storage: | ||
| s3: | ||
| bucket: <bucket-name> | ||
| region: <region-name> | ||
| ---- | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adambkaplan @dmage - would either of you be able to provide the procedures for these two steps or point me to where I can find them? Thanks! . To configure your registry to use storage, change the . Provide a suitable persistent volume. |
||
| 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 | ||
|
bmcelvee marked this conversation as resolved.
Outdated
|
||
|
|
||
| storage: | ||
| pvc: | ||
| claim: | ||
| ---- | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What am I looking for here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. $oc edit configs.imageregistry.operator.openshift.io If you leave the claim name to be blank, a pvc named image-registry-storage will be created automatically. |
||
| + | ||
| 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 | ||
| //---- | ||
|
|
||
| | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. | ||
|
|
||
|
bmcelvee marked this conversation as resolved.
Outdated
|
||
| .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 | ||
| //---- | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you change the registry storage after installation? Do they need to go here, or just in the installation assemblies? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, you can, as long as you are admin : ) vsphere and baremetal UPI installation should configure storage after installation, as original installation will prompt storage not configured error. |
||
|
|
||
| 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] | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command is invalid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When UPI on AWS cluster is ready, s3 storage is automatically configured.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wzheng1 this is only true if the cluster admin/installer provides an AWS account that has permission to create S3 buckets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should reference AWS docs on how to create an S3 bucket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether this doc works? https://docs.aws.amazon.com/AmazonS3/latest/gsg/GetStartedWithS3.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AWS UPI doc says that you need the S3 permission to create a bucket, and the steps as written have you create a bucket to store your bootstrap ignition config.