Bug 1310170 - Custom Node.js Version Doesn't Take Effect
Summary: Custom Node.js Version Doesn't Take Effect
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: openshift-controller-manager
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Dan Mace
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-19 16:15 UTC by Michael McNeill
Modified: 2016-09-08 20:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-08 20:47:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michael McNeill 2016-02-19 16:15:25 UTC
Description of problem:
When attempting to deploy a custom Node.js version on OpenShift (per the blog post here: https://blog.openshift.com/any-version-of-nodejs-you-want-in-the-cloud-openshift-does-it-paas-style/) the Node.js version does not change to the custom version specified. 

Version-Release number of selected component (if applicable):
OpenShift Enterprise: 2.2.8

How reproducible:
Deploy a Node.js 0.10 Cartridge
Add a custom Node.js version in a .openshift/markers/NODEJS_VERSION file
Once deployment completes, rhc ssh <gear-name>
Output of node -v is not the custom version specified. 

Steps to Reproduce:
1. rhc create-app example nodejs-0.10
2. cd example; echo "4.3.1" > .openshift/markers/NODEJS_VERSION
3. git commit -a -m "Updating Custom Version Number"
4. git push
5. rhc ssh example
6. node -v

Actual results:
[example-mrmc.apps.unc.edu XXXXXXXXXXXXXXXXXXXXXXXX]\> node -v
v0.10.40

Expected results:
[example-mrmc.apps.unc.edu XXXXXXXXXXXXXXXXXXXXXXXX]\> node -v
v4.3.1

Comment 1 Rory Thrasher 2016-09-08 20:41:47 UTC
Thanks for your patience.  Unfortunately, that blog post is from 2012 and the github repo that was used in that article <https://github.com/openshift/nodejs-custom-version-openshift> no longer exists - but I believe the original author has a repo here <https://github.com/ramr/nodejs-custom-version-openshift>.

So you should be able to follow the steps in the readme from that github repo.  It looks like you didn't add the repo as an upstream in your steps to reproduce.

1. rhc create-app example nodejs-0.10
2. cd example
3. git remote add upstream -m master git://github.com/ramr/nodejs-custom-version-openshift.git
4. git pull -s recursive -X theirs upstream master
5. echo "4.3.1" > .openshift/markers/NODEJS_VERSION
6. git commit -a -m "Updating Custom Version Number"
7. git push
8. rhc ssh example
9. node -v

I was able to successfully get v4.3.1 using these steps.  Please let me know if that helps.

Comment 2 Rory Thrasher 2016-09-08 20:47:37 UTC
Given that there is a solution present and there isn't a code bug, I'm going to go ahead and close this.  If the issue persists, feel free to reopen.


Note You need to log in before you can comment on or make changes to this bug.