Thursday, 5 May 2016

IBM Bluemix : Implementing Cloud Ready Applications - Part 3

c. Debug a Cloud application using development mode of IBM Bluemix PaaS

Development mode is a special mode available in Bluemix. It allows the application developer to conduct various operations so that errors can be found and resolved within the application.

1. Using the Eclipse Tools for Bluemix plug-in for development mode with IBM Liberty for Java buildpack applications

Eclipse Tools supports both development mode and debugging mode. When development mode is activated, it is possible to incrementally publish application changes to Bluemix without redeploying the app.

When Enable Application Debug is selected, development mode is automatically enabled. When debugging is enabled the developer may create remote debug sessions with the application instance.

Activating debugging is performed in Eclipse by right-click on the application name under the correct Bluemix server, and selecting Enable Application Debug:

2. Using the Bluemix Live Sync debug feature for development mode with IBM Node.js buildpack applications

The Bluemix Live Sync feature enables a debug mode that may be used to dynamically edit code, insert breakpoints, step through code, and restart the application, all while the application is running on Bluemix.

This debug mode may be combined with Bluemix DevOps services Live Edit feature or the Desktop Sync feature to allow a Node.js application source code to be modified during the debug process, without requiring a redeploy of the application.


Requirements for using development mode with debug for Node.js:

 The application must use the IBM SDK for Node.js and not a custom buildpack
 The Chrome browser is required for the node inspector

Enabling Bluemix Live Debug:

a. Allow the buildpack to detect the app start command. The start command must be auto-detected by the buildpack, not set in the manifest.yml file.

 Ensure that the package.json file contains a start script that includes a start command for the app.
 If the app manifest.yml file contains a command, set it to null.

b. Set development mode on in the app manifest.yml file by adding this variable
env:

ENABLE_BLUEMIX_DEV_MODE: "true"

c. Increase the memory entry in manifest.yml by adding 128M or more to the memory attribute.
d. Repush the application for the manifest.yml changes to take effect
e. Once the application has been pushed access:

https://[appname].mybluemix.net/bluemix-debug/manage

(where appname is the correct application name) to access the Bluemix debug user interface. From this interface, it is possible to restart the application, connect to a shell on the application, or launch the node inspector to debug the application.

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.

Recent Comments

Contact Form

Name

Email *

Message *

Followers