Deploying an application to Cloud Foundry
We now have our PWS account set up and working, and we also have our cf CLI installed and working. Now we just want to push a simple application to see it run on Cloud Foundry. To do that, we must do a few things:
- Set the target Cloud Foundry instance so that our cf CLI knows where we are pushing our application bits.
- Log in to the targeted Cloud Foundry instance using the cf CLI.
- Push our simple app.
Targeting Pivotal cf API endpoint
What could make more sense than to target the Cloud Foundry instance you want to deploy your application into? To do that, you must set the Cloud Foundry API endpoint to which your cf CLI will issue commands. Behind the scenes, your cf CLI will have a back-and-forth conversation with the Cloud Foundry instance using RESTful calls. And, as with all RESTful calls, you must have an API endpoint to communicate with.
To set the API endpoint to PWS, type the following command in your Terminal:
$ cf api https://api.run.pivotal.io...