StrongLoop Process Manager (StrongLoop PM) is a production process manager for Node.js applications that enables you to:
- Build, package, and deploy your Node application to a local or remote system.
- View CPU profiles and heap snapshots to optimize performance and diagnose memory leaks.
- Keep processes and clusters alive forever.
- View performance metrics on your application.
- Easily scale to multiple hosts with an integrated Nginx load balancer.
Running StrongLoop PM
You can run StrongLoop PM:
- As a transient process during development and testing; see below.
- As an operating system service. For production use, always run it as a service to ensure it restarts if the system restarts or the process stops for some other reason.
Running StrongLoop PM as a transient process
slc pm command to run Process Manager as a transient process, that is, a regular (non-service) application; for example:
This starts StrongLoop Process Manager as a transient process, listening on the default port 8701. Functionally, it is the same as a service, except the process will not automatically restart if the system restarts.
Connecting to Process Manager from Arc
Once you've started StrongLoop Process Manager (StrongLoop PM) on your host system, you can deploy applications to it and control it from StrongLoop Arc. Then you can connect to the Process Manager from Arc:
- Choose Process Manager in the Arc module selector.
Enter the host name where StrongLoop PM is running in the Strong PM field.
- Enter the port number where StrongLoop PM is listening in the Port field (by default 8701).
- Click the Activate icon, as shown below.
Under App Status, the icon will change from Inactive to Active.
Click Add PM Host to connect to additional Process Managers running on other hosts.
Controlling Process Manager from Arc
Once you're connected, you can control StrongLoop PM by clicking on the inverted triangle on the right side of the Strong PM field to display the menu of actions you can perform:
- Stop to stop the selected Process Manager or restart to restart it. Initially, you must start PM from the command-line, but once you connect to it from Arc, you can start and restart it via the menu.
- Restart cluster to restart the application clusters managed by that PM; see Controlling clusters with Arc for more information.
- Edit host environment to set or change environment variables for that PM; see Setting and viewing environment variablesfor more information.
- Push license to set licenses for that PM; see Managing your licenses for more information.
Several environment variables affect StrongLoop Process Manager:
- STRONGLOOP_PM_HTTP_AUTH - set to the user name and password for secure access with HTTP authentication with the format STRONGLOOP_PM_HTTP_AUTH=username:password. See Securing Process Manager for more information.
- STRONGLOOP_METRICS - set to a back-end URL (such as
statsd:) for metrics collection. See Monitoring app metrics for more information.
Relevant environment variables on the client system:
STRONGLOOP_PM - URL of Process Manager to which to connect.
SSH_USER - username when connecting with
SSH_KEY - path to the SSH private key to use when connecting with
- SSH_PORT - port to use with
For more information, see Setting and viewing environment variables.