[keyserver] configure separation of primary secondary logic
Summary:
This introduces COMM_NODE_ROLE which specifies whether a node is a primary or secondary node.
Certain logic in keyserver/src/keyserver.js should only be performed by a primary node. This includes:
- run the migration
- establish tunnelbroker connection
- print the QR Code
- create authoritative keyserver config files
Both secondary and primary nodes should still perform:
- have the master process create fork processes
- route express traffic
- verify the user is logged in
Depends on D12691
Test Plan:
Confirmed through logs that secondary nodes didn't establish tunnelbroker connection.
Will test further if migration is primary only later in stack with migration script
Reviewers: ashoat, varun
Reviewed By: ashoat
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D12708