Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use Cloud Foundry to login to IBM Bluemix?

Tags:

ibm-cloud

I am trying to get started using IBM Bluemix and want to use the Cloud Foundry CLI to login and manage my applications. But I cannot figure out how to login using the cf command. I think what I am missing is the API endpoint I need to provide for the cf login command:

cf login -a [API_URL] -u [USERNAME] -p [PASSWORD]

I suspect I use my IBM ID username and password, but I'm not sure about the API_URL. Seems like this should be an easy question to search, but I have not been able to find an answer.

like image 338
Henry DeAngelis Avatar asked Apr 23 '15 18:04

Henry DeAngelis


2 Answers

You set the api endpoint like this:

cf api https://api.ng.bluemix.net

and then you login with cf login.

Alternatively you can use the European endpoint:

cf api https://api.eu-gb.bluemix.net

EDIT:

Alternatively, as you were implying, you can pass the API endpoint to cf login directly via the -a option:

cf login -a https://api.ng.bluemix.net -u <ibm.com id>
like image 84
Moldova Avatar answered Nov 25 '22 14:11

Moldova


Found the answer to my question. The API endpoint for IBM bluemix is https://api.ng.bluemix.net. That was the key piece of information I was missing to login to IBM Bluemix using the Cloud Foundry CLI:

cf login -a https://api.ng.bluemix.net -u <IBM ID Name> -p <IBM ID Password>

I'm impressed with how easy the rest of the cf command is to manage apps.

like image 20
Henry DeAngelis Avatar answered Nov 25 '22 16:11

Henry DeAngelis