-
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 3 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,38 @@ | ||
# define installation helper function | ||
function install_dependency() { | ||
service=${1} | ||
|
||
mkdir -p "/var/cache/apt/archives/${service}" | ||
tar xf "${service}.deb.tgz" --directory "/var/cache/apt/archives/${service}" | ||
if [[ "$service" == "axon-dash-pdf-predependencies" ]]; then | ||
sudo dpkg -i /var/cache/apt/archives/${service}/libpython3.9-minimal* | ||
sudo dpkg -i /var/cache/apt/archives/${service}/python3.9-minimal* | ||
sudo dpkg -i /var/cache/apt/archives/${service}/*.deb || ( | ||
echo "Working through Python dependencies..." | ||
sudo dpkg -i /var/cache/apt/archives/${service}/*.deb | ||
) | ||
else | ||
sudo dpkg -i /var/cache/apt/archives/${service}/*.deb | ||
fi | ||
} | ||
|
||
# install axon-dash | ||
install_dependency axon-dash-pdf-predependencies | ||
install_dependency axon-dash-pdf | ||
install_dependency axon-dash | ||
|
||
# install axon-server | ||
install_dependency axon-server | ||
|
||
# install axon-agent on Cassandra node | ||
install_dependency axon-agent | ||
|
||
# install matching axon-cassandra agent on Cassandra node (choose one) | ||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# 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,35 @@ | ||
# create temporary location for downloading packages | ||
mkdir -p "/tmp/downloads/axon-dash-pdf-predependencies" | ||
cd "/tmp/downloads/axon-dash-pdf-predependencies" | ||
|
||
# install predependencies for axon-dash-pdf | ||
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-pdf 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-pdf-predependencies.deb.tgz" . |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# download axonops packages and dependencies | ||
services=( | ||
axon-dash-pdf | ||
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 | ||
) | ||
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,102 @@ | ||
|
||
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-pdf` 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). | ||
|
||
|
||
```bash | ||
{!installation/air-gapped/debian/offline-install.sh!} | ||
``` | ||
|
||
</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). | ||
|
||
```bash | ||
{!installation/air-gapped/redhat/offline-install.sh!} | ||
``` | ||
|
||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Follow the process below to install AxonOps within air-gapped systems. | ||
|
||
{!installation/air-gapped/dynamic_page.md!} | ||
|
||
## Configure Software | ||
|
||
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!} | ||
``` | ||
|
||
## Install Agent | ||
|
||
On the Cassandra machine, run the following commands to configure `axon-agent` and | ||
ensure Cassandra loads the agent. Use the instructions found [here](../agent/install.md) | ||
to: | ||
|
||
* configure `axon-agent` | ||
* and configure Cassandra to load the agent. | ||
|
||
```bash | ||
{!installation/air-gapped/install-agent.sh!} | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# ensure the axon-agent is not running | ||
systemctl stop axon-agent | ||
|
||
# configure the agent | ||
vi /etc/axonops/axon-agent.yml | ||
|
||
# configure Cassandra to load the agent | ||
vi /etc/cassandra/cassandra-env.sh | ||
|
||
# restart the agent | ||
systemctl restart axon-agent | ||
|
||
# restart Cassandra to load the agent | ||
systemctl restart cassandra |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# extract packages into the offline repository location | ||
sudo mkdir -p /opt/offline/axonops | ||
sudo tar -C /opt/offline/axonops \ | ||
-xzf ./axonops-x86_64.rpm.tgz \ | ||
--strip-components=1 | ||
|
||
# setup the offline repository | ||
sudo tee /etc/yum.repos.d/axonops-offline.repo \ | ||
>/dev/null <<'EOF' | ||
[axonops-offline] | ||
name=AxonOps Offline | ||
baseurl=file:///opt/offline/axonops | ||
enabled=1 | ||
gpgcheck=0 | ||
EOF | ||
|
||
# define installation helper function | ||
function install_dependency() { | ||
service=${1} | ||
|
||
sudo dnf5 \ | ||
--disablerepo='*' \ | ||
--enablerepo="axonops-offline" \ | ||
install \ | ||
-y \ | ||
--nogpgcheck \ | ||
"${service}" | ||
} | ||
|
||
# install axon-dash | ||
install_dependency axon-dash-pdf | ||
install_dependency axon-dash | ||
|
||
# install axon-server | ||
install_dependency axon-server | ||
|
||
# install axon-agent on Cassandra node | ||
install_dependency axon-agent | ||
|
||
# install matching axon-cassandra agent on Cassandra node (choose one) | ||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# install dependency needed for creating repomd repository | ||
sudo dnf install -y createrepo_c | ||
|
||
# setup AxonOps repository | ||
cat >/etc/yum.repos.d/axonops-yum.repo <<EOF | ||
[axonops-yum] | ||
name=axonops-yum | ||
baseurl=https://packages.axonops.com/yum/ | ||
enabled=1 | ||
repo_gpgcheck=0 | ||
gpgcheck=0 | ||
EOF |
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.