-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update to node 10 LTS and drop Node 6 & 7 #242
Conversation
- and drop Node 6 & 7
- NodeSource script already execute it by default - https://github.com/nodesource/distributions/blob/0114ee84afe76633c9cd28958c2d09cceee84f49/deb/setup_10.x#L284
I raise this PR because recently I'm trying to package Hexo as a Sandstorm app. Hexo is going to drop Node 6 soon, so it wouldn't run on the It's not directly related to the PR, I want to inquire about the OS used in Sandstorm. The current node stack shows Debian Jessie. Then I saw vagrant-spk/stacks/node/setup.sh Line 13 in faa13cc
so how do I choose Ubuntu over Debian? By not including export DEBIAN_FRONTEND=noninteractive line?
I also notice discrepancy between the published doc and the doc source—the published doc is missing |
vagrant-spk uses Debian Stretch, not Jessie. I think the Node stack was just never updated. You'll see here in vagrant-spk that the Debian Stretch image is selected during a vagrant-spk init: https://github.com/sandstorm-io/vagrant-spk/blob/master/vagrant-spk#L73 When we switched from Jessie to Stretch, we had to update each and every platform stack to properly work with the newer packages and the like, so changing what flavor of Linux vagrant-spk uses is very non-trivial, there is no configurable option in vagrant-spk to use Ubuntu instead, although it's not inherently impossible to edit vagrant-spk to do so. Note that Sandstorm does not care what flavor of Linux you use, it's just that vagrant-spk is using Debian. When you package an app with vagrant-spk, it creates a virtual machine with Debian, installs Sandstorm in it, and lets you work on developing and packaging your app. The resulting app may include some dependencies as shipped by the flavor of Debian you used, but will run on whatever Linux kernel your Sandstorm is installed on. Note that if you use the spk tool, instead of vagrant-spk, you can happily build a Sandstorm app using whatever flavor of Linux you installed Sandstorm on as well. There's also a newer docker-spk tool, and the example app for it actually builds off of Alpine Linux. |
Renaming the existing node stack to node6 would be a good choice for now, though already-packaged apps should effectively have all of those files already, so there shouldn't be a whole lot of harm in purging the old node stacks at some point here. I think node and nodelts seems like a good strategy for the future. If you don't need node12 at this point, and think most packages will work with nodelts, perhaps we should rename the existing node stack, so people don't use it accidentally, create the nodelts stack for v10, and then not worry about making a new plain node stack unless someone needs it? Right now vagrant-spk doesn't get a lot of development love, so it's not going to be updated on a six month cycle, it's going to be updated on a "someone submitted a PR and bugged Kenton to push the updates out" cycle. |
Seems like the docs doesn't mention it, I expected a "Build Environment" section like how Travis document it. I'll submit a PR for this. (Edit: sandstorm-io/sandstorm#3157)
As long I'm still active on Hexo, I don't mind PR regularly, but yeah, someone needs to merge it. In that case, I suggest |
Assuming you've tested that this works (I don't have time to right now), I'm pretty happy with this PR. I like how the new version of Furthermore, this clearly defines and decides what version the |
I am looking to merge this and build a vagrant-spk 1.0 release in the very immediate future. Just an FYI. |
Did some rudimentary testing, I'm happy with it. The old ones are 100% broken anyways. :) |
Closes #233
also remove apt-key import as the NodeSource installation script already includes the step.
https://github.com/nodejs/Release#end-of-life-releases
Node 6 EOL 2019-04-30
Node 7 EOL 2017-06-30 (!)
Node 8 will EOL 2019-12-31
Node 10 is supported until April 2021.
node
folder could be renamed tonode6
to support legacy apps (Edit: renamed).Alternatively, Sandstorm can opt for the versioning used by Docker (as commonly found in most CI). Meaning
node
refers to latest stable (currently v12, soon v13), whereasnodelts
refers to v10 lts.But that means the stack needs to be updated every 6 months. Using the latest node (in Sandstorm) has no significant benefit since Node apps usually (and should) support lts.