Jarli01 / xenorchestra_installer

A simple install script for Xen Orchestra
GNU General Public License v3.0
434 stars 86 forks source link

Variables #3

Closed hooksie1 closed 7 years ago

hooksie1 commented 7 years ago

Started with just variables and it turned into a little more.

hooksie1 commented 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.

Danp2 commented 7 years ago

Does adding the full path to the binaries make the script less compatible with various distros?

hooksie1 commented 7 years ago

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.

Danp2 commented 7 years ago

What about Debian/Centos? Are the binary files stored in the same location?

hooksie1 commented 7 years ago

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?

Jarli01 commented 7 years ago

@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.

Jarli01 commented 7 years ago

I'm testing the process now on a new installation, will update / merge shortly.

Jarli01 commented 7 years ago

Something with the changes you made to the xo-server.service fails, investigating.

hooksie1 commented 7 years ago

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.

Jarli01 commented 7 years ago

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

Jarli01 commented 7 years ago

Looks like we might need to keep the node.js version 'bluebird'

Danp2 commented 7 years ago

Seeing the same error. Tried building using master script without recent changes and it worked correctly.

Jarli01 commented 7 years ago

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.

Danp2 commented 7 years ago

The entire node_modules directory is missing from /opt/xo-server

Danp2 commented 7 years ago

Running yarn install --force instead of sudo /usr/bin/npm install && /usr/bin/npm run build seems to fix the issue.

Jarli01 commented 7 years ago

I looked in /opt/xo-server and didn't even notice that.

Good find.

Danp2 commented 7 years ago

I created a separate PR to address the issue. Please review when you have a moment.

Danp2 commented 7 years ago

@Jarli01 Builds correctly now. Need to resolve conflicts, which only you have authority to do. 😄