Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions modules/registry-configuring-storage-aws-upi.adoc
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
Copy link
Copy Markdown

@wzheng1 wzheng1 Apr 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command is invalid.

Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

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.


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`:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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>
----
59 changes: 59 additions & 0 deletions modules/registry-configuring-storage-baremetal.adoc
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
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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 spec.storage.pvc in
the configs.imageregistry/cluster resource.

. 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
Comment thread
bmcelvee marked this conversation as resolved.
Outdated

storage:
pvc:
claim:
----
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What am I looking for here?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$oc edit configs.imageregistry.operator.openshift.io
storage:
pvc:
claim:

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
//----

​​
57 changes: 57 additions & 0 deletions modules/registry-configuring-storage-vsphere.adoc
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.

Comment thread
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
//----
8 changes: 8 additions & 0 deletions registry/configuring-registry-operator.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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]