Restoring probot service on botdylan.civicrm.org
What's been done so far:
- Installed npm/nodejs via nodesource packages (I noticed that the old systemd unit used nix, but I'm not familiar with it, and installing nodejs8 was supported by Ansible, feel free to switch back to nix).
- Restored the systemd unit from backups (which has some credentials)
- Created unix accounts for
totten
andco
We seem to be missing the Github private key (c.f. https://github.com/settings/apps), according to https://github.com/probot/probot/blob/master/docs/deployment.md#create-the-github-app
When attempting to start probot, I got this error:
Sep 11 09:44:37 botdylan systemd[1]: Started Probot for CiviCRM.
Sep 11 09:44:37 botdylan npm[30433]: > probot-civicrm@1.0.0 start /home/co/probot-civicrm
Sep 11 09:44:37 botdylan npm[30433]: > probot run ./index.js
Sep 11 09:44:37 botdylan npm[30433]: fs.js:646
Sep 11 09:44:37 botdylan npm[30433]: return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
Sep 11 09:44:37 botdylan npm[30433]: ^
Sep 11 09:44:37 botdylan npm[30433]: Error: ENOENT: no such file or directory, open '/home/co/probot-civicrm/civicrm-org.2018-06-04.private-key.pem'
Sep 11 09:44:37 botdylan npm[30433]: at Object.fs.openSync (fs.js:646:18)
Sep 11 09:44:37 botdylan npm[30433]: at Object.fs.readFileSync (fs.js:551:33)
Sep 11 09:44:37 botdylan npm[30433]: at findPrivateKey (/home/co/probot-civicrm/node_modules/probot/lib/private-key.js:28:15)
Sep 11 09:44:37 botdylan npm[30433]: at Object.<anonymous> (/home/co/probot-civicrm/node_modules/probot/bin/probot-run.js:27:24)
Sep 11 09:44:37 botdylan npm[30433]: at Module._compile (module.js:652:30)
Sep 11 09:44:37 botdylan npm[30433]: at Object.Module._extensions..js (module.js:663:10)
Sep 11 09:44:37 botdylan npm[30433]: at Module.load (module.js:565:32)
Sep 11 09:44:37 botdylan npm[30433]: at tryModuleLoad (module.js:505:12)
Sep 11 09:44:37 botdylan npm[30433]: at Function.Module._load (module.js:497:3)
Sep 11 09:44:37 botdylan npm[30433]: at Function.Module.runMain (module.js:693:10)
Sep 11 09:44:37 botdylan npm[30433]: npm ERR! code ELIFECYCLE
Sep 11 09:44:37 botdylan npm[30433]: npm ERR! errno 1
Sep 11 09:44:37 botdylan npm[30433]: npm ERR! probot-civicrm@1.0.0 start: `probot run ./index.js`
Sep 11 09:44:37 botdylan npm[30433]: npm ERR! Exit status 1
Sep 11 09:44:37 botdylan npm[30433]: npm ERR!
Sep 11 09:44:37 botdylan npm[30433]: npm ERR! Failed at the probot-civicrm@1.0.0 start script.
Sep 11 09:44:37 botdylan npm[30433]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Sep 11 09:44:37 botdylan npm[30433]: npm ERR! A complete log of this run can be found in:
Sep 11 09:44:37 botdylan npm[30433]: npm ERR! /home/co/.npm/_logs/2018-09-11T13_44_37_516Z-debug.log