Bug 1408796 - Openshift service and endpoints sample files references to be altered.
Summary: Openshift service and endpoints sample files references to be altered.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: doc-Container_Native_Storage_with_OpenShift
Version: cns-3.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: CNS 3.4
Assignee: Divya
QA Contact: Prasanth
URL:
Whiteboard:
Depends On:
Blocks: 1385254
TreeView+ depends on / blocked
 
Reported: 2016-12-27 09:59 UTC by Mohamed Ashiq
Modified: 2017-01-23 07:21 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-23 07:21:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Mohamed Ashiq 2016-12-27 09:59:20 UTC
Description of problem:
Openshift service and endpoints sample files references to be altered. As we do not have the sample files in the path. should give the content of sample file instead of giving reference to the path.

Changes should be made in static provisioning section:

5.1. Static Provisioning of Volumes:

Remove the below line:
"The sample glusterfs-endpoints.json file (sample-gluster-endpoint.json) and the sample glusterfs-service.json file (sample-gluster-service.json) are available at /usr/share/heketi/openshift/."

Update the first Step as following:
"Create the gluster-endpoint.json file with the endpoints to be created based on the environment. Each Red Hat Gluster Storage trusted storage pool requires its own endpoint with the IP of the nodes in the trusted storage pool."

Split the step 4 into two:

Step 4 should be:
"Create a service file the created endpoint."
Add "# cat sample-gluster-service.json" with output here.

Step 5 should be:
"Execute the following command to create a gluster service: "
Then 

"
# oc create -f <name_of_service_file>

For example:

# oc create -f sample-gluster-service.json
service "glusterfs-cluster" created

"

Comment 1 Mohamed Ashiq 2016-12-27 13:43:41 UTC
(In reply to Mohamed Ashiq from comment #0)
> Description of problem:
> Openshift service and endpoints sample files references to be altered. As we
> do not have the sample files in the path. should give the content of sample
> file instead of giving reference to the path.
> 
> Changes should be made in static provisioning section:
> 
> 5.1. Static Provisioning of Volumes:
> 
> Remove the below line:
> "The sample glusterfs-endpoints.json file (sample-gluster-endpoint.json) and
> the sample glusterfs-service.json file (sample-gluster-service.json) are
> available at /usr/share/heketi/openshift/."
> 
> Update the first Step as following:
> "Create the gluster-endpoint.json file with the endpoints to be created
> based on the environment. Each Red Hat Gluster Storage trusted storage pool
> requires its own endpoint with the IP of the nodes in the trusted storage
> pool."
> 
> Split the step 4 into two:
> 
> Step 4 should be:
> "Create a service file the created endpoint."
> Add "# cat sample-gluster-service.json" with output here.
> 
> Step 5 should be:
> "Execute the following command to create a gluster service: "
> Then 
> 
> "
> # oc create -f <name_of_service_file>
> 
> For example:
> 
> # oc create -f sample-gluster-service.json
> service "glusterfs-cluster" created
> 
> "

Above comment is not valid as we have decided to take in BZ#1408410 for current release. Steps needed to be changed are:

5.1. Static Provisioning of Volumes:

Change the line to:

"The sample glusterfs-endpoints.json file (sample-gluster-endpoint.yaml) and the sample glusterfs-service.json file (sample-gluster-service.yaml) are available at /usr/share/heketi/openshift/. "

"To specify the endpoints you want to create, update the sample-gluster-endpoint.yaml file with the endpoints to be created based on the environment. Each Red Hat Gluster Storage trusted storage pool requires its own endpoint with the IP of the nodes in the trusted storage pool."

***OUTPUT will be Provided***

In Step 2:

"# oc create -f sample-gluster-endpoints.yaml"

In Step 4:

"# oc create -f sample-gluster-service.yaml"

"# cat sample-gluster-service.yaml"
***OUTPUT will be provided***

Comment 2 Mohamed Ashiq 2016-12-29 07:51:17 UTC
In 5.1:

step 9

change  "storage ": "1Gi"  to 

 "storage": "1Gi"

Comment 3 Mohamed Ashiq 2016-12-30 06:15:57 UTC
Hi, 

The file location has been changed from  "/usr/share/heketi/openshift/" to "/usr/share/heketi/templates/". 

First output or endpoints output is:

apiVersion: v1
kind: Endpoints
metadata:
  name: glusterfs-cluster
subsets:
- addresses:
  - ip: 192.168.10.100
  ports:
  - port: 1
- addresses:
  - ip: 192.168.10.101
  ports:
  - port: 1
- addresses:
  - ip: 192.168.10.102
  ports:
  - port: 1


Second Output or service output is:

apiVersion: v1
kind: Service
metadata:
  name: glusterfs-cluster
spec:
  ports:
  - port: 1


Regards,
Ashiq

Comment 4 Humble Chirammal 2016-12-30 07:27:21 UTC
sample-gluster-service.yaml and sample-gluster-endpoints.yaml  are the filenames.

Comment 6 Prasanth 2017-01-09 10:38:21 UTC
(In reply to Divya from comment #5)
> Updated section "5.1. Static Provisioning of Volumes" based on the
> suggestions listed in the bug.
> 
> Link to the doc:
> http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-
> Red_Hat_Gluster_Storage-3.4-Container_Native_Storage_with_OpenShift_Platform-
> branch-master/lastSuccessfulBuild/artifact/tmp/en-US/html-single/index.
> html#chap-Documentation-
> Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-
> OpenShift_Creating_Persistent_Volumes-Static_Prov


* The output given for "sample-gluster-endpoints.yaml" is the old file in '.json' format. You need to replace it with the new '.yaml' output provided by Ashiq.


* The output given for "sample-gluster-service.yaml" is also the old file in '.json' format. You need to replace it with the new '.yaml' output provided by Ashiq.

Comment 8 Prasanth 2017-01-10 12:25:17 UTC
(In reply to Divya from comment #7)
> I have updated the format of the "sample-gluster-endpoints.yaml" and
> "sample-gluster-service.yaml" files to YAML.
> 
> Link to the doc:
> http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-
> Red_Hat_Gluster_Storage-3.4-Container_Native_Storage_with_OpenShift_Platform-
> branch-master/lastSuccessfulBuild/artifact/tmp/en-US/html-single/index.
> html#chap-Documentation-
> Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-
> OpenShift_Creating_Persistent_Volumes-Static_Prov

I don't see your changes in the above given link. See below:

###########
 To specify the endpoints you want to create, update the sample-gluster-endpoints.yaml file with the endpoints to be created based on the environment. Each Red Hat Gluster Storage trusted storage pool requires its own endpoint with the IP of the nodes in the trusted storage pool.

{
  "apiVersion": "v1",
  "kind": "Endpoints",
  "metadata": {
    "name": "glusterfs-cluster"
  },
  "subsets": [
    {
      "addresses": [
        {
          "ip": "192.168.121.168"
        }
      ],
      "ports": [
        {
          "port": 1
        }
      ]
    },
    {
      "addresses": [
        {
          "ip": "192.168.121.172"
        }
      ],
      "ports": [
        {
          "port": 1
        }
      ]
    },
    {
      "addresses": [
        {
          "ip": "192.168.121.233"
        }
      ],
      "ports": [
        {
          "port": 1
        }
      ]
    }
  ]
}
######################


#####################
# cat sample-gluster-service.yaml

{
  "apiVersion": "v1",
  "kind": "Service",
  "metadata": {
    "name": "glusterfs-cluster"
  },
  "spec": {
    "ports": [
      {"port": 1}
    ]
  }
}
#####################

I can see the .json format in other areas in the guide as well. Do replace all the .json examples to .yaml, wherever it is applicable.

Comment 9 Divya 2017-01-10 13:27:22 UTC



(In reply to Prasanth from comment #8)
> (In reply to Divya from comment #7)
> > I have updated the format of the "sample-gluster-endpoints.yaml" and
> > "sample-gluster-service.yaml" files to YAML.
> > 
> > Link to the doc:
> > http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-
> > Red_Hat_Gluster_Storage-3.4-Container_Native_Storage_with_OpenShift_Platform-
> > branch-master/lastSuccessfulBuild/artifact/tmp/en-US/html-single/index.
> > html#chap-Documentation-
> > Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-
> > OpenShift_Creating_Persistent_Volumes-Static_Prov
> 
> I don't see your changes in the above given link. See below:
> 
Prasanth,

I had made the changes but not sure if it got reverted due to merge conflicts.

Link to the doc: http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-Red_Hat_Gluster_Storage-3.4-Container_Native_Storage_with_OpenShift_Platform-branch-master/lastSuccessfulBuild/artifact/tmp/en-US/html-single/index.html#chap-Documentation-Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-OpenShift_Creating_Persistent_Volumes-Static_Prov


> I can see the .json format in other areas in the guide as well. Do replace
> all the .json examples to .yaml, wherever it is applicable.

I agree that there are instances of both .json and .yaml file format examples in the guide. It is important that all the examples must be replaced to .yaml format to maintain consistency.

As this is going to be an RFE, I have raised bug https://bugzilla.redhat.com/show_bug.cgi?id=1411781 and will be addressed asap.

Comment 10 Prasanth 2017-01-10 14:04:31 UTC
(In reply to Divya from comment #9)
> I had made the changes but not sure if it got reverted due to merge
> conflicts.
> 
> Link to the doc:
> http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-
> Red_Hat_Gluster_Storage-3.4-Container_Native_Storage_with_OpenShift_Platform-
> branch-master/lastSuccessfulBuild/artifact/tmp/en-US/html-single/index.
> html#chap-Documentation-
> Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-
> OpenShift_Creating_Persistent_Volumes-Static_Prov
> 
> 
> > I can see the .json format in other areas in the guide as well. Do replace
> > all the .json examples to .yaml, wherever it is applicable.

Yea. now I see the changes in the above link. However, I think the formatting is NOT proper for these examples and so copy-pasting from the doc may not work for *any* user. See Comment 3 or below output for the exact outputs:

################
# cat sample-gluster-endpoints.yaml
apiVersion: v1
kind: Endpoints
metadata:
  name: glusterfs-cluster
subsets:
- addresses:
  - ip: 192.168.10.100
  ports:
  - port: 1
- addresses:
  - ip: 192.168.10.101
  ports:
  - port: 1
- addresses:
  - ip: 192.168.10.102
  ports:
  - port: 1

# cat sample-gluster-service.yaml
apiVersion: v1
kind: Service
metadata:
  name: glusterfs-cluster
spec:
  ports:
  - port: 1
################

Comment 11 Divya 2017-01-10 15:46:42 UTC
> Yea. now I see the changes in the above link. However, I think the
> formatting is NOT proper for these examples and so copy-pasting from the doc
> may not work for *any* user. See Comment 3 or below output for the exact
> outputs:

My bad, I used an outline tool to convert json to yaml and pasted it to the doc. Did not notice the format/spacing issue.

I have now updated the doc based on the output you shared in Comment 10.

Link to the doc: http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-Red_Hat_Gluster_Storage-3.4-Container_Native_Storage_with_OpenShift_Platform-branch-master/lastSuccessfulBuild/artifact/tmp/en-US/html-single/index.html#chap-Documentation-Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-OpenShift_Creating_Persistent_Volumes-Static_Prov

Comment 12 Prasanth 2017-01-11 07:22:56 UTC
(In reply to Divya from comment #11)
> > Yea. now I see the changes in the above link. However, I think the
> > formatting is NOT proper for these examples and so copy-pasting from the doc
> > may not work for *any* user. See Comment 3 or below output for the exact
> > outputs:
> 
> My bad, I used an outline tool to convert json to yaml and pasted it to the
> doc. Did not notice the format/spacing issue.
> 
> I have now updated the doc based on the output you shared in Comment 10.

Ok, thanks.

> 
> Link to the doc:
> http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-
> Red_Hat_Gluster_Storage-3.4-Container_Native_Storage_with_OpenShift_Platform-
> branch-master/lastSuccessfulBuild/artifact/tmp/en-US/html-single/index.
> html#chap-Documentation-
> Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-
> OpenShift_Creating_Persistent_Volumes-Static_Prov

Verified


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