Closed
Bug 1204928
Opened 10 years ago
Closed 10 years ago
Add node.js and intern@^2.0.0 to developeradm
Categories
(Infrastructure & Operations Graveyard :: WebOps: Community Platform, task)
Infrastructure & Operations Graveyard
WebOps: Community Platform
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: groovecoder, Assigned: cliang)
Details
(Whiteboard: [kanban:https://webops.kanbanize.com/ctrl_board/2/1777] )
Attachments
(2 files, 1 obsolete file)
When we deploy MDN to stage and prod, we want to run the Intern test suite, so we can catch functional regressions immediately.
To do this, we need to add node.js & intern@^2.0.0 to developeradm.
We will also need to open a netflow from developeradm to SauceLabs, which appears to be running on port 80.
Comment 1•10 years ago
|
||
The netflow should be fine as-is... developeradm should be able to make outbound connections.
I have installed Intern via NPM on developeradm. I did this by hand- we need to keep this bug open until we can get it into puppet.
I installed it like so:
yum install npm # package is in EPEL already, has a lot of very small dependencies
npm --global install intern
I don't know anything about it, so I don't have any good way to test if it works as expected or not. :)
======
PUPPET
======
There is no Node/NPM package handler for puppet. I think the simplest route would be to have puppet make sure NPM is installed, and then have it simply execute the command to install intern.
You can check if Intern is installed like so:
npm --global list 2>&1 | grep intern # should return 0
If that returns 1, it's not installed, and puppet should execute the aforementioned install command.
A better way would probably be to use the official nodejs puppet module:
https://forge.puppetlabs.com/puppetlabs/nodejs
That module seems to add proper "NPM" package handler support, so we can just do the usual:
package { 'intern':
ensure => present,
provider => 'npm'
}
I've never pulled in an upstream module like this, I dunno if there's a better way than simply extracting a tarball of it it in my local copy and checking it into SVN... there definitely is a better way in the upstream docs, I just don't know if we can do it, or if we have some other similar method.
| Assignee | ||
Comment 2•10 years ago
|
||
I uninstalled the global install of intern [1] and did a local one [2]. Noe that I had to change the ownership of all files at /data/developer-stage/src/developer.allizom.org/kuma/tests/ui/node_modules/intern and below; they were owned to my own account even executing the install via sudo.
[1]
$ sudo npm --global uninstall intern
unbuild intern@3.0.3
[2]
$ cd /data/developer-stage/src/developer.allizom.org/kuma/tests/ui
$ sudo npm install intern
[...]
| Assignee | ||
Comment 3•10 years ago
|
||
Okay. The puppetlabs module would be awesome.[1] However, the changelog states "Puppet versions below 3.4.0 are no longer supported" and we're currently pinned to 3.2.4. I'm going to try to take some of the ideas from the module and massage them into our puppet infra.
[1] I have a few concerns about how this might interact with how we've already set up repos like EPEL, but I think it could be worked around.
| Assignee | ||
Comment 4•10 years ago
|
||
Added a module simple_npm aimed at local npm installs of packages. A sample invocation would look like:
simple_npm::npm_package { 'intern':
target => '/data/test',
}
| Assignee | ||
Comment 5•10 years ago
|
||
| Assignee | ||
Comment 6•10 years ago
|
||
| Assignee | ||
Updated•10 years ago
|
Attachment #8672842 -
Flags: review?(rsoderberg)
| Assignee | ||
Updated•10 years ago
|
Attachment #8672843 -
Flags: review?(rsoderberg)
Attachment #8672843 -
Attachment is patch: true
Attachment #8672843 -
Attachment is patch: false
Comment on attachment 8672843 [details]
params.pp
> case $::osfamily {
> 'RedHat': {
> if $::operatingsystemrelease =~ /[6]\.(\d+)/ {
I advise using:
if versioncmp($::operatingsystemrelease, '6.0') >= 0 {
So that it doesn't break on CentOS 7.
Attachment #8672843 -
Flags: review?(rsoderberg) → review-
Comment on attachment 8672842 [details]
npm_package.pp
Verified that this is imported from an outside source, is harmless enough and should be safe vs. rest of tree. r+ assuming it works.
Attachment #8672842 -
Flags: review?(rsoderberg) → review+
| Assignee | ||
Comment 9•10 years ago
|
||
Updated params.pp with the suggested modifications.
Attachment #8672843 -
Attachment is obsolete: true
| Assignee | ||
Updated•10 years ago
|
Assignee: server-ops-webops → cliang
| Assignee | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•