-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
Make repo_url_suffix to be usable for RH/CentOS #174
Conversation
Accepted values are as follows: | ||
|
||
* Debian | ||
* 0.10 (default) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what
Not sure what you meant by that. Unclear README info ? The main change is that repo_url_suffix now simply needs to reflect the version number without being preceded by "node_" which is only used by apt repos. For RPM repos, it's "pub_version_number". I tried to reflect all the valid settings in the README because some version of node are not yet available through nodesource repos for some OS releases. For example, there's still no 4.x and 5.x repo available at Nodesource for RedHat/CentOS 6. That's also the case, for some versions of Ubuntu. Is there something wrong with the PR ? |
i'm just wildly confused that 0.10 is the default anywhere… |
Well, The current default behavior of the module is setting repo_url_suffix to "node_0.10" in params.pp. So, by default, it installs node version 0.10 on APT-based systems using the following repo URL schema: https://deb.nodesource.com/node_0.10. Indeed you can change repo_url_suffix to "node_4.x" to install node version 4 on APT-based systems but what about RPM-based distros ? Currently, the RPM URL schema used in nodesource.pp is https://rpm.nodesource.com/pub/${dist_type}/${dist_version}/$basearch (for example https://rpm.nodesource.com/pub/el/7/x86_64 for RedHat 7). This endpoint only provides node version 0.10 which is why I proposed this PR so we can choose node version for RPM-based systems too. It simply uses pub_version instead of only pub. Let me know |
@tsde Would you be able to fix up the linting and RSpec tests? You can probably leave the default version number, as we'll need to bump the module version when that happens.
Um yeah, 0.12 was new at the time, then things were uncertain with the fork off to iojs, ... |
Not strictly related but you might to double-check what happens with 4.x and the npm package and adjust the README accordingly (See #165 ) |
@juniorsysadmin Just fix the linting and added a check to ensure that $npm_package_ensure is set to I'm working at fixing rspec asap. |
Just looked at the #165 again - Also, would it be more maintainable to move this logic (or some of it) to nodesource.pp rather than init.pp? |
Ok, I've just reverted my changes on this. I think, we face the same kind of issue when you try to set to I propose that this PR stays focused only on the ability to choose the node version for RedHat-based systems. I'm still working on fixing rspec at the meantime.
Maybe. I'm used to put all class parameters checks into the init.pp file so checks happen earlier in the process. Not sure what Puppet recommends about this ? |
@juniorsysadmin Just fixed the rspec tests. Let me know if everything seems fine (move checks to nodesource.pp or not ?) |
Up to you (could probably be done as another PR). You've updated some tests, and CI is green, so I'm okay with merging. |
@juniorsysadmin Great ! I'm OK with merging now. As you said, we can rethink checks placement in another PR |
Make repo_url_suffix to be usable for RH/CentOS
aaand done! thanks @tsde! |
Hi,
This PR is intended to make the repo_url_suffix variable usable for RPM repos so that you can install NodeJS version 0.10 and above on RedHat based systems. The default value has been changed from "node_0.10" to "0.10". The suffix is then appended to repo URLs (node_suffix for Debian and pub_suffix for RedHat).
I also added some checks regarding the repo_url_suffix variable. There're still missing repos for some version of RedHat or Ubuntu on Nodesource, so I found it relevant to add these checks. Let me know if you find this addition useful or a pain to maintain ;) - I'll exclude this part from the PR in this case.
I've successfully tested this on Debian/Ubuntu and RedHat/CentOS.