简体   繁体   中英

How to get VCAP_SERVICES environment variables WITHOUT binding to an application?

Frequently, I'm create standalone services in Bluemix. For example, Analytics for Apache Hadoop, Cloudant and DashDB.

I don't need an application to work with these services, but it seems I have to bind to an application just to get access to the VCAP_SERVICES environment variables with urls, usernames, passwords, etc.

Question : How to get VCAP_SERVICES environment variables WITHOUT binding to an application?

For many services, you will have to bind them to an app in order to get the VCAP_SERVICES credentials.

There is a service key capability which some services are starting to adopt which allows you to create and access credentials without binding to an app. Using the cf command line tool, the commands below are available to use if a service supports them:

SERVICES:
   create-service-key, csk                       Create key for a service instance
   service-keys, sk                              List keys for a service instance
   service-key                                   Show service key info
   delete-service-key, dsk                       Delete a service key

The CloudFoundry docs at https://docs.cloudfoundry.org/devguide/services/service-keys.html provide more detail.

In the Bluemix UI, you would see a 'Service Credentials' option in the panel when viewing a service dashboard when a service supports this capability. Selecting this option allows you to see credentials that have been created as well as an "Add Credentials" button to create new ones.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM