Bug 1310170 - Custom Node.js Version Doesn't Take Effect
Custom Node.js Version Doesn't Take Effect
Status: CLOSED WORKSFORME
Product: OpenShift Container Platform
Classification: Red Hat
Component: Deployments (Show other bugs)
2.2.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Dan Mace
zhou ying
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-19 11:15 EST by Michael McNeill
Modified: 2016-09-08 16:47 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-08 16:47:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael McNeill 2016-02-19 11:15:25 EST
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 16:41:47 EDT
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 16:47:37 EDT
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.