Installing N|Solid 1.x Console as service means each time your machine boots, you can start your application and services to collect large amounts of useful data and visualize it using the N|Solid Console from your browser. This guide is focused on Upstart used by Ubuntu 14.04 LTS and may not be usable for Ubuntu >= 15.10 that uses SystemD.

Instructions for N|Solid 1.x

Installing

Use pmuller's script to install all the tools necessary.

curl -L -o nsolid-install.sh https://gist.githubusercontent.com/pmuellr/3854a1a7f17159b432e6/raw/f8b5e73eb6a9534614dcd0d55ad1bf27cecd4832/nsolid-install.sh
chmod +x nsolid-install.sh
./nsolid-install.sh

Configuration Files

You'll need to tweak the configuration files to set absolute paths for your environment. Let's use /home/user/ as the sample installation point of N|Solid, modify that to fit your own installation directory.

/etc/init/etcd.conf

description "etcd for N|Solid"

start on runlevel [2345]
stop on runlevel [056]

respawn
respawn  limit 5 5

# Execute the etc process and save log to some file
exec /home/user/nsolid/etcd/etcd -name nsolid_proxy -listen-client-urls http://0.0.0.0:4001 -advertise-client-urls http://0.0.0.0:4001 -initial-cluster-state new

/etc/init/nsolid_proxy.conf

description "proxy for N|Solid"

start on runlevel [2345]
stop on runlevel [056]

respawn
respawn  limit 5 5

# Execute the nsolid proxy and save log to some file

chdir /home/user/nsolid/proxy
exec /home/user/nsolid/bin/nsolid proxy.js

/etc/init/nsolid_console.conf

description "console of N|Solid"

start on runlevel [2345]
stop on runlevel [056]

respawn
respawn limit 5 5

# Execute the console process and save log to some file

env NODE_ENV=production

env PATH=/home/user/nsolid/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

chdir /home/user/nsolid/console

exec /home/user/nsolid/bin/nsolid /home/user/nsolid/console/bin/nsolid-console --interval=1000

/etc/init/myApp.conf

Use this file to setup your application startup command

description "Your awesome application"

start on runlevel [2345]
stop on runlevel [056]

respawn
respawn  limit 5 5

# Execute the script to start your application, uncomment next line with the correct script name and PATH

env NSOLID_HUB=4001

env NSOLID_APPNAME=myApp

exec /home/user/nsolid/bin/nsolid /home/user/myApp/index.js

For more information about N|Solid Console you can read this blog post

Instructions for N|Solid 2.x and N|Solid 3.x

Installing

Follow our installation guide located in our documentation for N|Solid 2.x or documentation for N|Solid 3.x. This will create the Upstart configuration files required for N|Solid console and storage and will enable the required services. After completing the installation the only part left will be to create the configuration file for your application.

/etc/init/myApp.conf

Use this file to setup your application startup command, you will need to tweak this file to set the absolute path for your application to match your environment.

description "Your awesome application"

start on runlevel [2345]
stop on runlevel [056]

respawn
respawn  limit 5 5

# Execute the script to start your application, uncomment next line with the correct script name and PATH

env NSOLID_COMMAND=127.0.0.1:9001

env NSOLID_APPNAME=myApp

exec /usr/bin/nsolid /home/user/myApp/index.js