Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1436101

Summary: [DOCS] Documentation for heketi implementation
Product: OpenShift Container Platform Reporter: Miheer Salunke <misalunk>
Component: DocumentationAssignee: Gaurav Nelson <gnelson>
Status: CLOSED CURRENTRELEASE QA Contact: Wenkai Shi <weshi>
Severity: medium Docs Contact: Vikram Goyal <vigoyal>
Priority: high    
Version: 3.4.0CC: aos-bugs, hchiramm, jokerman, mmccomas, sreber, ssaha, weshi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: 3.7-release-plan
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-06 00:49:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miheer Salunke 2017-03-27 07:40:34 UTC
Document URL: Documentation does not appear to exist

Section Number and Name: N/A

Describe the issue:
-          We’re looking for instructions on how to deploy Container Resident Storage
-          The deploy architecture is based on a pre-existing installation of Red Hat Gluster Storage
-          To avoid introducing a Single point of failure by installing Heketi on a standalone server we need this to be housed in OpenShift
-          Heketi hosted in OpenShift needs to be able to communicate with the External Gluster Storage Pool

Comment 5 Gaurav Nelson 2017-10-03 01:56:40 UTC
Please check the updates in PR https://github.com/openshift/openshift-docs/pull/5364

Comment 6 Wenkai Shi 2017-10-13 08:13:04 UTC
Start from 3.6, installer could do the same task as PR [1], there is an example [2]. It's better than manual steps, why not encourage customer use this?

[1]. https://github.com/openshift/openshift-docs/pull/5364
[2]. https://github.com/openshift/openshift-ansible/blob/master/inventory/byo/hosts.byo.glusterfs.external.example

Comment 7 Gaurav Nelson 2017-10-17 01:32:48 UTC
Thank you Wenkai for looking this through. 

Should I replace instructions in 'Loading Topology' section to use this script[1]? 

Or 

should I replace 'Dynamically Provision a Volume' section with this script[1]?

[1] https://github.com/openshift/openshift-ansible/blob/master/inventory/byo/hosts.byo.glusterfs.external.example

Comment 8 Wenkai Shi 2017-10-19 08:24:40 UTC
The external.example I mentioned is for CRS, sorry for mistake. Follow [1] to install OCP, storage class will be created by default.

# oc get sc
NAME                TYPE
glusterfs-storage   kubernetes.io/glusterfs 

[1] https://raw.githubusercontent.com/openshift/openshift-ansible/master/inventory/byo/hosts.byo.glusterfs.native.example

Comment 9 Gaurav Nelson 2017-10-20 01:45:49 UTC
Thank you @wenkai for the updates, for all other examples we assume that OpenShift is already running and therefore we do not specify OCP installation. Maybe we can add note saying that if you install OCP using [1] you dont need to create a storage class because it is generated automatically (or something similar).

What do you think?

[1] https://raw.githubusercontent.com/openshift/openshift-ansible/master/inventory/byo/hosts.byo.glusterfs.native.example

Comment 10 Wenkai Shi 2017-10-20 04:55:47 UTC
(In reply to Gaurav Nelson from comment #9)
> Thank you @wenkai for the updates, for all other examples we assume that
> OpenShift is already running and therefore we do not specify OCP
> installation. Maybe we can add note saying that if you install OCP using [1]
> you dont need to create a storage class because it is generated
> automatically (or something similar).
> 
> What do you think?
> 
> [1]
> https://raw.githubusercontent.com/openshift/openshift-ansible/master/
> inventory/byo/hosts.byo.glusterfs.native.example

I take a review of [1].
Both [2] and [3] will create storageclass for 'Dynamically Provision a Volume', the different is [2] will create a Glsuterfs Cluster during install OCP, [3] will add a existing Glusterfs Cluster during install OCP.

[1]. https://github.com/openshift/openshift-docs/pull/5364
[2]. https://raw.githubusercontent.com/openshift/openshift-ansible/master/inventory/byo/hosts.byo.glusterfs.native.example
[3]. https://github.com/openshift/openshift-ansible/blob/master/inventory/byo/hosts.byo.glusterfs.external.example

Comment 11 Gaurav Nelson 2017-10-20 06:02:57 UTC
Since no other example talks about installing OCP, I am not including native[1] and external[2] byo example installation in final documentation. However I have updated the PR to include the following note:

----
If you installed {product-title} by using the BYO (Bring your own) OpenShift Ansible inventory configuration files for either native[1] or external[2] GlusterFS instance, the GlusterFS storageClass automatically get created during the installation. For such cases you can skip the following storageclass creation steps and directly proceed with creating persistent volume claim instruction.
----

Please review the PR https://github.com/openshift/openshift-docs/pull/5364

[1]. https://raw.githubusercontent.com/openshift/openshift-ansible/master/inventory/byo/hosts.byo.glusterfs.native.example
[2]. https://github.com/openshift/openshift-ansible/blob/master/inventory/byo/hosts.byo.glusterfs.external.example

Comment 12 Wenkai Shi 2017-10-20 06:17:25 UTC
(In reply to Gaurav Nelson from comment #11)
> Since no other example talks about installing OCP, I am not including
> native[1] and external[2] byo example installation in final documentation.
> However I have updated the PR to include the following note:
> 
> ----
> If you installed {product-title} by using the BYO (Bring your own) OpenShift
> Ansible inventory configuration files for either native[1] or external[2]
> GlusterFS instance, the GlusterFS storageClass automatically get created
> during the installation. For such cases you can skip the following
> storageclass creation steps and directly proceed with creating persistent
> volume claim instruction.
> ----
> 
> Please review the PR https://github.com/openshift/openshift-docs/pull/5364
> 
> [1].
> https://raw.githubusercontent.com/openshift/openshift-ansible/master/
> inventory/byo/hosts.byo.glusterfs.native.example
> [2].
> https://github.com/openshift/openshift-ansible/blob/master/inventory/byo/
> hosts.byo.glusterfs.external.example

Looks good to me.
Another problem, met this, some steps may missed:

# heketi-cli topology load --json=topology.json
Error: Unable to open config file

Comment 13 Gaurav Nelson 2017-10-24 01:49:19 UTC
Thank you @Wenkai Shi

I took those steps from an existing example in OpenShift docs form https://docs.openshift.com/container-platform/3.6/install_config/storage_examples/dedicated_gluster_dynamic_example.html#dedicated-glusterfs-dynamic-example-loading-topology

Also the updated instruction in PR has:

$ heketi-cli topology load --json=toplogy-sample.json

Can you please check if that works?

In case it does not, can you suggest an updated command that works?

Comment 14 Wenkai Shi 2017-10-26 06:28:13 UTC
With many times debug, I believe it cause there is a extra "," in line 179 of [1]. Remove it then "heketi-cli topology load --json=toplogy-sample.json" could works. Add same comment in PR too.
Here is an example from original: [2]

Also, I believe same issue should be fix in [3] too.

[1]. install_config/storage_examples/containerized_heketi_with_dedicated_gluster.adoc
[2]. https://github.com/heketi/heketi/blob/master/client/cli/go/topology-sample.json
[3]. https://docs.openshift.com/container-platform/3.6/install_config/storage_examples/dedicated_gluster_dynamic_example.html#dedicated-glusterfs-dynamic-example-loading-topology

Comment 15 Gaurav Nelson 2017-10-26 06:41:06 UTC
Thanks Wenkai,

I fixed it in the latest commit. Can you please check, and move the bug to verified?

Comment 16 Wenkai Shi 2017-10-26 07:36:23 UTC
Looks good to me :)