Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 978 Bytes

Create-RPM.adoc

File metadata and controls

42 lines (33 loc) · 978 Bytes

Creating RPMs

To create an rpm of the agent, install some tools before:

cargo install cargo-generate-rpm

To create the RPM, run:

export CARGO_TARGET_DIR="$(pwd)/target"
cargo clean
cargo build -p n8w8d --release
#strip -s ${CARGO_TARGET_DIR}/release/n8w8d
cargo generate-rpm -p agent

The final RPM file can be found in the target directory ${CARGO_TARGET_DIR}/generate-rpm.

To test the rpm, use an RHEL distro, like AlmaLinux in our example:

podman run -it --rm -v $(pwd)/target/generate-rpm/:/agent almalinux:9

In the container, you can install it now:

rpm -qilvp /agent/*.rpm
dnf update
dnf install procps
dnf localinstall /agent/*.rpm
nachtwacht-agent --user root
cat /tmp/n8w8-agent-error.log # which sould be empty!
cat /tmp/n8w8-agent.pid # this should contain the pid where the agent now runs
less -n +F /tmp/n8w8-agent.log # this should now show all the details of the node