Bug 1421139 - [Doc RFE] Document how to define a CNS-deployed volume in OpenShift's docker registry as the storage back end for the OpenShift registry.
Summary: [Doc RFE] Document how to define a CNS-deployed volume in OpenShift's docker ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: doc-Container_Native_Storage_with_OpenShift
Version: cns-3.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: CNS 3.5
Assignee: Bhavana
QA Contact: Prasanth
URL:
Whiteboard:
: 1427286 (view as bug list)
Depends On:
Blocks: 1415610
TreeView+ depends on / blocked
 
Reported: 2017-02-10 12:27 UTC by Anjana Suparna Sriram
Modified: 2017-11-17 05:20 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-17 05:15:42 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1415763 0 unspecified CLOSED [RFE] Make gluster a backend for Openshift Registry. 2021-02-22 00:41:40 UTC

Internal Links: 1415763

Description Anjana Suparna Sriram 2017-02-10 12:27:42 UTC
Additional info:
- [from Humble) We may document in  OCP documentation or have a separate section in CNS 3.5 guide for setting it up (TBD)
- The discussion about bringing cns-deployed volume as a backend for the registry is WIP.

Comment 4 khartsoe@redhat.com 2017-03-17 19:25:57 UTC
(new chapter after 5. Creating Persistent Volumes):

Ch. 6 Updating the registry with Container-Native Storage as the storage back-end
      6.1 Validate the Openshift Container Platform registry deployment
      6.2 Convert the Openshift Container Platform registry with 
           Container-Native Storage

Source document has been tested/validated by QE:
https://docs.google.com/document/d/1-MJ9v6pOHUKeVlo228JgkaxiLQLIyPjbMgOX8am2KhU/edit#heading=h.acrko97fmcmb

Comment 5 Anjana Suparna Sriram 2017-03-20 06:04:03 UTC
*** Bug 1427286 has been marked as a duplicate of this bug. ***

Comment 7 Bhavana 2017-04-11 07:31:49 UTC
Hi Jose,

I have retained the flow of content as mentioned in comment 4 by Ken. Here is the updated link: 

http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-Red_Hat_Gluster_Storage-3.5-Container_Native_Storage_with_OpenShift_Platform-branch-BZ-1421139-Registry/lastSuccessfulBuild/artifact/tmp/en-US/html-single/index.html#chap-Documentation-Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-Updating_Registry

Please review the same and share your comments.


Also, in the following google doc, "Migration of registry data from old volume to new volume" is added as optional. I was not sure if I have to include this in the doc, as there were couple of comments associated with it too. I have a place holder for it in the doc though. Let me know if you want me to go ahead and add that step or omit it.

https://docs.google.com/document/d/1-MJ9v6pOHUKeVlo228JgkaxiLQLIyPjbMgOX8am2KhU/edit#heading=h.acrko97fmcmb

Comment 8 Mohamed Ashiq 2017-04-13 10:31:04 UTC
1)

Link has to be changed from openshift docs to redhat product doc.

chapter 6 inital para

https://docs.openshift.com/container-platform/3.4/install_config/registry/index.html  ->  https://access.redhat.com/documentation/en-us/openshift_container_platform/3.5/html-single/installation_and_configuration/#setting-up-the-registry

2)
`# oc login` output has to be revisit it is changed for 3.5.

3)
sec 6.2, point 2, Note

Red Hat Gluster Storage -> Red Hat Gluster Storage Registry

4)

sec 6.2, point 10, second command needs output or remove the second command as it is a verification step.

5)

sec 6.2, point 11 and 12 should be interchanged. 12 should come before point 11.

6)

sec 6.2 there are two steps for verifying the pv create. I prefer remove point 14.

7)

6.2, step 23 is not valid. It is migration step for which you have left a step 20.

I would prefer moving the step 20 above step 19. Mention this step is optional if you want migrate the content of old registry to new.
Steps are(from the jose's doc)

Make the old registry readonly:
# oc set env dc/docker-registry REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED=true

Add the gluster registry to the old registry dc
# oc volume dc/docker-registry --add --name=gluster-registry-storage -m /gluster-registry -t pvc --claim-name=gluster-registry-claim

Save the Registry pod name
# export REGISTRY_POD=$(oc get po --selector="docker-registry=default" -o go-template --template='{{printf "%s" ((index .items 0).metadata.name)}}')

Run rsync of data from old registry to gluster registry
# oc rsync $REGISTRY_POD:/registry/ $REGISTRY_POD:/gluster-registry/

Remove the gluster registry form the old dc registry
# oc volume dc/docker-registry --remove --name=gluster-registry-storage

Make the registry read write
# oc set env dc/docker-registry REGISTRY_STORAGE_MAINTENANCE_READONLY_ENABLED-

Comment 10 Bhavana 2017-04-13 11:05:47 UTC
Thanks for the review comments Ashiq. I have incorporated all the comments and following is the updated link:

http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-Red_Hat_Gluster_Storage-3.5-Container_Native_Storage_with_OpenShift_Platform-branch-BZ-1421139-Registry/lastSuccessfulBuild/artifact/tmp/en-US/html-single/index.html#chap-Documentation-Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-Updating_Registry

Jose,

Can you please take a final look at this and let me know if you have any further comments before I move this to ON QA ?

Thanks!

Comment 11 Jose A. Rivera 2017-04-13 14:00:21 UTC
Sorry for the delay!

1.) In the intro paragraph to CH. 6, right before the link to the doc, "refer" should be "refer to"

2.) Ch 6.2 step 2: "heketi-storage-endpoint" should be "gluster-registry-endpoints.yaml file" and be bolded

3.) Ch 6.2 step 3: "Remove all the metadata except for name." should be "Remove all the metadata except for name, leaving everything else the same."

4.) Ch 6.2 step 4: "endpoints" should be "endpoint"

5.) Ch 6.2 step 5: "endpoints" should be "endpoint"

6.) Ch 6.2 step 6: "to create the Heketi services" should be "to create the gluster-registry-service.yaml file" and be bolded

7.) Ch 6.2 step 8: "services" should be "service"

8.) Ch 6.2 step 9: "services" should be "service"

9.) Ch 6.2 step 10: "GID" should be "fsGroup GID"

10.) CH 6.2 step 18: There is a step missing. Between e and f, insert the following:

Swap the existing registry storage volume for the new GlusterFS volume:
oc volume dc/docker-registry --add --name=registry-storage -t pvc --claim-name=gluster-registry-claim --overwrite

11.) Ch 6.2: steps 19, 20, and 21 should be removed entirely

Comment 13 Jose A. Rivera 2017-04-13 14:58:47 UTC
D'oh! I just noticed another thing:

Ch 6.1, steps 2 and 3: "To verify if" should be "To verify that"

Comment 17 Mark LaBonte 2017-05-05 16:49:54 UTC
Hi, in order to convert the registry to use cns storage then shouldn't step 18-f be mandatory? Otherwise by following steps 1 - 17, we've just created a volume without adding it to the registry dc. It just seems a bit misleading to list this as an optional step:


# oc volume dc/docker-registry --add --name=registry-storage -t pvc --claim-name=gluster-registry-claim --overwrite


Note You need to log in before you can comment on or make changes to this bug.