by • August 27, 2014
We are thrilled to announce that the DreamFactory open source REST API Platform now runs great on IBM Bluemix. DreamFactory supports a large community of modern developers working on phone and tablet applications. In many cases, client developers want the backend platform to “just work” so that they can focus on user experience and application design. Platform as a Service (PaaS) systems are a perfect platform for them, because they can upload an image of their local development environment and scale the backend instances without having to worry about server-side hosting issues. But up until now, there was no REST API platform available that installs on PaaS systems like Bluemix.
I am writing this blog to step you through installing DreamFactory on Bluemix, and explaining some of the basics along the way. I have also included a few short movies that show an overview of the installation process. The second movie shows how to connect the Cloudant NoSQL database to your account as well.
Movie One: Installing DreamFactory on Bluemix
Movie Two: Installing Cloudant on DreamFactory Setting Up DreamFactory
With PaaS systems like Bluemix there is no persistent storage on the server side. Because of this, your application must be bound to an external SQL database, and Bluemix provides a number of options for this. You also cannot edit web application files or server-side scripts in the cloud. In this case, you would just be editing the file in temporary local storage.
There are two simple solutions for this. If you don’t need local web files or server-side scripting, then just grab our source code from GitHub and push that. You can run the DreamFactory Admin Console on Bluemix and configure your platform from there. Your modifications are saved in the SQL database.
Or you can run DreamFactory on the local desktop, and develop and debug your applications from there. We have Bitnami installers for Linux, OS X, and Windows. When you push the desktop folder your local web application files and server-side scripts will be included in the Bluemix image. Both of these methods are covered in the instructions, below.
Push To Bluemix
There are some “one time” tasks setting up your development environment that need to happen before you can push to Bluemix. These are outlined in detail below, but here are the major items:
After this, you can develop applications locally and update any changes with the “cf push” command. This is super convenient. You can edit your application with desktop tools, and push the image to Bluemix with one command! Here are the detailed step-by-step instructions to set up your development environment and push DreamFactory to your Bluemix account.
Get a IBM Bluemix account.
Read the Bluemix documentation.
Install the Cloud Foundry CLI tool on your local machine.
Get the DreamFactory source code,
Or the desktop installer.
Run the installer or unpack the source into a desktop folder.
Locate the DreamFactory source code folder:
For the GitHub source code, this will be the “dsp-core-master” folder
For the desktop install, this will be the “…/apps/dreamfactory/htdocs” folder
Make the following changes:
1) Copy htdocs/config/manifests/manifest.bluemix.yml-dist to htdocs/manifest.yml
2) Edit manifest.yml and change [app-name] and [host-name] to your app name
3) Copy config/database.bluemix.config.php-dist to config/database.config.php
Navigate to the source code folder with the Command Prompt and type the following:
1) cf api https://api.ng.bluemix.net
2) cf login
Followed by your Bluemix email and password
3) cf push
Log into your Bluemix account.
Create a new MySQL service and bind it to your app using the Bluemix user interface.
Restart your application and run. In the future, you just have to do the login and push to update.
Join the DreamFactory newsletter list.