ZoneMinder 1.25 Puppet Module

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.

Moderator: zoneminder

kylejohnson
Posts: 251
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD
Contact:

ZoneMinder 1.25 Puppet Module

Postby kylejohnson » Thu Jan 31, 2013 6:23 pm

Hi everyone.

I got tired of manually recompiling zoneminder and reinstalling prerequisites every time I wanted to spin up a new ZM box, so I wrote a puppet module to do the work for me.
If you haven't used puppet, then in this context think of it as a really advanced shell script.

You can find the github page for this module here.

A puppet module to completely install ZoneMinder 1.25.0 from source. The ZoneMinder source is patched with mastertheknife's performance patch, and nextime's plugin architecture patch, including his licence plate and facial recognition plugins. After running this module, you will have a working ZoneMinder 1.25.0 install. Currently the module only works under Ubuntu 12.04 - it hasn't been tested with other Ubuntu versions but may work. The module not work with any other distros. at this time.

To use it.

  • Install a fresh Ubuntu 12.04 server. I went with a minimal install, but a normal install will also work.
  • Configure network, SSH, whatever else.
  • Code: Select all

    apt-get update && apt-get install puppet git-core
  • Code: Select all

    git clone git://github.com/kylejohnson/puppet-zoneminder.git zoneminder
  • Code: Select all

    sudo puppet apply --verbose --modulepath=`pwd` -e 'include zoneminder'
  • Pray. Just kidding. But seriously. If something breaks, please report it to me. At this point you should have a working ZoneMinder 1.25 installation and you can start adding cameras.
Idling as fiXXXerMet in #zoneminder on freenode. Come say hi!

gmar_87
Posts: 67
Joined: Sat Aug 13, 2011 11:38 pm
Location: Melbourne, Australia

Re: ZoneMinder 1.25 Puppet Module

Postby gmar_87 » Fri Apr 26, 2013 11:28 am

kylejohnson wrote:[*]Pray. Just kidding. But seriously. If something breaks, please report it to me. At this point you should have a working ZoneMinder 1.25 installation and you can start adding cameras.[/list]


Hi kylejohnson,

Thanks for this puppet module.
I tried to install on a fresh Ubuntu 12.04 32bit + OpenSSH & LAMP, but i experienced two errors.
Any ideas?

Code: Select all

info: Applying configuration version '1366974370'
notice: /Stage[main]/Zoneminder::Config/File[/etc/ld.so.conf.d/zoneminder.conf]/ensure: defined content as '{md5}9d932ad0f2270b481cc6bbeb3b                                                                                                  a792c6'
info: /Stage[main]/Zoneminder::Config/File[/etc/ld.so.conf.d/zoneminder.conf]: Scheduling refresh of Exec[ldconfig]
notice: /Stage[main]/Zoneminder::Install/Package[subversion]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[build-essential]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[libarchive-zip-perl]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[yasm]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[libmime-perl]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[php5]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[libmysqlclient-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[libssl-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[libdevice-serialport-perl]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Config/Exec[ldconfig]: Triggered 'refresh' from 1 events
notice: /Stage[main]/Zoneminder::Install/Package[libjpeg-turbo8]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[libsys-mmap-perl]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[automake]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[libjpeg-turbo8-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[libdate-manip-perl]/ensure: ensure changed 'purged' to 'present'
info: FileBucket adding {md5}b38ca5a963f52930ede3f4e1958f3275
info: /Stage[main]/Zoneminder::Config/File[/etc/apache2/sites-enabled/000-default]: Filebucketed /etc/apache2/sites-enabled/000-default to puppet with sum b38ca5a963f52930ede3f4e1958f3275
notice: /Stage[main]/Zoneminder::Config/File[/etc/apache2/sites-enabled/000-default]/ensure: defined content as '{md5}85f1baf2816c93f7d41bbadb61d3109d'
notice: /Stage[main]/Zoneminder::Install/Package[libwww-perl]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[libbz2-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Install/Package[libpcre3-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Zoneminder::Config/File[/var/www/zm]/ensure: created
notice: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[clone-ffmpeg]/returns: executed successfully
notice: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[configure-ffmpeg]/returns: executed successfully
info: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[configure-ffmpeg]: Scheduling refresh of Exec[make-ffmpeg]
notice: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[make-ffmpeg]: Triggered 'refresh' from 1 events
info: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[make-ffmpeg]: Scheduling refresh of Exec[make-install-ffmpeg]
notice: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[make-install-ffmpeg]: Triggered 'refresh' from 1 events
info: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[make-install-ffmpeg]: Scheduling refresh of Exec[make-install-libs-ffmpeg]
notice: /Stage[main]/Zoneminder::Install::Ffmpeg/Exec[make-install-libs-ffmpeg]: Triggered 'refresh' from 1 events
notice: /Stage[main]/Zoneminder::Install::Zoneminder/Exec[clone-zoneminder]/returns: executed successfully
notice: /Stage[main]/Zoneminder::Install::Zoneminder/File[/usr/local/src/zoneminder/configure.sh]/ensure: defined content as '{md5}addaf270bfec2aefbda0db96cdedee8d'
notice: /Stage[main]/Zoneminder::Install::Zoneminder/Exec[configure-zm]/returns: executed successfully
info: /Stage[main]/Zoneminder::Install::Zoneminder/Exec[configure-zm]: Scheduling refresh of Exec[make-zm]
err: /Stage[main]/Zoneminder::Install::Zoneminder/Exec[make-zm]: Failed to call refresh: make returned 2 instead of one of [0] at /home/john/zoneminder/manifests/install/zoneminder.pp:33
notice: /Stage[main]/Zoneminder::Config/File[/etc/init.d/zm]/ensure: defined content as '{md5}816718d8691479780e48b2749f80f028'
info: Class[Zoneminder::Config]: Scheduling refresh of Service[zm]
info: Class[Zoneminder::Config]: Scheduling refresh of Service[apache2]
notice: /Stage[main]/Zoneminder::Service/Service[apache2]: Triggered 'refresh' from 1 events
notice: /Stage[main]/Zoneminder::Service/Service[zm]/enable: enable changed 'false' to 'true'
err: /Stage[main]/Zoneminder::Service/Service[zm]: Failed to call refresh: Could not restart Service[zm]: Execution of '/etc/init.d/zm restart' returned 127:  at /home/john/zoneminder/manifests/service.pp:10
info: Creating state file /var/lib/puppet/state/state.yaml
notice: Finished catalog run in 681.99 seconds


Cheers,
John

kylejohnson
Posts: 251
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD
Contact:

Re: ZoneMinder 1.25 Puppet Module

Postby kylejohnson » Fri Apr 26, 2013 12:01 pm

gmar_87 wrote:
kylejohnson wrote:[*]Pray. Just kidding. But seriously. If something breaks, please report it to me. At this point you should have a working ZoneMinder 1.25 installation and you can start adding cameras.[/list]


Hi kylejohnson,

Thanks for this puppet module.
I tried to install on a fresh Ubuntu 12.04 32bit + OpenSSH & LAMP, but i experienced two errors.
Any ideas?


Cheers,
John


Hello John,

The service fails to start because ZM failed to compile. I've received a couple reports this week of the module failing to work. Busy this week, so I will be looking into the module this weekend.

EDIT: I've opened the issue up at https://github.com/kylejohnson/puppet-z ... r/issues/3

I'll keep you updated,
Kyle
Idling as fiXXXerMet in #zoneminder on freenode. Come say hi!

gmar_87
Posts: 67
Joined: Sat Aug 13, 2011 11:38 pm
Location: Melbourne, Australia

Re: ZoneMinder 1.25 Puppet Module

Postby gmar_87 » Sun May 12, 2013 12:11 am

Hi Kyle,

Have you had a chance to look into this?

Regards,
John

kylejohnson
Posts: 251
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD
Contact:

Re: ZoneMinder 1.25 Puppet Module

Postby kylejohnson » Sun May 12, 2013 10:28 pm

gmar_87 wrote:Hi Kyle,

Have you had a chance to look into this?

Regards,
John


I double checked that the module still works on 64 bit, but don't have a 32 bit system lying around to debug it on. I can spin up a 32 bit VM. Any reason you're still using 32bit?
Idling as fiXXXerMet in #zoneminder on freenode. Come say hi!

gmar_87
Posts: 67
Joined: Sat Aug 13, 2011 11:38 pm
Location: Melbourne, Australia

Re: ZoneMinder 1.25 Puppet Module

Postby gmar_87 » Mon May 13, 2013 12:08 am

kylejohnson wrote:I double checked that the module still works on 64 bit, but don't have a 32 bit system lying around to debug it on. I can spin up a 32 bit VM. Any reason you're still using 32bit?


Thanks for the update.

I'm limited to 2GB of RAM for my ZoneMinder VM... From my experience with 64 bit Windows systems, less than 4GB RAM on a 64 bit machine can be counter productive. However, after some quick Googling it looks like Ubuntu 64-bit will still perform better than a 32 bit with less than 4GB RAM.

I'll try run your puppet module on a 64 bit Ubuntu install and let you know how i go.

gmar_87
Posts: 67
Joined: Sat Aug 13, 2011 11:38 pm
Location: Melbourne, Australia

Re: ZoneMinder 1.25 Puppet Module

Postby gmar_87 » Mon May 27, 2013 10:39 am

I think i found the issue. The install fails if LAMP is already installed... I received the same errors when i tried to install on 64 bit when LAMP was already installed.

Just tried Ubuntu 12.04 64 bit with OpenSSH only and it worked. :)

Thanks

reyes136
Posts: 6
Joined: Wed Aug 27, 2008 7:58 pm

Re: ZoneMinder 1.25 Puppet Module

Postby reyes136 » Tue Jun 18, 2013 5:40 am

Hi I am trying your script and keep getting the error "Could not retrieve fact fqqdn"

beire
Posts: 15
Joined: Sun Sep 05, 2010 10:55 pm
Location: België

Re: ZoneMinder 1.25 Puppet Module

Postby beire » Sat Jun 29, 2013 5:32 pm

Same error here:
warning: could not retrieve fact fqdn
could not find class zoneminder for zoneminder at line 1 on node zoneminder

Any help? I have run your script on another pc with success. This one however does not work.
I am running ubuntu server 12.04 x86_64 minimal with just ssh installed.


Return to “User Contributions”

Who is online

Users browsing this forum: No registered users and 2 guests