DreamFactory also supports the Cloudant NoSQL document store and the DB2 relational database. We instantly generate a sophisticated REST API for these data sources with many advanced features. For example, you can filter Cloudant documents with SQL filter strings. On DB2 we support data CRUD, metadata, filters, pagination, rollback, views, and stored procedures. When you hook up a local or remote data source, we dynamically generate Client SDK libraries for every major development environment, including Android, AngularJS, Titanium, JavaScript, Windows Phone, and iOS.
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.
Detailed Instructions
STEP ONE
Get a IBM Bluemix account.
Read the Bluemix documentation.
Install the Cloud Foundry CLI tool on your local machine.
STEP TWO
Get the DreamFactory source code,
Or the desktop installer.
Run the installer or unpack the source into a desktop folder.
STEP THREE
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
STEP FOUR
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
STEP FIVE
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.