Servers
Managing processes with Bluepill
Overview
Bluepill was Cloud 66's default process manager until June 2020. It has been replaced by systemd. Some legacy servers (deployed before June 2020) may still be using Bluepill. To check this:
- Open your Cloud 66 Dashboard, and click the application in question
- Click ⚙ Settings & Information in the right-hand panel
- Click the Application Updates tab
- If you see an update named Server Process Manager then your application is still using bluepill. If you do not see it, your application is already using systemd.
This guide only applies to Bluepill users
If your servers are not running Bluepill then you are reading the wrong guide. Please visit the systemd doc instead.
If you'd like to migrate from Bluepill to systemd, please follow the migration checklist.
systemd requires Unbuntu 16.04 and up
systemd is only supported by Ubuntu version 16.04 and up. As such you cannot migrate servers running 14.04 and below to systemd. Bluepill is only compatible with Ruby v2.2 and below - so you will need to migrate your app to a newer version of Ubuntu before you can upgrade Ruby beyond v2.2.
Commands
If bluepill is installed on your server, you can control your processes manually from your server command-line interface.
A process Bluepill config is saved into a .pill
file. Bluepill loads pill files for each process it manages. See also Bluepill gem page.
When you add processes through Cloud 66 interface, they will be managed by Cloud 66. For instance if you restart your server, they will be automatically restart aswell.
Process naming convention
Cloud 66 processes beging with "cloud66_" and user processes with "user_"
Build your own pill file
To build your own process with Bluepill, please refer to this page.
Don't forget to add a log file in your pill config. For instance:
process.stdout = process.stderr = "<STACK_PATH>/log/process.log"
Status
To get all processes status:
$ sudo bluepill status
To get a specific process status:
$ sudo bluepill <process_name> status
Stop
To stop a specific process:
$ sudo bluepill <process_name> stop
Start
To start a specific process:
$ sudo bluepill <process_name> start
Load a process
To load a .pill
file into bluepill:
$ sudo bluepill load /etc/bluepill/autoload/<process_name>.pill
Unload a process
To quit a process from bluepill:
$ sudo bluepill <process_name> quit
Log file location
Also remember that we configure the pill files to log to <STACK_PATH>/log
folder.
Process signals
The default process signals for Bluepill processes are:
Generic web reload signal
restart_signal
:usr2
Stop sequences
Process type | Signal |
---|---|
sidekiq processes | stop_sequence : term, 31, kill |
All other processes (including web servers) | stop_sequence : quit, 30, term, 11, kill |
Restart | restart_on_deploy : true |
If you'd like to specify custom process signals you can do this in your Manifest file.