-
Notifications
You must be signed in to change notification settings - Fork 0
ASB-2846 Add air-gapped installation instructions #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
f548f68
bbe08a4
5fac325
3d1689c
d40f98d
d3bb3fc
6e33bd8
52a179f
c9741b5
9fbd2f2
d037332
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# configure axon-server | ||
systemctl stop axon-server | ||
vi /etc/axonops/axon-server.yml | ||
systemctl restart axon-server | ||
|
||
# configure axon-dash | ||
systemctl stop axon-dash | ||
vi /etc/axonops/axon-dash.yml | ||
systemctl restart axon-dash |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env /bin/bash | ||
|
||
# define installation helper function | ||
function 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 nodes | ||
install_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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env /bin/bash | ||
|
||
# define installation helper function | ||
function 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 generation | ||
install_dependency axon-dash-pdf2-predependencies | ||
install_dependency axon-dash-pdf2 | ||
|
||
# install axon-dash | ||
install_dependency axon-dash | ||
|
||
# install axon-server | ||
install_dependency axon-server |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env /bin/bash | ||
|
||
# install dependencies | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
apt-rdepends \ | ||
dpkg-dev \ | ||
curl \ | ||
gnupg | ||
|
||
# install AxonOps key | ||
curl -L https://packages.axonops.com/apt/repo-signing-key.gpg \ | ||
| sudo gpg --dearmor -o /usr/share/keyrings/axonops.gpg | ||
|
||
# setup AxonOps repository | ||
echo "deb [arch=arm64,amd64 signed-by=/usr/share/keyrings/axonops.gpg]\ | ||
https://packages.axonops.com/apt axonops-apt main" \ | ||
| sudo tee /etc/apt/sources.list.d/axonops-apt.list | ||
sudo apt-get update |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env /bin/bash | ||
|
||
# create temporary location for downloading packages | ||
mkdir -p "/tmp/downloads/axon-dash-pdf2-predependencies" | ||
cd "/tmp/downloads/axon-dash-pdf2-predependencies" | ||
|
||
# install predependencies for axon-dash-pdf2 | ||
services=( | ||
dbus-user-session | ||
libayatana-appindicator1 | ||
libayatana-appindicator3-1 | ||
libdbusmenu-glib4 | ||
libayatana-indicator3-7 | ||
libdbusmenu-gtk3-4 | ||
python3 | ||
libappindicator1 | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the other bit I was fighting with. Once these virtual packages + python3 are installed, the rest of the dependencies will install as intended. |
||
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$||' \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the last bit I fought with. We need to swap out the virtual and package names, mainly for axon-dash-pdf, if I'm not mistaken. But once this is done, we'll download the correct package and upon installation, axon-dash-pdf will have the required dependencies. |
||
) | ||
done | ||
|
||
# create Packages index files | ||
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz | ||
|
||
# create tarball with downloaded packages | ||
mkdir -p "/tmp/bundles" | ||
tar -czf "/tmp/bundles/axon-dash-pdf2-predependencies.deb.tgz" . |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env /bin/bash | ||
|
||
# download axonops packages and dependencies | ||
services=( | ||
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 | ||
) | ||
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" . | ||
done |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
|
||
Select the OS Family | ||
|
||
<label> | ||
<input type="radio" id="Debian" name="osFamily" onChange="selectOS()" checked=true /> | ||
<img src="/get_started/debian.png" class="skip-lightbox" width="180px"> | ||
</label> | ||
<label> | ||
<input type="radio" id="RedHat" name="osFamily" onChange="selectOS()" /> | ||
<img src="/get_started/red_hat.png" class="skip-lightbox" width="180px"> | ||
</label> | ||
|
||
|
||
## Download Packages on Online Machine | ||
|
||
### Setup 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: | ||
|
||
<div id="DebianDiv" class="os" markdown="span"> | ||
|
||
```bash | ||
{!installation/air-gapped/debian/online-dependencies.sh!} | ||
``` | ||
|
||
</div> | ||
|
||
<div id="RedHatDiv" class="os" style="display:none"> | ||
|
||
```bash | ||
{!installation/air-gapped/redhat/online-dependencies.sh!} | ||
``` | ||
|
||
</div> | ||
|
||
### 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. | ||
|
||
<div id="DebianDiv" class="os" markdown="span"> | ||
|
||
Since `axon-dash-pdf2` relies on virtual Debian packages, we must first download these | ||
packages separately and by name: | ||
|
||
```bash | ||
{!installation/air-gapped/debian/online-download-predependencies.sh!} | ||
``` | ||
|
||
Download all additional AxonOps packages and dependencies: | ||
|
||
```bash | ||
{!installation/air-gapped/debian/online-download.sh!} | ||
``` | ||
|
||
</div> | ||
|
||
<div id="RedHatDiv" class="os" style="display:none"> | ||
|
||
```bash | ||
{!installation/air-gapped/redhat/online-download.sh!} | ||
``` | ||
|
||
</div> | ||
|
||
## Install Packages on Air-Gapped Machine | ||
|
||
<div id="DebianDiv" class="os" markdown="1"> | ||
|
||
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 targetted software(s). | ||
</div> | ||
<div id="RedHatDiv" class="os" style="display:none" markdown="1"> | ||
|
||
On the air-gapped machine: | ||
|
||
* transfer the tarball(s) produced in the previous step to a temporary directory, | ||
* navigate into that directory, | ||
* and run the following commands to: | ||
* setup the offline repo, | ||
* define the helper function, | ||
* and install the targetted software(s). | ||
|
||
</div> | ||
|
||
### 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. | ||
|
||
<div id="DebianDiv" class="os" markdown="1"> | ||
|
||
```bash | ||
{!installation/air-gapped/debian/offline-install.sh!} | ||
``` | ||
|
||
</div> | ||
|
||
<div id="RedHatDiv" class="os" style="display:none" markdown="1"> | ||
|
||
```bash | ||
{!installation/air-gapped/redhat/offline-install.sh!} | ||
``` | ||
|
||
</div> | ||
|
||
### 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. | ||
|
||
<div id="DebianDiv" class="os" markdown="1"> | ||
|
||
```bash | ||
{!installation/air-gapped/debian/offline-install-agent.sh!} | ||
``` | ||
|
||
</div> | ||
<div id="RedHatDiv" class="os" style="display:none" markdown="1"> | ||
|
||
```bash | ||
{!installation/air-gapped/redhat/offline-install-agent.sh!} | ||
``` | ||
|
||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Follow the process below to install AxonOps within air-gapped systems. | ||
|
||
{!installation/air-gapped/dynamic_page.md!} | ||
|
||
## Configure Software | ||
|
||
### 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. | ||
|
||
```bash | ||
{!installation/air-gapped/configure-software.sh!} | ||
``` | ||
|
||
### 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 | ||
[AxonOps Agent Installation](../agent/install.md) page to: | ||
|
||
* configure `axon-agent`, | ||
* configure Cassandra/Kafka to load the agent, | ||
* configure the Cassandra/Kafka user groups, | ||
* and restart the Cassandra/Kafka process. | ||
|
||
```bash | ||
{!installation/air-gapped/install-agent.sh!} | ||
``` | ||
|
||
## 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_dependency` commands. | ||
|
||
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): | ||
|
||
```bash | ||
sudo systemctl daemon-reload | ||
sudo systemctl restart $service | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of the bits that I kept fighting with. I was able to isolate the ordering and the fact that we need to install all the packages twice to get python3 to complete it's installation.