Bug 1247291

Summary: Doc Errors with integrating external services
Product: OpenShift Container Platform Reporter: Ryan Howe <rhowe>
Component: DocumentationAssignee: brice <bfallonf>
Status: CLOSED CURRENTRELEASE QA Contact: Vikram Goyal <vigoyal>
Severity: medium Docs Contact: Vikram Goyal <vigoyal>
Priority: urgent    
Version: 3.0.0CC: jokerman, libra-onpremise-devel, mmccomas, nicholas_schuetz, pep, rhowe
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-23 23:12:03 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 Ryan Howe 2015-07-27 17:52:36 UTC
Document URL: 
https://access.redhat.com/beta/documentation/en/openshift-enterprise-30-developer-guide#external-mysql-database

https://docs.openshift.com/enterprise/3.0/dev_guide/integrating_external_services.html

Section Number and Name: Setting the Endpoints

Describe the issue: 

-Vague on how an existing application will use the services created. 

-In the example 9.2.2. Setting the Endpoints does the "name": "external-mysql-service" needs to equal a service created in the example "name": "example-mysql-service"

- Needs info on about how to edit endpoint once created.

- Information on how to test endpoints.

These are not defined in the examples:
EXTERNAL_MYSQL_SERVICE_SERVICE_HOST=<IP_Address>
EXTERNAL_MYSQL_SERVICE_SERVICE_PORT=<Port_Number>
MYSQL_PASSPHRASE=<MySQL_passphrase>



Suggestions for improvement:  More information needed to explain integration and testing this service. 

Additional information:

Comment 2 Ryan Howe 2015-07-27 19:32:10 UTC
None of the examples worked for me. I was able to change the configuration. 

Using the docs from 

https://github.com/GoogleCloudPlatform/kubernetes/blob/release-0.17/docs/services.md

Changing the endpoint configuration to look like this: 

# oc edit endpoints external-mysql-service


{
  "kind": "Endpoints",
  "apiVersion": "v1",
  "metadata": {
    "name": "external-mysql-service"
  },
"subsets": [
        {
            "addresses": [
                { "IP": "172.168.1.3" }
            ],
            "ports": [
                { "port": 3306 }
            ]
        }
    ]
}

Comment 3 Josep 'Pep' Turro Mauri 2015-07-31 14:04:12 UTC
Note that in the current version of the docs the service's spec.ports contains a name for the mysql port:

"ports": [
      {
        "name": "mysql",
        "protocol": "TCP",
        "port": 3306, ...


Then the endpoint definition seems to require a name too or it won't match, so it would be:

{
  "kind": "Endpoints",
  "apiVersion": "v1",
  "metadata": {
    "name": "external-mysql-service"
  },
  "subsets": [
        {
            "addresses": [
                { "IP": "172.168.1.3" }
            ],
            "ports": [
                { "port": 3306, "name": "mysql" }
            ]
        }
    ]
}

Comment 4 brice 2015-08-26 06:16:27 UTC
Ryan, Pep,

Some of this was approached in another recent BZ [1].

After reading through a lot of the stuff associated with this BZ, I'm pretty sure all that needed to happen was adding the "name" section to the endpoints example, which I've done. You can see the work here:

https://github.com/openshift/openshift-docs/pull/914

I believe creating and editing a service is presumed knowledge at this point in the docs. 

I'm also not too sure what you mean by the environment variables not being defined in the examples. I can see section, but the values would vary depending on the instance.

If there's anything more for this BZ, or if you disagree, please let me know. 

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1255906

Comment 6 brice 2015-09-09 23:37:34 UTC
Ok. PR has merged. The shift in versions shouldn't be an issue. 

FYI, follow up BZ about creating services is here:

https://bugzilla.redhat.com/show_bug.cgi?id=1260486