Updating nodejs to aws opsworks

By default aws opsworks provides node level v0.10.33. The latest stable version of node.js is 0.12.2. How can I update the version of my node instances at the node opsworks level

+3


source to share


2 answers


I've also looked for approaches to make this happen in a resilient way, which means that the configuration will apply to all instances of the stack. This implies a chef configuration.

Unfortunately, the node version is not configured using the standard methods described in the Opsworks Configuration Guide .



So it looks like you really need to write a packer cookbook for this to happen. I found this cookbook-wrapper on github and you can use or fork it. I haven't tested it, but overall that's the way to go.

Another issue is that the main reason for using node 0.12+ is using generators and requires activation via the harmony flag. The cookbook must support changing the harmony flags in its cookbook attributes in order to use this feature.

+1


source


ssh to your instance and run the following



 sudo npm cache clean -f
 sudo npm install -g n
 sudo n stable

      

-1


source







All Articles