Closed hooksie1 closed 7 years ago
Depending how much devel you are going to do with this you might want to put it on Gitlab. The automated CI is really nice.
Does adding the full path to the binaries make the script less compatible with various distros?
It should be the same between upstream/downstream distros. I think the benefits of security and assurance outweigh that issue. Especially since there is a cd into /opt. If someone has /opt in their PATH and any custom commands it could call those first instead of the intended utility.
What about Debian/Centos? Are the binary files stored in the same location?
That's what I meant by upstream/downstream. Debian and Ubuntu should be the same. I didn't think XO was supported on CentOS at all?
@hooksie1 technically CentOS isn't excluded from being used, but the developers work on Ubuntu, so why divert from that when the goal is to mimic (as much as possible) the XOA version. It limits the need for special support, and anyone from us to the dev team can easily assume that everything is Ubuntu based.
I'm testing the process now on a new installation, will update / merge shortly.
Something with the changes you made to the xo-server.service fails, investigating.
That was my point about CentOS. Bah I fixed the mistake. I had one variable set up for it and split it into two (one for the dir and one for the file) and forgot to change it.
Aug 03 14:21:29 xo systemd[1]: Started XO Server. Aug 03 14:21:29 xo xo-server[9322]: module.js:487 Aug 03 14:21:29 xo xo-server[9322]: throw err; Aug 03 14:21:29 xo xo-server[9322]: ^ Aug 03 14:21:29 xo xo-server[9322]: Error: Cannot find module 'bluebird' Aug 03 14:21:29 xo xo-server[9322]: at Function.Module._resolveFilename (module.js:485:15) Aug 03 14:21:29 xo xo-server[9322]: at Function.Module._load (module.js:437:25) Aug 03 14:21:29 xo xo-server[9322]: at Module.require (module.js:513:17) Aug 03 14:21:29 xo xo-server[9322]: at require (internal/module.js:11:18) Aug 03 14:21:29 xo xo-server[9322]: at Object.<anonymous> (/opt/xo-server/bin/xo-server:12:18) Aug 03 14:21:29 xo xo-server[9322]: at Module._compile (module.js:569:30) Aug 03 14:21:29 xo xo-server[9322]: at Object.Module._extensions..js (module.js:580:10) Aug 03 14:21:29 xo xo-server[9322]: at Module.load (module.js:503:32) Aug 03 14:21:29 xo xo-server[9322]: at tryModuleLoad (module.js:466:12) Aug 03 14:21:29 xo xo-server[9322]: at Function.Module._load (module.js:458:3) Aug 03 14:21:29 xo xo-server[9322]: at Function.Module.runMain (module.js:605:10) Aug 03 14:21:29 xo xo-server[9322]: at startup (bootstrap_node.js:158:16) Aug 03 14:21:29 xo xo-server[9322]: at bootstrap_node.js:575:3 Aug 03 14:21:29 xo systemd[1]: xo-server.service: Main process exited, code=exited, status=1/FAILURE Aug 03 14:21:29 xo systemd[1]: xo-server.service: Unit entered failed state. Aug 03 14:21:29 xo systemd[1]: xo-server.service: Failed with result 'exit-code'. Aug 03 14:21:29 xo systemd[1]: xo-server.service: Service hold-off time over, scheduling restart. Aug 03 14:21:29 xo systemd[1]: Stopped XO Server.
Is what I'm getting on a clean install. Ubuntu 17.04 - investigating
Looks like we might need to keep the node.js version 'bluebird'
Seeing the same error. Tried building using master script without recent changes and it worked correctly.
Same, using the original no issues with the install.
Yet I'm not seeing the specific node.js version which this installer is complaining about.
The entire node_modules directory is missing from /opt/xo-server
Running yarn install --force
instead of sudo /usr/bin/npm install && /usr/bin/npm run build
seems to fix the issue.
I looked in /opt/xo-server and didn't even notice that.
Good find.
I created a separate PR to address the issue. Please review when you have a moment.
@Jarli01 Builds correctly now. Need to resolve conflicts, which only you have authority to do. 😄
Started with just variables and it turned into a little more.