Mercurial > code > home > repos > infra
comparison pipe.py @ 96:b70070570e10
new task for building ntop from source
author | drewp@bigasterisk.com |
---|---|
date | Fri, 15 Jul 2022 14:33:16 -0700 |
parents | |
children | 8b8ef9d8f0fd |
comparison
equal
deleted
inserted
replaced
95:dd0db3c78329 | 96:b70070570e10 |
---|---|
1 import os | |
2 import tempfile | |
3 | |
4 from pyinfra import host | |
5 from pyinfra.facts.files import FindInFile | |
6 from pyinfra.facts.server import Arch, LinuxDistribution | |
7 from pyinfra.operations import apt, files, server, systemd, git | |
8 | |
9 | |
10 def ntop(): | |
11 files.directory('/opt/ntop') | |
12 | |
13 apt.packages(packages=[ | |
14 "build-essential", "git", "bison", "flex", "libxml2-dev", "libpcap-dev", "libtool", "libtool-bin", "rrdtool", | |
15 "librrd-dev", "autoconf", "pkg-config", "automake", "autogen", "redis-server", "wget", "libsqlite3-dev", "libhiredis-dev", | |
16 "libmaxminddb-dev", "libcurl4-openssl-dev", "libpango1.0-dev", "libcairo2-dev", "libnetfilter-queue-dev", "zlib1g-dev", | |
17 "libssl-dev", "libcap-dev", "libnetfilter-conntrack-dev", "libreadline-dev", "libjson-c-dev", "libldap2-dev", "rename", | |
18 "libsnmp-dev", "libexpat1-dev", "libsnmp-dev", "libmaxminddb-dev", "libradcli-dev", "libjson-c-dev", "libzmq3-dev", | |
19 "libmariadb-dev" | |
20 ]) | |
21 git.repo(src='https://github.com/ntop/nDPI.git', dest='/opt/ntop/nDPI', branch='4.4-stable') | |
22 git.repo(src='https://github.com/ntop/ntopng.git', dest='/opt/ntop/ntopng', branch='5.4-stable') | |
23 | |
24 server.shell('cd /opt/ntop/nDPI; ./autogen.sh; ./configure; make -j 6') | |
25 server.shell('cd /opt/ntop/ntopng; ./autogen.sh; ./configure; make -j 6') | |
26 | |
27 | |
28 ntop() |