Installing NodeJS via Instance Setup Script

We're using the Default S3 i386 AMI (ami-a10b44c8) and I'd like to install nodejs and npm on the elastic agent using an instance setup script.

I've noticed that most guides for node suggest installing it from source which is unacceptable due to the amount of time it would take to build.

Is there some other way we can get it on the agent? Do we have to make a snapshot and set it up that way?

1 answer

1 accepted

0 vote

Stock images already contain node/npm. Do you need a newer version?

... OK, I feel like an idiot now for assuming it wasn't installed :(

Sorry about that.

On that note though, is there a list of all the packages installed by default on the stock images?

OK, it doesn't seem to be working, here's an example of what I'm getting:

19-Nov-2013 12:13:03line 15: node: command not found

19-Nov-2013 12:13:03line 17: npm: command not found

This is from a 'script' build task that simply calls node -h and npm -h

Hello? Does anyone have any suggestions?

node is not on PATH, check in /opt directory.

You can find all tools on image capabilities page in Bamboo.

Ah, I see now. Could I put it in the path somehow for the instance via the setup script?

Thanks for your help! :)

you could do

echo 'export PATH=$PATH:WHATEVER_YOU_WANT' >> /etc/profile.d/bamboo.sh

in your instance setup script

That worked fantastically, thanks!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,815 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you