Developing software in the Real World

CLI credentials for a Cloud Foundry database

If you need access to your Cloud Foundry database from the command line the easiest way to get a set of credentials is to create a service key. This is done using the command cf create-service-key {service-name} {key-name}. You can call the key anything, so to connect to my database that I created previously: $ cf create-service-key slim-bookshelf-db ROB_CLI Creating service key ROB_CLI for service instance slim-bookshelf-db as… OK Now that we've set up… continue reading.

Using PostgreSQL with PHP in Cloud Foundry

Having successfully deployed a PHP application to Cloud Foundry, I needed a PostgreSQL database for persistent storage. I found Lorna Mitchell's Connecting PHP to MySQL on Bluemix helpful and this article expands on that information. I want to create a cloud-based PostgreSQL database and connect it to Laravel's Eloquent in a Cloud Foundry application. This is how to do it. Create the database instance As I'm using Bluemix for my Cloud Foundry hosting, I'm using… continue reading.

Deploying a PHP application to Cloud Foundry

I recently had a requirement to deploy a Slim application somewhere. As I already have a Bluemix account, it seemed sensible to deploy it to their Application Runtimes service which is an installation of the Open Source Cloud Foundry project. This turned out to be quite easy, but there are a number of steps involved, so I'm documenting it here. Setup the CLI tools I'm a command line person, so did it all via the… continue reading.