Mercurial > code > home > repos > infra
changeset 96:b70070570e10
new task for building ntop from source
author | drewp@bigasterisk.com |
---|---|
date | Fri, 15 Jul 2022 14:33:16 -0700 |
parents | dd0db3c78329 |
children | 9b7d7ea79f16 |
files | pipe.py tasks.py |
diffstat | 2 files changed, 32 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pipe.py Fri Jul 15 14:33:16 2022 -0700 @@ -0,0 +1,28 @@ +import os +import tempfile + +from pyinfra import host +from pyinfra.facts.files import FindInFile +from pyinfra.facts.server import Arch, LinuxDistribution +from pyinfra.operations import apt, files, server, systemd, git + + +def ntop(): + files.directory('/opt/ntop') + + apt.packages(packages=[ + "build-essential", "git", "bison", "flex", "libxml2-dev", "libpcap-dev", "libtool", "libtool-bin", "rrdtool", + "librrd-dev", "autoconf", "pkg-config", "automake", "autogen", "redis-server", "wget", "libsqlite3-dev", "libhiredis-dev", + "libmaxminddb-dev", "libcurl4-openssl-dev", "libpango1.0-dev", "libcairo2-dev", "libnetfilter-queue-dev", "zlib1g-dev", + "libssl-dev", "libcap-dev", "libnetfilter-conntrack-dev", "libreadline-dev", "libjson-c-dev", "libldap2-dev", "rename", + "libsnmp-dev", "libexpat1-dev", "libsnmp-dev", "libmaxminddb-dev", "libradcli-dev", "libjson-c-dev", "libzmq3-dev", + "libmariadb-dev" + ]) + git.repo(src='https://github.com/ntop/nDPI.git', dest='/opt/ntop/nDPI', branch='4.4-stable') + git.repo(src='https://github.com/ntop/ntopng.git', dest='/opt/ntop/ntopng', branch='5.4-stable') + + server.shell('cd /opt/ntop/nDPI; ./autogen.sh; ./configure; make -j 6') + server.shell('cd /opt/ntop/ntopng; ./autogen.sh; ./configure; make -j 6') + + +ntop()