Page MenuHomePhabricator

update node.js on tools.telegrambot
Closed, ResolvedPublic

Description

I run some node.js code at tools.telegrambot@tools-bastion-03. Some packages on which it depends complain that node.js there is too old.

tools.telegrambot@tools-bastion-03:~/mediawiki-telegram-bot$ node --version
v0.10.25

On IRC @madhuvishy and @yuvipanda suggested filing a task about this, so here it is. Assigning to @yuvipanda, but if there is a way for me to do it myself, I'll be happy to learn it.

Thanks.

Please change the tags if Cloud-Services is too generic. Thanks.

Event Timeline

scfc triaged this task as Low priority.Mar 1 2017, 8:14 PM
scfc added a project: Toolforge.
scfc moved this task from Backlog to Ready to be worked on on the Toolforge board.

Upon more thought, the easiest thing for you to do now is probably to use
either https://github.com/tj/n or https://github.com/creationix/nvm.

Migrating the tool to Kubernetes will get you node v6.9.1 instead of the very old version that we have on our Trusty job grid nodes. Getting a newer version on Trusty would require us to either maintain a special nodejs package for Tool Labs that differs from the version in Wikimedia's Trusty apt repos or negotiate with all production Trusty nodejs users for an updated version that can be placed in the shared repo. Both are technically possible, but switching the tool to Kubernetes where it can use the Jessie Docker image with a newer version is likely to be much faster to accomplish.

@Amire80 I just wrote up an off the top of my head tutorial in T164910#3271720 on running a node.js bot on Kubernetes using a custom deployment file. If you are interested in trying this technique out for telegrambot I'd be glad to work with you to make sure the instructions are clear and comprehensive.

Perfect timing! I'll be happy to test it at the Hackathon!

@bd808 Amir and I just tried the tutorial and got telegrambot running on kubernetes, but it required an admin permission change for the .kube directory on /data/project/telegrambot from root:tools.telegrambot to tools.telegrambot:tools.telegrambot. Did you have to do this for stashbot too? If so may be something to investigate with tool creation.

@bd808 Amir and I just tried the tutorial and got telegrambot running on kubernetes, but it required an admin permission change for the .kube directory on /data/project/telegrambot from root:tools.telegrambot to tools.telegrambot:tools.telegrambot. Did you have to do this for stashbot too? If so may be something to investigate with tool creation.

I don't remember making that permission change, but I do see that stashbot has that type of directory permission and a couple of other tools I spot checked have root ownership. This is probably something that we can and should fix in the demon that provisions the Kubernetes credentials. We may want to do the same sort of file system permissions tricks that we do for replica.my.cnf for .kube/config at the same time.

@bd808 Okay thanks, I'll make a task to track that.

@Amire80 Do you think we can close this task now?

Amire80 claimed this task.

Yes! Good enough for my needs till now. Thank you @bd808 and @madhuvishy!