Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add description about common configuration file and environment variables #13

Open
yumaoka opened this issue Jul 22, 2016 · 4 comments
Open
Labels

Comments

@yumaoka
Copy link
Contributor

yumaoka commented Jul 22, 2016

GP SDKs and tools should support common configuration file (JSON file which store credentials and options) and/or environment variables. We should have a page explaining these configuration file/variables in this repository, so GP SDKs/tools can link to the page.

@srl295
Copy link
Contributor

srl295 commented Jul 25, 2016

format for gp-config.json -

{
 "credentials": { … } 
}

@srl295
Copy link
Contributor

srl295 commented Aug 1, 2016

Perhaps mention that cf csk and related could be used from the command line to work with credentials.

cf csk mygp mykey
cf service-key mygp mykey | tail +2 > creds.json

@srl295
Copy link
Contributor

srl295 commented Feb 22, 2017

also the credentials url should end in /rest per IBM-Cloud/gp-js-client#33

@yumaoka
Copy link
Contributor Author

yumaoka commented Feb 22, 2017

Bluemix console "Credentials" tab for a service shows -

{
  "url": "https://gp-rest.ng.bluemix.net/translate/rest",
  "userId": "2ba50aeb88e61a371c9906e569a950f3",
  "password": "3UTlbuS/igbWn1MshQ66GEn4LNMIMDw2",
  "instanceId": "49c520f1208e6c27388e9ac4ec0358ec"
}

Connections - view credentials in App page shows -

{
  "gp-test": [
    {
      "credentials": {
        "url": "https://gp-rest.ng.bluemix.net/translate/rest",
        "userId": "c5bd4c4a6c578f9c835fa57b7981915d",
        "password": "ImhQN0xKIGZCaRDpA/b3QLY62akqzKjz",
        "instanceId": "1581368afcb8e40c0b10f889f3a32662"
      },
      "syslog_drain_url": null,
      "label": "gp-test",
      "provider": null,
      "plan": "standard",
      "name": "yoshito-gp-test",
      "tags": [
        "dev_ops",
        "ibm_created",
        "ibm_dedicated_public",
        "ibm_release"
      ]
    }
  ]
}

My preference is to use the first one as the primary format when credentials are provided in a JSON format for client SDK and tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants