Closed Bug 1097356 Opened 10 years ago Closed 9 years ago

Deploy metric-collective with puppet

Categories

(Infrastructure & Operations :: RelOps: Puppet, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: dividehex)

Details

(Whiteboard: [windows])

Attachments

(2 files, 1 obsolete file)

Jake tells me this is in a GPO now, but it's not in puppet.  So, port the GPO to puppet.
https://github.com/dividehex/metric-collective
Summary: Deploy metrics-collective with puppet → Deploy metric-collective with puppet
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/4109]
Assignee: dustin → relops
markco, do you know if this is already taken care of? If not, dividehex, is it easy to do?
Assignee: relops → jwatkins
Flags: needinfo?(mcornmesser)
No it has not been done yet.
Flags: needinfo?(mcornmesser)
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/4109] → [windows]
Q had a good suggestion of packaging metcollective up as an exe to eliminate the problem of psutil and pywin32 being dependencies.  He also said there is a wrapper script to handle registering as a service.
The options for bundling metcollect up into an exe came down to py2exe and pyinstaller.  I really wanted to get pyinstaller to work but it just wasn't going to happen.  It compiled nicely and even installed as a windows service properly but it just wouldn't start the service.  py2exe on the other hand worked although the setup.py must be configured so py2exe can properly handle the pywin32 service utility code.

A couple gotchas I ran into included __file__ being different between compiled vs non-compiled.  sys.argv[0] provided a replacement without needing to detect which state it was run from.  Also, required some dll exclusions to properly compile.

I also updated the metric collective code base to handle the latest psutil (3.0.1).

The exe under /data/repos/EXEs was compiled with: psutil-3.0.1.win32, pywin32-219.win32-py2.7, python-2.7.10, py2exe-0.6.9.win32-py2.7 and was built against mettric collective commit 2f05b79690c2c0fa1dc839cca5ad8b4d8179214b

Instructions for rebuilding the bundled exe are in the README.md
This patch handles installing the bundled metcollect.exe and registers it as a service.  It also set the graphite host using the same config parameters used by collectd.

The service registration exec is fairly idempotent and will update current windows hosts running the gpo installed metcollect to point to the new version.  This means it would be safe to disable/delete the current gpo and deploy this when the time comes.

Also note, this is just the module and *NOT* being deployed by any toplevel manifests yet.
Attachment #8631924 - Flags: review?(dustin)
Comment on attachment 8631924 [details] [diff] [review]
bug1097356-1.patch

Tested on 2008 ec2 instance and on a 2008 ix system
Comment on attachment 8631924 [details] [diff] [review]
bug1097356-1.patch

Review of attachment 8631924 [details] [diff] [review]:
-----------------------------------------------------------------

Is the process of building metcollect.exe in version control somewhere?
Attachment #8631924 - Flags: review?(dustin) → review+
(In reply to Dustin J. Mitchell [:dustin] from comment #8)
> Comment on attachment 8631924 [details] [diff] [review]
> bug1097356-1.patch
> 
> Review of attachment 8631924 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Is the process of building metcollect.exe in version control somewhere?

Yes, see github README.md
https://github.com/dividehex/metric-collective/
Attached patch bug1097345-1.patch (obsolete) — Splinter Review
simply enables metcollect module for windows
Attachment #8638164 - Flags: review?(mcornmesser)
Attachment #8638164 - Flags: review?(mcornmesser) → review+
Comment on attachment 8638164 [details] [diff] [review]
bug1097345-1.patch

whoops! this was the wrong patch :-(
Attachment #8638164 - Flags: checked-in+ → checked-in-
This is the correct patch and has already been checked in
Attachment #8638164 - Attachment is obsolete: true
Attachment #8638202 - Flags: review?(mcornmesser)
Attachment #8638202 - Flags: checked-in+
Attachment #8638202 - Flags: review?(mcornmesser) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: