Jarli01 / xenorchestra_installer

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

Node LTS is now the recommended version #68

Closed Danp2 closed 4 years ago

Danp2 commented 4 years ago

From https://xen-orchestra.com/docs/from_the_sources.html --

XO needs Node.js. Please use Node LTS.

Following line should be updated -- https://github.com/Jarli01/xenorchestra_installer/blob/821375b674f2f898f10798bc7d071c758cba7d98/xo_install.sh#L41

Jarli01 commented 4 years ago

Just jumping to LTS doesn't work, The install is still attempting to use 8.10 even though 12.16.1 is installed.

Attached install log.

install.log

Jarli01 commented 4 years ago

We also need an updated n repo, as this is point to 6.4.0 which only supports up to 8

n_repo="https://raw.githubusercontent.com/visionmedia/n/master/bin/n"

Danp2 commented 4 years ago

Haven't tried a clean install, but a simple n lts was enough to update my XO VM's node version.

Danp2 commented 4 years ago

This crashes for me at the tail end of the yarn build process

Jarli01 commented 4 years ago

Without the n change above the install completed, but had issues with xo_web near the end.

Danp2 commented 4 years ago

Using targets: { "node": "8.10" }

I've notice this, but wasn't sure if it was pertinent. FWIW, switching back to node 8.16 and the yarn build successfully compiles. I'll do more testing, but this might need to be "kicked up" to the devs for feedback. Obviously, they're going to want proof that this same thing occurs when you build manually from source. 😈

Jarli01 commented 4 years ago

Yeah...

Danp2 commented 4 years ago

Performing a manual build now. Saw the same "node 8.10" messages, so I'm guessing that it's benign.

Build still fails. Looks like it's a memory issue. Will bump up the VM's memory from 2 to 4GB and retry.

Danp2 commented 4 years ago

Manual build was successful when using 4GB. Now to retest with scripted version

Jarli01 commented 4 years ago

With just the n lts change? If so I have a build running right now

Jarli01 commented 4 years ago

If 4GB is needed, this needs to get changed too

# Check for 1GB Memory
totalk=$(awk '/^MemTotal:/{print $2}' /proc/meminfo)
if [ "$totalk" -lt "1000000" ]; then echo "XOCE Requires at least 1GB Memory!"; exit 1; fi 

to

# Check for 4GB Memory
totalk=$(awk '/^MemTotal:/{print $2}' /proc/meminfo)
if [ "$totalk" -lt "4030176" ]; then echo "XOCE Requires at least 4GB Memory!"; exit 1; fi 
Danp2 commented 4 years ago

Right... I was planning to do that. I'm testing now with 3GB to see if that will suffice.

Danp2 commented 4 years ago

And it just completed successfully, so I'll bump to requirement to 3 instead of 4.

Jarli01 commented 4 years ago

Node is getting ram heavy, used to be we could install with 256mb of ram.

Jarli01 commented 4 years ago

If 3GB works, this section should read

# Check for 3GB Memory
totalk=$(awk '/^MemTotal:/{print $2}' /proc/meminfo)
if [ "$totalk" -lt "3064584" ]; then echo "XOCE Requires at least 3GB Memory!"; exit 1; fi 
Danp2 commented 4 years ago

I made the change, but used 300000 instead of 3064584. Your echo is still wrong. ;-)

P.S. Just noticed that XOA is still using 2GB. Wonder if there is anything we could do to reduce the memory requirements?

Jarli01 commented 4 years ago

Your echo is still wrong. ;-)

Fixed, do you know off hand if they are using the same node version and OS?

Danp2 commented 4 years ago

Just left a comment at https://github.com/vatesfr/xen-orchestra/issues/4787

Danp2 commented 4 years ago

Good question... Looks like they are running node 12.16.1 and debian 10. I've been testing with Ubuntu 19.10

Jarli01 commented 4 years ago

The OS may have different requirements. . . it may be better to stick with the 3GB limitation anyways, as these backup operations are requiring more ram anyways.

Danp2 commented 4 years ago

Closed in #69