Closed Bug 831771 Opened 13 years ago Closed 13 years ago

deploy node.js to Ubuntu

Categories

(Infrastructure & Operations Graveyard :: CIDuty, task, P2)

x86_64
Linux

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rail, Assigned: rail)

References

Details

Attachments

(4 files, 1 obsolete file)

Needed for some SPDY tests.
Attached patch deploy nodejs (obsolete) — Splinter Review
It turns out that the package is already in Ubuntu, so no need to package it. It needs a symlink to satisfy http://hg.mozilla.org/build/buildbotcustom/file/ad9508ea1e6e/env.py#l80. The symlink can be removed once we get rid of Fedora 12 and update the corresponding env.
Attachment #706420 - Flags: review?(bugspam.Callek)
Comment on attachment 706420 [details] [diff] [review] deploy nodejs >+++ b/modules/packages/manifests/nodejs.pp >+class packages::httpd { packages::nodejs >diff --git a/modules/talos/manifests/init.pp b/modules/talos/manifests/init.pp >+ case $::operatingsystem { >+ Ubuntu: { >+ include packages::nodejs >+ file { >+ "${users::builder::home}/bin/node.exe": >+ ensure => link, >+ target => "/usr/bin/node"; I feel that the OS switch here should happen in packages::nodejs, we should include packages::nodejs always for talos slaves. And then symlink for it (as well as an include of dirs::builder_home::bin should happen there) >+ "${users::builder::home}/bin": >+ ensure => directory, Please factor out into dirs::builder_home::bin (so it can be used multiple places if need be - can even do a purge of non-tracked this way.)
Attachment #706420 - Flags: review?(bugspam.Callek) → review-
Attached patch deploy nodejsSplinter Review
Let's go with a cleaner plan: * No symlinks on Ubuntu * symlink /home/cltbld/bin/node.exe to /usr/bin/node on Fedora (patch incoming) * update env and point it to /usr/bin/node
Attachment #706420 - Attachment is obsolete: true
Attachment #706428 - Flags: review?(bugspam.Callek)
Comment on attachment 706428 [details] [diff] [review] deploy nodejs Review of attachment 706428 [details] [diff] [review]: ----------------------------------------------------------------- ::: modules/packages/manifests/nodejs.pp @@ +1,4 @@ > +# This Source Code Form is subject to the terms of the Mozilla Public > +# License, v. 2.0. If a copy of the MPL was not distributed with this > +# file, You can obtain one at http://mozilla.org/MPL/2.0/. > +class packages::httpd { still need to fix this packages::* but r+ assuming you do fix it
Attachment #706428 - Flags: review?(bugspam.Callek) → review+
Attached patch puppet-manifestsSplinter Review
Deploy it to /usr/bin instead!
Attachment #706429 - Flags: review?(bugspam.Callek)
Summary: package and deploy node.exe to Ubuntu → deploy node.js to Ubuntu
Priority: -- → P2
Comment on attachment 706428 [details] [diff] [review] deploy nodejs (In reply to Justin Wood (:Callek) from comment #4) > still need to fix this packages::* but r+ assuming you do fix it Bah, fixed and pushed http://hg.mozilla.org/build/puppet/rev/f192ae381df5
Attachment #706428 - Flags: checked-in+
Comment on attachment 706429 [details] [diff] [review] puppet-manifests even better than a symlink, however we *might* want to (after this lands and sticks) re-add that to ensure => absent to save the few bytes on the machines. Either way I'm ok if we don't.
Attachment #706429 - Flags: review?(bugspam.Callek) → review+
Attached patch ENVSplinter Review
Depends on puppet-manifests patch deployment.
Attachment #706433 - Flags: review?(bugspam.Callek)
Comment on attachment 706433 [details] [diff] [review] ENV We can't deploy this until we are sure the fedora manifests patch sticks, and is fully deployed. But I trust you to know when is the right time.
Attachment #706433 - Flags: review?(bugspam.Callek) → review+
Comment on attachment 706433 [details] [diff] [review] ENV http://hg.mozilla.org/build/buildbotcustom/rev/d6a91d86930e I checked fed/fed64 slaves, all of them except some preproduction, one waiting for reimaging and one waiting for reboot are done.
Attachment #706433 - Flags: checked-in+
Can you switch this around so that rather than include package::nodejs not doing what it says on CentOS/Darwin, it just doesn't get invoked there? That basically means adding a conditional in modules/talos, and removing the "N/A" stanza in pacakges::nodejs
(In reply to Dustin J. Mitchell [:dustin] from comment #12) > Can you switch this around so that rather than > include package::nodejs > not doing what it says on CentOS/Darwin, it just doesn't get invoked there? > > That basically means adding a conditional in modules/talos, and removing the > "N/A" stanza in pacakges::nodejs That was an ask specifically by me above. Can you provide the reason for this? (I told rail in IRC I could be convinced otherwise) (If you have a reason other than personal aesthetics I'll say we should do it ahead of time, since I don't have a strong reason for keeping it this way)
The reason is that, as it stands, 'include packages::nodejs' lies on Darwin and CentOS -- it doesn't install the package. This on the basis of unstated knowledge that you don't need nodejs on those systems. Like functions, Puppet types should do what they say. In this case, the decision as to which systems do and do not have node installed is a talos-related decision, so it makes sense to put that logic in the talos module. A comment about it would be even better :) I'm not sure what "ahead of time" means.
(In reply to Dustin J. Mitchell [:dustin] from comment #14) > The reason is that, ... Ok lets do it. > I'm not sure what "ahead of time" means. I wrote that and even I don't know :(
Attached patch move itSplinter Review
Do you mean something like this?
Attachment #706621 - Flags: review?(dustin)
Comment on attachment 706621 [details] [diff] [review] move it Yep, please also add a comment in this file and remove this stanza from nodejs.pp: CentOS, Darwin: { # N/A }
Attachment #706621 - Flags: review?(dustin) → review+
node.exe under ~/bin could be removed, but it's not a big deal since Fedora 12 platform will be dead soon.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
Component: Platform Support → Buildduty
Product: Release Engineering → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: