Page MenuHomePhabricator

Puppetize npm/grunt manual setup
Closed, ResolvedPublic

Description

To migrate the npm Jenkins job to the Nodepool instance, we need to have npm/grunt pinned at a specific version.

On the permanent slaves that is done manually by following https://wikitech.wikimedia.org/wiki/Nova_Resource:Integration/Setup

We need to Puppetize the steps so we can include them in the Nodepool images. Probably with a standalone class such as contint::packages::javascript.

Event Timeline

hashar created this task.Sep 27 2015, 8:42 PM
hashar raised the priority of this task from to Needs Triage.
hashar updated the task description. (Show Details)
hashar added subscribers: hashar, Krinkle, zeljkofilipin.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 27 2015, 8:42 PM
hashar triaged this task as Medium priority.Oct 2 2015, 12:47 PM
hashar set Security to None.

Change 244748 had a related patch set uploaded (by Hashar):
contint: install npm/grunt-cli with npm

https://gerrit.wikimedia.org/r/244748

hashar claimed this task.Oct 9 2015, 8:02 PM
hashar moved this task from Backlog to In progress on the Continuous-Integration-Config board.
hashar moved this task from Backlog to In-progress on the Continuous-Integration-Scaling board.

On Trusty:

root@integration-slave-trusty-1011:~# ls -l /usr/{local/,}bin/{grunt,npm}
ls: cannot access /usr/local/bin/grunt: No such file or directory
lrwxrwxrwx 1 root root 39 Oct 22 11:01 /usr/bin/grunt -> ../lib/node_modules/grunt-cli/bin/grunt
lrwxrwxrwx 1 root root 18 Oct 22 11:01 /usr/bin/npm -> /usr/local/bin/npm
lrwxrwxrwx 1 root root 38 Apr  9  2015 /usr/local/bin/npm -> ../lib/node_modules/npm/bin/npm-cli.js
root@integration-slave-trusty-1011:~# /usr/bin/grunt --version
grunt-cli v0.1.13
root@integration-slave-trusty-1011:~# /usr/local/bin/npm --version
2.7.6
root@integration-slave-trusty-1011:~# /usr/bin/npm --version
2.7.6

On Precise the installation of grunt-cli is done with the Precise package which fails because of the CA. But npm is properly installed, hence on next run of puppet grunt-cli is properly installed.

root@integration-slave-precise-1011:~# ls -l /usr/{local/,}bin/{grunt,npm}
ls: cannot access /usr/local/bin/grunt: No such file or directory
ls: cannot access /usr/local/bin/npm: No such file or directory
lrwxrwxrwx 1 root root 39 Oct 22 11:59 /usr/bin/grunt -> ../lib/node_modules/grunt-cli/bin/grunt
lrwxrwxrwx 1 root root 38 Oct 22 11:58 /usr/bin/npm -> ../lib/node_modules/npm/bin/npm-cli.js
root@integration-slave-precise-1011:~# /usr/bin/npm --version
2.7.6
root@integration-slave-precise-1011:~# /usr/bin/grunt --version
grunt-cli v0.1.13
root@integration-slave-precise-1011:~#

All fine with PS 11 https://gerrit.wikimedia.org/r/#/c/244748/11

salt '*slave*' cmd.run '/usr/bin/npm --version; /usr/bin/grunt --version'

integration-slave-trusty-1014.integration.eqiad.wmflabs:
    2.7.6
    grunt-cli v0.1.13
integration-slave-trusty-1011.integration.eqiad.wmflabs:
    2.7.6
    grunt-cli v0.1.13
integration-slave-trusty-1012.integration.eqiad.wmflabs:
    2.7.6
    grunt-cli v0.1.13
integration-slave-trusty-1017.integration.eqiad.wmflabs:
    1.3.10
    grunt-cli v0.1.13
integration-slave-precise-1012.integration.eqiad.wmflabs:
    2.7.6
    grunt-cli v0.1.13
integration-slave-trusty-1015.integration.eqiad.wmflabs:
    2.7.6
    grunt-cli v0.1.13
integration-slave-precise-1013.integration.eqiad.wmflabs:
    2.7.6
    grunt-cli v0.1.13
integration-slave-precise-1011.integration.eqiad.wmflabs:
    2.7.6
    grunt-cli v0.1.13
integration-slave-trusty-1013.integration.eqiad.wmflabs:
    2.7.6
    grunt-cli v0.1.13
integration-slave-trusty-1016.integration.eqiad.wmflabs:
    2.7.6
    grunt-cli v0.1.13
integration-slave-precise-1014.integration.eqiad.wmflabs:
    2.7.6
    grunt-cli v0.1.13
integration-slave-trusty-1023.integration.eqiad.wmflabs:
    2.7.6
    grunt-cli v0.1.13

All good on permanent slaves. When https://gerrit.wikimedia.org/r/#/c/244748/ is merged, we can add contint::packages::javascript to the Nodepool slaves.

Change 244748 merged by Ori.livneh:
contint: install npm/grunt-cli with npm

https://gerrit.wikimedia.org/r/244748

hashar closed this task as Resolved.Dec 10 2015, 9:53 AM