Access App Details in IBM Cloud Foundry Using CF CLI

4 views
Skip to first unread message

r poon

unread,
Aug 28, 2018, 12:31:13 PM8/28/18
to Machine Intelligence and Data Science WonderCorp
I just learned this Cloud Foundry way to access the app (each app is a User in the Linux VM) in details.

0.You need to install Cloud Foundry CLI - https://docs.cloudfoundry.org/cf-cli/install-go-cli.html and use an installer for your platform.

1. After installed **cf cli**, then one way is to use: **cf ssh <appname>** with your usual username and pw. 
(cf is the Cloud Foundry CLI that you can download and install)

after you login, it is like a Linux VM with your app as user name:

2. **An example** is shown below (cf ssh is like login to a linux machine):

L:\IBM Cloud\PythonFlaskLab>cf ssh CommunityPythonFlaskTrialLR



 vcap@xxxxxxxxxxxxxxxxxx:~$ dir

 app  deps  logs  staging_info.yml  tmp

 vcap@xxxxxxxxxxxxxxxxxx:~$ cd app

 vcap@xxxxxxxxxxxxxxxxxx:~/app$ dir

 LICENSE  manifest.yml  NOTICE  Procfile  README.md  requirements.txt  static    welcome.py

You can use Linux scp to send to whatever PC or server with a FQDN name.


3. You can use:  cf apps   to view all your apps

L:\IBM Cloud\PythonFlaskLab>cf apps
Getting apps in org rp...@abrs.net / space dev as rp...@abrs.net...
OK

name                              requested state   instances   memory   disk   urls
abrsserver1                       started           1/1         32M      1G    abrsserver1.mybluemix.net
Community Python Flask Trial LR   started           1/1         128M     1G     Community-Python-Flask-Trial-LR.mybluemix.net
RPcourseraIOT                     started           1/1         256M     1G     RPcourseraIOT.mybluemix.net

This would be a more manual process (compared with the plug in which yet to try out) but it let you know what is going on under the hood or edit your app directly on the cloud vm or for trouble shooting and move around.

r poon

unread,
Aug 28, 2018, 1:31:34 PM8/28/18
to Machine Intelligence and Data Science WonderCorp
What was missing is you need to :
  1. After installed cf cli, then one way is first to log into your api end point (the path before the command prompt > are just my path to a local server/pc) typically where the downloaded / local app codes are located:

L:\IBM Cloud\PythonFlaskLab>cf login 


Email> rp...@abrs.net

Password> xxxxxxxxx Authenticating... OK

  1. L:\IBM Cloud\PythonFlaskLab>cf api https://api.ng.bluemix.net
  2. Setting api endpoint to https://api.ng.bluemix.net...
  3. OK

  4. Next(follow as the early post)
Reply all
Reply to author
Forward
0 new messages