Skip to content

Commit 1ee858a

Browse files
committed
README: Updating the build process
Updating the build system from Autotools to CMake. It also updates the documentation to reflect the new build system, including installation instructions, build requirements, and build options.
1 parent b4bdf1e commit 1ee858a

File tree

1 file changed

+86
-44
lines changed

1 file changed

+86
-44
lines changed

README.md

Lines changed: 86 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ ipfixprobe is a high-performance flow exporter. It creates bidirectional flows f
1313
![GitHub top language](https://img.shields.io/github/languages/top/CESNET/ipfixprobe)
1414

1515

16-
## Installation
16+
## 🛠️ Installation
1717
The RPM packages for RHEL based distributions can be downloaded from our [copr repository](https://copr.fedorainfracloud.org/coprs/g/CESNET/NEMEA/package/ipfixprobe/). Or just simply run:
1818

1919
```
2020
dnf install -y dnf-plugins-core && dnf copr -y enable @CESNET/NEMEA
2121
dnf install ipfixprobe
2222
```
2323

24-
## Parameters
24+
## 🔧 Parameters
2525
### Module specific parameters
2626
- `-i ARGS` Activate input plugin (-h input for help)
2727
- `-s ARGS` Activate storage plugin (-h storage for help)
@@ -39,13 +39,13 @@ dnf install ipfixprobe
3939
- `-h [PLUGIN]` Print help text. Supported help for input, storage, output and process plugins
4040
- `-V` Show version and exit
4141

42-
### Help
42+
### Help
4343
Printing general help is done using the `-h` parameter. To print help for specific plugins, `-h` with parameter is used.
4444
This parameter accepts `input`, `storage`, `process`, `output` or name of a plugin (or path to a .so file with plugin).
4545

46-
## Example
46+
## 📖 Example
4747
Here are the examples of various plugins usage:
48-
```
48+
```bash
4949
# Capture from wlp2s0 interface using raw sockets, print flows to console
5050
./ipfixprobe -i 'raw;ifc=wlp2s0' -o 'text'
5151

@@ -78,61 +78,103 @@ Here are the examples of various plugins usage:
7878

7979
## Build
8080

81-
### Requirements
82-
- libatomic
83-
- [telemetry](https://github.com/CESNET/telemetry) (mandatory) — can be installed from the [COPR repository](https://copr.fedorainfracloud.org/coprs/g/CESNET/NEMEA-stable/package/telemetry/) or built from source code
84-
- kernel version at least 3.19 when using raw sockets input plugin enabled by default (disable with `--without-raw` parameter for `./configure`)
85-
- [libpcap](http://www.tcpdump.org/) when compiling with pcap plugin (`--with-pcap` parameter)
86-
- netcope-common [COMBO cards](https://www.liberouter.org/technologies/cards/) when compiling with ndp plugin (`--with-ndp` parameter)
87-
- libunwind-devel when compiling with stack unwind on crash feature (`--with-unwind` parameter)
88-
- [nemea](http://github.com/CESNET/Nemea-Framework) when compiling with unirec output plugin (`--with-nemea` parameter)
89-
- cloned submodule with googletest framework to enabled optional tests (`--with-gtest` parameter)
81+
### 📦 Requirements
9082

91-
To compile DPDK interfaces, make sure you have DPDK libraries (and development files) installed and set the `PKG_CONFIG_PATH` environment variable if necessary. You can obtain the latest DPDK at http://core.dpdk.org/download/ Use `--with-dpdk` parameter of the `configure` script to enable it.
83+
- `libatomic`
84+
- [telemetry](https://github.com/CESNET/telemetry) (**required**) Installable from the [COPR repository](https://copr.fedorainfracloud.org/coprs/g/CESNET/NEMEA-stable/package/telemetry/) or buildable from source
85+
- Linux kernel version **≥ 3.19**
86+
- [libpcap](http://www.tcpdump.org/) — required for PCAP input plugin (`-DENABLE_INPUT_PCAP`)
87+
- `netcope-common` — required for NDP input plugin with [COMBO cards](https://www.liberouter.org/technologies/cards/) (`-DENABLE_INPUT_NFB`)
88+
- `libunwind-devel`
89+
- [NEMEA](http://github.com/CESNET/Nemea-Framework) — required for UniRec output plugin (`-DENABLE_NEMEA`, `-DENABLE_OUTPUT_UNIREC`)
90+
- [DPDK](http://core.dpdk.org/download/) — required for DPDK input plugin (`-DENABLE_INPUT_DPDK`)
9291

93-
### Source codes
92+
> For most conventional monitoring use-cases (not requiring high-speed packet libraries like DPDK or NDP), you can install required dependencies using the following commands:
9493
95-
This project uses a standard process of:
94+
#### 🐧 RHEL9-based distributions
9695

96+
```bash
97+
sudo yum-config-manager --add-repo https://yum.oracle.com/repo/OracleLinux/OL9/codeready/builder/x86_64/
98+
sudo dnf copr enable @CESNET/NEMEA-stable
99+
sudo dnf install -y git wget curl net-tools gcc gcc-c++ \
100+
libtool lz4-devel rpm-build fuse3-devel make cmake rpm \
101+
libatomic libunwind-devel openssl-devel pkgconf-pkg-config \
102+
telemetry gcc-toolset-14-libatomic-devel
97103
```
104+
105+
---
106+
107+
### ⚙️ Project Setup with CMake
108+
109+
This project uses the standard CMake build system. Example setup:
110+
111+
```bash
98112
git clone --recurse-submodules https://github.com/CESNET/ipfixprobe
99113
cd ipfixprobe
100-
autoreconf -i
101-
./configure
102-
make
103-
sudo make install
114+
mkdir build && cd build
115+
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
116+
```
117+
118+
To view available build options:
119+
120+
```bash
121+
cmake -LAH
122+
```
123+
124+
### 🔧 Notable CMake Build Options
125+
126+
| Option | Description |
127+
|--------------------------------|--------------------------------------------------------------------------|
128+
| `ENABLE_MILISECONDS_TIMESTAMPS`| Enable millisecond timestamp precision |
129+
| `ENABLE_NEMEA` | Enable support for NEMEA modules |
130+
| `ENABLE_RPMBUILD` | Enable building of RPM packages (enabled by default) |
131+
| `ENABLE_TESTS` | Enable building of unit and integration tests |
132+
| `ENABLE_INPUT_PCAP` | Build PCAP input plugin (requires `libpcap`) |
133+
| `ENABLE_INPUT_NFB` | Build NFB input plugin (requires `netcope-common`) |
134+
| `ENABLE_INPUT_DPDK` | Build DPDK input plugin (requires `dpdk`) |
135+
136+
137+
---
138+
139+
### 🛠️ Build from Source
140+
141+
Once the CMake project is configured, build the project using:
142+
143+
```bash
144+
make -j
104145
```
105146

106-
Check `./configure --help` for more details and settings.
147+
The resulting binary will be located at:
107148

108-
### RPM packages
149+
```bash
150+
ipfixprobe/build/src/core/ipfixprobe
151+
```
109152

110-
RPM package can be created in the following versions using `--with` parameter of `rpmbuild`:
111-
- `--with pcap` enables RPM with pcap input plugin
112-
- `--with ndp` enables RPM with netcope-common, i.e., ndp input plugin
113-
- `--with nemea` enables RPM with unirec output plugin
114-
- `--without raw` disables RPM with default raw socket input plugin
115-
- `--with unwind` enables RPM with stack unwinding feature
153+
To install the binary system-wide:
116154

117-
These parameters affect required dependencies of the RPM and build process.
155+
```bash
156+
make install
157+
```
158+
159+
---
118160

119-
The default configuration of the RPM can be created using simply: `make rpm`
161+
### 📦 Build RPM Packages
120162

121-
Alternative versions (described in the following section) can be created by:
122-
- NEMEA version of RPM: `make rpm-nemea`
123-
- NDP version of RPM: `make rpm-ndp`
163+
RPM packages are created automatically based on the enabled CMake options.
124164

125-
We use [COPR infrastructure](https://copr.fedorainfracloud.org/coprs/g/CESNET/NEMEA/) to build and serve RPM packages for EPEL9.
126-
It is not possible to pass arguments to rpmbuild, so there is an option in configure to enforce NEMEA dependency:
165+
If the project is configured with `ENABLE_RPMBUILD` (enabled by default), you can build RPM packages using:
127166

128-
`./configure --enable-coprrpm && make srpm`
167+
```bash
168+
make -j rpm
169+
```
129170

130-
The output source RPM can be uploaded to copr.
171+
The resulting RPM files will be located in:
131172

132-
To install ipfixprobe with NEMEA dependency from binary RPM packages, it is possible to follow instructions on:
133-
[https://copr.fedorainfracloud.org/coprs/g/CESNET/NEMEA/](https://copr.fedorainfracloud.org/coprs/g/CESNET/NEMEA/)
173+
```
174+
ipfixprobe/build/pkg/rpm/rpmbuild/
175+
```
134176

135-
## Telemetry
177+
## 📈 Telemetry
136178

137179
`ipfixprobe` exports statistics and other diagnostic information through a telemetry interface based on appFs library, which leverages the fuse3 library (filesystem in userspace) to allow telemetry data to be accessed and manipulated
138180
through standard filesystem operations.
@@ -228,7 +270,7 @@ The pipeline directory provides statistics for all worker queues. Each queue is
228270
```
229271
230272
231-
## Input / Output of the flow exporter
273+
## 📥 Input / Output of the flow exporter
232274
233275
The availability of the input and output interfaces depends on the ipfixprobe build settings. By default, we provide RPM package with pcap and raw inputs. The default provided outpus are ipfix and text.
234276
@@ -245,7 +287,7 @@ from special HW acceleration FPGA cards. For more information about the cards,
245287
visit [COMBO cards](https://www.liberouter.org/technologies/cards/) or contact
246288
us.
247289
248-
### Output
290+
### 📤 Output
249291
250292
There are several currently available output plugins, such as:
251293
@@ -261,7 +303,7 @@ LZ4 compression:
261303
ipfix plugin supports LZ4 compression algorithm over tcp. See plugin's help for more information.
262304
263305
264-
## Possible issues
306+
## ⚠️ Possible issues
265307
### Flows are not send to output interface when reading small pcap file (NEMEA output)
266308
267309
Turn off message buffering using `buffer=off` option and set `timeout=WAIT` on output interfaces.

0 commit comments

Comments
 (0)