October 15, 2015 | Written by: Sai Vennam
Share this post:
The latest integration of StrongLoop and Bluemix is here as part of App Management! We’ve just updated the Node.js buildpack to v2.6 and with it comes the addition of the
strongpm utility to the App Management feature.
StrongLoop has powerful DevOps utilities such as Metrics, Tracing, and Profiling to analyze and manage running Node.js applications. You may have tried these capabilities with the LoopBack Starter boilerplate, but you can now easily enable them for your own Node.js (including non-LoopBack) applications! The StrongLoop capabilities are enabled by the App Management feature on Bluemix, but you will still need a StrongLoop account and license to use the full capabilities. To learn more about App Management, check out Advanced debugging for Node.js apps in Bluemix.
IMPORTANT: App Management is intended for use during development, and is not suited for production applications. It currently only supports single-instance applications and incurs a minor performance cost. In addition, the StrongLoop Process Manager is not at a secured endpoint.
Enabling StrongLoop through App Management
Let’s begin by enabling StrongLoop DevOps utilities for your Node.js application. You’ll first need a running Node.js application on Bluemix. To enable Strong-PM for your application, set the environment variable
BLUEMIX_APP_MGMT_ENABLE=strongpm and restage your application. You can do this directly in Bluemix, or using the CF CLI:
cf set-env myapp BLUEMIX_APP_MGMT_ENABLE strongpm
cf restage myapp
Upon restage, Bluemix will install the StrongLoop dependencies, start StrongLoop Process Manager and direct it to start your application. Your app will now use
strong-pm, StrongLoop’s process management solution!
To take advantage of the StrongLoop DevOps capabilities enabled by
strong-pm, you will need to add a new route to your application which will direct to the Process Manager, rather than the application. Create the route with the hostname:
my_app_name-pm. For example, if the name of my application is
sai-app, I would need to create the route
You can do this directly from your application console in Bluemix by pressing the Add Route button, or you can use the CF CLI with the following command:
cf map-route app_name mybluemix.net -n my_app_name-pm
Double check that this route is working by navigating to it, and seeing the JSON response with uptime data:
Now, you can launch StrongLoop Arc and log-in with your StrongLoop account. Once logged in, add the newly created route to Arc with port 80, then click the Activate button:
You should now be able to use the various Arc features to manage your Node.js application! See Operating Node applications in the StrongLoop documentation for more information.
CPU Profile using StrongLoop Arc Profiler