Air-Gapped Installation
Follow the process below to install AxonOps within air-gapped systems.
Select the OS Family
Download Packages on Online Machine
Section titled “Download Packages on Online Machine”Set up Dependencies
Section titled “Set up Dependencies”Prior to downloading the AxonOps packages, we must first install any missing packages on our online machine and setup the AxonOps package repository using the following steps:
#!/usr/bin/env /bin/bash
# install dependenciessudo apt-get updatesudo apt-get install -y \ apt-rdepends \ dpkg-dev \ curl \ gnupg
# install AxonOps keycurl -L https://packages.axonops.com/apt/repo-signing-key.gpg \ | sudo gpg --dearmor -o /usr/share/keyrings/axonops.gpg
# setup AxonOps repositoryecho "deb [signed-by=/usr/share/keyrings/axonops.gpg]\ https://packages.axonops.com/apt axonops-apt main" \ | sudo tee /etc/apt/sources.list.d/axonops-apt.listsudo apt-get updateDownload Packages
Section titled “Download Packages”Follow the instructions below to download the necessary packages to the online machine's
/tmp directory. The bundled tarball(s) can then be easily transferred to the air-gapped
machine.
Since axon-dash-pdf2 relies on virtual Debian packages, we must first download these
packages separately and by name:
#!/usr/bin/env /bin/bash
# create temporary location for downloading packagesmkdir -p "/tmp/downloads/axon-dash-pdf2-predependencies"cd "/tmp/downloads/axon-dash-pdf2-predependencies"
# install predependencies for axon-dash-pdf2services=( dbus-user-session libayatana-appindicator1 libayatana-appindicator3-1 libdbusmenu-glib4 libayatana-indicator3-7 libdbusmenu-gtk3-4 python3 libappindicator1)for service in "${services[@]}"; do # download axon-dash-pdf2 virtual package predependencies sudo apt-get download $(\ sudo apt-rdepends "${service}" \ | grep -v "^ " \ | sed 's|debconf-2.0|debconf|' \ | sed 's|libappindicator1|libayatana-appindicator3-1|' \ | sed 's|libgcc1|libgcc-s1|' \ | sed 's|default-dbus-session-bus|dbus-user-session|' \ | sed 's|dbus-session-bus|dbus|' \ | sed 's|^gsettings-backend$||' \ )done
# create Packages index filesdpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
# create tarball with downloaded packagesmkdir -p "/tmp/bundles"tar -czf "/tmp/bundles/axon-dash-pdf2-predependencies.deb.tgz" .Download all additional AxonOps packages and dependencies:
#!/usr/bin/env /bin/bash
# download axonops packages and dependenciesservices=( axon-dash-pdf2 axon-dash axon-server axon-agent axon-cassandra3.0-agent axon-cassandra3.11-agent axon-cassandra4.0-agent axon-cassandra4.0-agent-jdk8 axon-cassandra4.1-agent axon-cassandra4.1-agent-jdk8 axon-cassandra5.0-agent-jdk11 axon-cassandra5.0-agent-jdk17 axon-kafka2-agent axon-kafka3-agent axon-kafka4-agent)for service in "${services[@]}"; do # create temporary location for downloading packages mkdir -p "/tmp/downloads/${service}" cd "/tmp/downloads/${service}"
# download dependencies sudo apt-get download $(\ sudo apt-rdepends "${service}" \ | grep -v "^ " \ | sed 's|debconf-2.0|debconf|' \ | sed 's|libappindicator1|libayatana-appindicator3-1|' \ | sed 's|libgcc1|libgcc-s1|' \ | sed 's|default-dbus-session-bus|dbus-user-session|' \ | sed 's|dbus-session-bus|dbus|' \ | sed 's|^gsettings-backend$||' \ ) # create Packages index files dpkg-scanpackages $(pwd) /dev/null | gzip -9c > Packages.gz
# create tarball with downloaded packages mkdir -p "/tmp/bundles" tar -czf "/tmp/bundles/${service}.deb.tgz" .doneInstall Packages on Air-Gapped Machine
Section titled “Install Packages on Air-Gapped Machine”On the air-gapped machine:
- transfer the intended tarballs produced in the previous step to a temporary directory,
- navigate into that directory,
- and run the following commands to:
- define the helper function
- and install the targeted software(s).
Install the Server and Dashboard
Section titled “Install the Server and Dashboard”Use the following script to install axon-server and axon-dash on the offline
machine. axon-server and axon-dash can be installed on the same machine or be
configured to communicate across two machines.
The axon-dash-pdf2 package is optional and provides support for generating PDF reports.
#!/usr/bin/env /bin/bash
# define installation helper functionfunction install_dependency() { service=${1}
mkdir -p "/opt/offline/axonops/${service}" tar xf "${service}.deb.tgz" --directory "/opt/offline/axonops/${service}" if [[ "$service" == "axon-dash-pdf2-predependencies" ]]; then sudo dpkg -i /opt/offline/axonops/${service}/libpython3*-minimal* sudo dpkg -i /opt/offline/axonops/${service}/python3*-minimal* sudo dpkg -i /opt/offline/axonops/${service}/*.deb || ( echo "Working through Python dependencies..." sudo dpkg -i /opt/offline/axonops/${service}/*.deb ) else sudo dpkg -i /opt/offline/axonops/${service}/*.deb fi}
# (optional) install axon-dash dependency to enable pdf generationinstall_dependency axon-dash-pdf2-predependenciesinstall_dependency axon-dash-pdf2
# install axon-dashinstall_dependency axon-dash
# install axon-serverinstall_dependency axon-serverInstall the Agent
Section titled “Install the Agent”Use the following script to install the axon-agent as well as a version of
axon-cassandra*-agent or axon-kafka*-agent that coincides with the version of
Cassandra/Kafka and the Java JDK that is being used.
#!/usr/bin/env /bin/bash
# define installation helper functionfunction install_dependency() { service=${1}
mkdir -p "/opt/offline/axonops/${service}" tar xf "${service}.deb.tgz" --directory "/opt/offline/axonops/${service}" if [[ "$service" == "axon-dash-pdf2-predependencies" ]]; then sudo dpkg -i /opt/offline/axonops/${service}/libpython3*-minimal* sudo dpkg -i /opt/offline/axonops/${service}/python3*-minimal* sudo dpkg -i /opt/offline/axonops/${service}/*.deb || ( echo "Working through Python dependencies..." sudo dpkg -i /opt/offline/axonops/${service}/*.deb ) else sudo dpkg -i /opt/offline/axonops/${service}/*.deb fi}
# install axon-agent on Cassandra/Kafka nodesinstall_dependency axon-agent
## (choose one of the following)## install matching axon-cassandra/axon-kafka agent on the Cassandra/Kafka nodes# install_dependency axon-cassandra3.0-agent# install_dependency axon-cassandra3.11-agent# install_dependency axon-cassandra4.0-agent# install_dependency axon-cassandra4.0-agent-jdk8# install_dependency axon-cassandra4.1-agent# install_dependency axon-cassandra4.1-agent-jdk8# install_dependency axon-cassandra5.0-agent-jdk11# install_dependency axon-cassandra5.0-agent-jdk17# install_dependency axon-kafka2-agent# install_dependency axon-kafka3-agent# install_dependency axon-kafka4-agentConfigure Software
Section titled “Configure Software”Configure Server and Dashboard
Section titled “Configure Server and Dashboard”Once installed, ensure the axon-server and axon-dash are configured
correctly by:
- ensuring the target software is not running,
- configuring the relevant configuration file,
- and restarting the target service.
# configure axon-serversystemctl stop axon-servervi /etc/axonops/axon-server.ymlsystemctl restart axon-server
# configure axon-dashsystemctl stop axon-dashvi /etc/axonops/axon-dash.ymlsystemctl restart axon-dashConfigure and Load Agents
Section titled “Configure and Load Agents”On the Cassandra/Kafka machine, run the following commands to configure axon-agent and
ensure Cassandra/Kafka loads the agent. Use the instructions found on the
axon-agent Installation page to:
- configure
axon-agent, - configure Cassandra/Kafka to load the agent,
- configure the Cassandra/Kafka user groups,
- and restart the Cassandra/Kafka process.
# ensure the axon-agent is not runningsystemctl stop axon-agent
# configure the agentvi /etc/axonops/axon-agent.yml
## FOR CASSANDRA
# configure Cassandra to load the agentvi /etc/cassandra/cassandra-env.sh
# configure Cassandra user groupssudo usermod -aG "$CASSANDRA_GROUP" axonopssudo usermod -aG axonops "$CASSANDRA_USER"
# restart Cassandra to load the agentsystemctl restart cassandra
## FOR KAFKA
# configure Kafka to load the agentvi "$KAFKA_HOME/bin/kafka-server-start.sh"
# configure Kafka user groupssudo usermod -aG "$KAFKA_GROUP" axonopssudo usermod -aG axonops "$KAFKA_USER"
# restart Kafka to load the agent"$KAFKA_HOME/bin/kafka-server-stop.sh""$KAFKA_HOME/bin/kafka-server-start.sh"
## FOR BOTH
# restart the agentsystemctl restart axon-agentUpgrading
Section titled “Upgrading”When upgrading your air-gapped AxonOps installation, simply follow the above instructions to:
- download the target packages and dependencies on an online machine,
- extract the tarball(s) on the offline machine,
- and run the select
install_dependencycommands.
Feel free to adjust the extracted path to maintain proper versioning accordingly.
After the new versions have been installed, run the following commands to load the new configuration file changes and restart the select service(s):
sudo systemctl daemon-reloadsudo systemctl restart $service