Monday, 20 July 2015

IBM XPages on Bluemix: Deploy changes to the Bluemix environment via Cloud Foundry Command Line Interface

In my previous blog posts, IBM XPages on Bluemix: Deploy changes to the Bluemix environment via Domino Designer Part I and II, I described how to deploy changes to the Bluemix environment using Domino Designer. You can also use the Cloud Foundry Command Line Interface to deploy and modify changes to the Bluemix environment.

Getting started
First the Cloud Foundry Command Line Interface must be downloaded and then be installed. Second, the Starter Code must be downloaded. See also my blog post Customizing the XPages Web Starter Application on Bluemix - Start Coding.


Deploy changes using the Cloud Foundry Command Line Interface
To deploy a change using the Cloud Foundry Command Line Interface you can follow the steps below. In the example below I use my own 'Bluemix credentials'. You can find these via the Dashboard - CF APPS (1) - Demo - Start Coding. 


Also I made a small change in the the IBM XPages ToDo Design Application. On the XPage todoDoc I added some new values in the field Priority.


1. Open the Windows Command Prompt and change to the local development directory.
cd your_new_directory (in my case this is the directory BluemixXP)

2. Connect to Bluemix™.
cf api https://api.ng.bluemix.net

3. Log in to Bluemix
cf login -u j.oldenburger@gmail.com -o j.oldenburger@gmail.com -s XPagesandMore


4. Deploy the change to the Bluemix environment
cf push Demo


This works great but remember to clean & re-build your application before deployment and the changes are in the deployment directory. See my question on IBM developerWorks : Changes are not deployed with the Cloud Foundry Command Line Interface.


Frankly, I do not know if I will often use this method. But I found it very worthwhile to try out this method. And the result is good.

2 comments: