Page 1 of 1

ZoneMinder 1.25 Puppet Module

Posted: Thu Jan 31, 2013 6:23 pm
by kylejohnson
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.

Re: ZoneMinder 1.25 Puppet Module

Posted: Fri Apr 26, 2013 11:28 am
by gmar_87
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

Re: ZoneMinder 1.25 Puppet Module

Posted: Fri Apr 26, 2013 12:01 pm
by kylejohnson
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

Re: ZoneMinder 1.25 Puppet Module

Posted: Sun May 12, 2013 12:11 am
by gmar_87
Hi Kyle,

Have you had a chance to look into this?

Regards,
John

Re: ZoneMinder 1.25 Puppet Module

Posted: Sun May 12, 2013 10:28 pm
by kylejohnson
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?

Re: ZoneMinder 1.25 Puppet Module

Posted: Mon May 13, 2013 12:08 am
by gmar_87
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.

Re: ZoneMinder 1.25 Puppet Module

Posted: Mon May 27, 2013 10:39 am
by gmar_87
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

Re: ZoneMinder 1.25 Puppet Module

Posted: Tue Jun 18, 2013 5:40 am
by reyes136
Hi I am trying your script and keep getting the error "Could not retrieve fact fqqdn"

Re: ZoneMinder 1.25 Puppet Module

Posted: Sat Jun 29, 2013 5:32 pm
by beire
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.