Skip to content

Commit 99b20c9

Browse files
committed
Update to 5.1.3
1 parent be541d7 commit 99b20c9

19 files changed

+217
-148
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ index.html
2121
.coverage
2222

2323
images/iso/*.iso
24+
images/iso/local_files/
2425
packaging/output/
2526
packaging/root/opt/obsrvbl-ona/netflow/
2627
packaging/root/opt/obsrvbl-ona/ipfix/

Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
ARCH ?= amd64
15-
VERSION := 5.1.2
15+
VERSION := 5.1.3
1616

1717
SCRIPTS_DIR := src/scripts
1818
uPNA_DIR := src/uPNA
@@ -71,13 +71,13 @@ ona-service_RaspbianJessie_%.deb:
7171
mkdir -p $(dir $@)
7272
python package_builder.py $(notdir $*) ${VERSION} RaspbianJessie
7373

74-
ona-service_UbuntuXenial_%.deb:
74+
ona-service_UbuntuNoble_%.deb:
7575
mkdir -p $(dir $@)
76-
python package_builder.py $(notdir $*) ${VERSION} UbuntuXenial
76+
python package_builder.py $(notdir $*) ${VERSION} UbuntuNoble
7777

78-
ona-service_UbuntuXenialContainer_%.deb:
78+
ona-service_UbuntuNobleContainer_%.deb:
7979
mkdir -p $(dir $@)
80-
python package_builder.py $(notdir $*) ${VERSION} UbuntuXenialContainer
80+
python package_builder.py $(notdir $*) ${VERSION} UbuntuNobleContainer
8181

8282
.PHONY: clean
8383
clean:

README.md

+14-10
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,28 @@
22

33
This repository is where the development of the Observable Networks Appliance (ONA) takes place. The ONA software is used to collect input data for Observable Networks' network security service. It can run on a variety of platforms, including embedded computers, physical servers, virtual machines, cloud servers, and Docker containers.
44

5-
## Supported platforms
5+
## Download
66

7-
The following platforms are officially supported:
7+
### ISO (fully supported and recommended):
88

9-
* [Ubuntu 18.04 and later](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_UbuntuXenial_amd64.deb)
10-
* [RHEL 7 and compatible](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_RHEL_7_x86_64.rpm)
11-
* [RHEL 8 and compatible](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_RHEL_8_x86_64.rpm)
12-
* [Raspberry Pi with Raspbian (ARMHF)](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_RaspbianJessie_armhf.deb)
9+
* [Ubuntu 24.04](https://assets-production.obsrvbl.com/ona-packages/iso/ona-24.04.1-v5.1.3/ona-24.04.1-server-amd64.iso)
10+
11+
### Package files for manual installation:
12+
13+
* [Ubuntu 24.04 and later](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.3/ona-service_UbuntuNoble_amd64.deb)
14+
* [RHEL 7 and compatible](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.3/ona-service_RHEL_7_x86_64.rpm)
15+
* [RHEL 8 and compatible](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.3/ona-service_RHEL_8_x86_64.rpm)
16+
* [Raspberry Pi with Raspbian (ARMHF)](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.3/ona-service_RaspbianJessie_armhf.deb)
1317
([installation guide](raspberry_pi_guide.md))
14-
* [Raspberry Pi with Raspbian (ARM64)](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_RaspbianJessie_aarch64.deb)
18+
* [Raspberry Pi with Raspbian (ARM64)](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.3/ona-service_RaspbianJessie_aarch64.deb)
1519
([installation guide](raspberry_pi_guide.md))
1620
* [Docker](https://github.com/obsrvbl/ona/blob/master/images/docker/Dockerfile)
1721

18-
To install the latest version on 20.04 (recommended for physical and virtual machine installations):
22+
To install the latest version on Ubuntu:
1923

2024
```
21-
$ wget https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_UbuntuXenial_amd64.deb
22-
$ sudo apt install ./ona-service_UbuntuXenial_amd64.deb
25+
$ wget https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.3/ona-service_UbuntuNoble_amd64.deb
26+
$ sudo apt install ./ona-service_UbuntuNoble_amd64.deb
2327
```
2428

2529
To monitor NetFlow traffic, you'll also need to install tools from the [CERT NetSA Security Suite](https://tools.netsa.cert.org/):

images/docker/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ RUN curl -L -O https://assets-production.obsrvbl.com/ona-packages/netsa/v0.1.27/
4848
&& rm -rf netsa-pkg.deb
4949

5050
# Use local copy of ONA service package if needed
51-
# COPY ona-service_UbuntuXenialContainer_amd64.deb ./
51+
# COPY ona-service_UbuntuNobleContainer_amd64.deb ./
5252

5353
# Install ONA service
54-
RUN if [ ! -f ./ona-service_UbuntuXenialContainer_amd64.deb ] ;\
55-
then curl -L -O https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_UbuntuXenialContainer_amd64.deb ;\
54+
RUN if [ ! -f ./ona-service_UbuntuNobleContainer_amd64.deb ] ;\
55+
then curl -L -O https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.3/ona-service_UbuntuNobleContainer_amd64.deb ;\
5656
else echo "Use cached package" ;fi \
57-
&& apt-get update && apt-get install --assume-yes --fix-missing ./ona-service_UbuntuXenialContainer_amd64.deb \
57+
&& apt-get update && apt-get install --assume-yes --fix-missing ./ona-service_UbuntuNobleContainer_amd64.deb \
5858
&& rm -rf /var/lib/apt/lists/* \
59-
&& rm -rf ona-service_UbuntuXenialContainer_amd64.deb
59+
&& rm -rf ona-service_UbuntuNobleContainer_amd64.deb
6060

6161
# Switch to the unprivileged user, set some local configuration, and start.
6262
COPY run.sh /opt/obsrvbl-ona/run.sh

images/iso/build_iso.sh

+117-26
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
# wrong.
2222
#
2323

24-
RELEASE="${RELEASE:-20.04.1}"
24+
RELEASE="${RELEASE:-24.04.1}"
2525
ARCH="${ARCH:-amd64}"
26-
VARIANT="${VARIANT:-legacy}"
26+
VARIANT="${VARIANT:-subiquity}"
2727

2828

2929
DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
@@ -45,47 +45,138 @@ while getopts "f:a:r:" opt ; do
4545
;;
4646
esac
4747
done
48+
# Newly added
49+
ubuntu_name="ubuntu-${RELEASE}-live-server-${ARCH}.iso"
50+
ona_name="ona-${RELEASE}-server-${ARCH}.iso"
51+
ubuntu_url="${url:-$($DIR/build_iso_helper $RELEASE $VARIANT)}"
52+
53+
# ubuntu_name="ubuntu-24.04.1-live-server-amd64.iso"
54+
# ona_name="ona-${RELEASE}-server-${ARCH}.iso"
55+
ONA_URL="https://s3.amazonaws.com/onstatic/ona-service/master/"
56+
if [ -n "$PUBLIC_ONA" ]; then
57+
ONA_URL="https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/"
58+
fi
59+
# netsa_pkg_name="netsa-pkg.deb"
60+
ona_pkg_name="ona-service_UbuntuNoble_amd64.deb"
4861

49-
ubuntu_name="ubuntu-${RELEASE}-server-${ARCH}.iso"
50-
ona_name="ona-${RELEASE}-server-${ARCH}.iso"
51-
ubuntu_url="${url:-$($DIR/build_iso_helper $RELEASE $VARIANT)}"
5262
test -n "$ubuntu_url" || fatal "failed getting Ubuntu ISO download URL"
53-
ona_service_url="https://s3.amazonaws.com/onstatic/ona-service/master/ona-service_UbuntuXenial_amd64.deb"
54-
netsa_pkg_url="https://assets-production.obsrvbl.com/ona-packages/netsa/v0.1.27/netsa-pkg.deb"
63+
64+
ONA_URL="https://s3.amazonaws.com/onstatic/ona-service/master/"
65+
if [ -n "$PUBLIC_ONA" ]; then
66+
ONA_URL="https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/"
67+
68+
fi
69+
70+
#ona_service_url="${ONA_URL}ona-service_UbuntuNoble_amd64.deb"
71+
ona_service_url="https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.3/ona-service_UbuntuNoble_amd64.deb"
72+
netsa_pkg_url="https://assets-production.obsrvbl.com/ona-packages/netsa/v0.1.27/netsa-pkg.deb"
73+
74+
5575

5676
shift $(($OPTIND-1))
5777

5878
test $EUID -ne 0 && sudo="sudo"
59-
which mkisofs 1> /dev/null || fatal "missing mkisofs: $sudo apt-get install genisoimage"
60-
which isohybrid 1> /dev/null || fatal "missing isohybrid: $sudo apt-get install syslinux-utils"
6179

6280
[[ -d "$DIR" ]] || fatal # invalid directory
63-
[[ -d "$DIR"/working && $(ls -A "$DIR"/working) ]] && fatal # working directory exists and is not empty
6481
[[ -d "$DIR"/working ]] || mkdir "$DIR"/working # working directory does not exist, so create it
82+
83+
major_version=$(echo "$RELEASE" | cut -d '.' -f 1)
84+
85+
# Check if the major version number is greater than 20
86+
if [ "$major_version" -gt 20 ]; then
87+
which xorriso 1> /dev/null || fatal "missing xorriso: $sudo apt-get install xorriso -y"
88+
NEW_FORMAT=true
89+
BOOT_CAT="/boot.catalog"
90+
EFI='/boot/grub/i386-pc/eltorito.img'
91+
ELTORITO='/boot/grub/i386-pc/eltorito.img'
92+
else
93+
which mkisofs 1> /dev/null || fatal "missing mkisofs: $sudo apt-get install genisoimage"
94+
which isohybrid 1> /dev/null || fatal "missing isohybrid: $sudo apt-get install syslinux-utils"
95+
BOOT_CAT="isolinux/boot.cat"
96+
EFI="isolinux/isolinux.bin"
97+
ELTORITO="boot/grub/efi.img"
98+
fi
99+
65100
(
66101
set -e
102+
if [ ! -e "/root/$ubuntu_name" ]; then
103+
curl -L -o /root/${ubuntu_name} "${ubuntu_url}"
104+
fi
105+
67106
cd "$DIR"/working
68-
curl -L -o ${ubuntu_name} "${ubuntu_url}"
107+
#[[ -d "$DIR/local_files/" ]] && cp "$DIR"/local_files/* .
69108
curl -L -o netsa-pkg.deb "${netsa_pkg_url}"
70-
curl -L -o ona-service.deb "${ona_service_url}"
109+
#curl -L -o "${ona_pkg_name}" "${ona_service_url}"
110+
$sudo cp /obsrvbl/images/iso/ona-service_UbuntuNoble_amd64.deb /obsrvbl/images/iso/working/
111+
112+
113+
114+
115+
116+
$sudo apt-get -y update
117+
# you can install packages here if you want
118+
119+
PACKAGES="apt-transport-https iptables-persistent ipset libjansson4 libltdl7 liblzo2-2 libnet1 libyaml-0-2 nano ntp ntpdate snmp tcpdump net-tools libsnappy1v5 python3-dateutil"
120+
$sudo apt-get -yyqq install --download-only ${PACKAGES}
121+
122+
123+
124+
125+
# local is root dir in ISO
71126
mkdir cdrom local
72-
$sudo mount -o loop --read-only "${ubuntu_name}" cdrom
127+
pwd
128+
129+
$sudo mount -o loop --read-only "/root/${ubuntu_name}" cdrom
73130
rsync -av --quiet cdrom/ local
74-
$sudo cp ../preseed/* local/preseed/
131+
132+
$sudo cp -r /var/cache/apt local
75133
$sudo cp -r ../ona local
76134
$sudo cp netsa-pkg.deb local/ona/netsa-pkg.deb
77-
$sudo cp ona-service.deb local/ona/ona-service.deb
78-
$sudo cp ../isolinux/txt.cfg local/isolinux/txt.cfg
79-
$sudo cp ../isolinux/grub.cfg local/boot/grub/grub.cfg
80-
$sudo mkisofs -quiet -r -V "SWC Sensor Install CD" \
81-
-cache-inodes \
82-
-J -l -b isolinux/isolinux.bin \
83-
-c isolinux/boot.cat -no-emul-boot \
84-
-boot-load-size 4 -boot-info-table \
85-
-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
86-
-o "../${ona_name}" local
135+
$sudo cp ${ona_pkg_name} local/ona/${ona_pkg_name}
136+
137+
echo "New format: $NEW_FORMAT "
138+
if [ -n "$NEW_FORMAT" ]; then
139+
# copy autoinstall folders for grub
140+
$sudo cp -r ../autoinstall/nocloud-dhcp local/
141+
$sudo cp ../isolinux/grub.cfg local/boot/grub/grub.cfg
142+
else
143+
$sudo cp ../preseed/* local/preseed/
144+
$sudo cp ../isolinux/txt.cfg local/isolinux/txt.cfg
145+
$sudo cp ../isolinux/grub.cfg local/boot/grub/grub.cfg
146+
fi
147+
148+
if [ -n "$NEW_FORMAT" ]; then
149+
xorriso -as mkisofs -r -V 'SWC Sensor Install CD' \
150+
-o "../${ona_name}"\
151+
--grub2-mbr --interval:local_fs:0s-15s:zero_mbrpt,zero_gpt:"/root/${ubuntu_name}" \
152+
-partition_offset 16 \
153+
--mbr-force-bootable \
154+
-append_partition 2 0xef \
155+
--interval:local_fs:4099440d-4109507d::"/root/${ubuntu_name}" \
156+
-appended_part_as_gpt \
157+
-c "${BOOT_CAT}" \
158+
-b "${ELTORITO}" \
159+
-no-emul-boot -boot-load-size 4 -boot-info-table \
160+
--grub2-boot-info \
161+
-eltorito-alt-boot \
162+
-e '--interval:appended_partition_2:::' \
163+
-no-emul-boot \
164+
local
165+
else
166+
$sudo mkisofs -quiet -r -V "SWC Sensor Install CD" \
167+
-cache-inodes \
168+
-J -l -b "${BOOT_CAT}" \
169+
-c "${EFI}" -no-emul-boot \
170+
-joliet-long \
171+
-boot-load-size 4 -boot-info-table \
172+
-eltorito-alt-boot -e "${ELTORITO}" -no-emul-boot \
173+
-o "../${ona_name}" local
174+
175+
isohybrid "../${ona_name}"
176+
fi
177+
87178
$sudo umount cdrom
88179
$sudo chown $USER:$USER "../${ona_name}"
89-
isohybrid "../${ona_name}"
180+
$sudo rm -rf "$DIR"/working
90181
)
91-
$sudo rm -rf "$DIR"/working
182+

images/iso/build_iso_helper

+20-9
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ $ ./build_iso_helper --doctests
1717
1818
Real results as of February 2022:
1919
20+
>>> get_iso_url('24.04', subiquity=True)
21+
https://releases.ubuntu.com/noble/ubuntu-24.04.1-live-server-amd64.iso
22+
23+
>>> get_iso_url('22.04', subiquity=True)
24+
'https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso'
25+
2026
>>> get_iso_url('20.04.3', subiquity=True)
2127
'https://releases.ubuntu.com/20.04/ubuntu-20.04.3-live-server-amd64.iso'
2228
@@ -53,9 +59,10 @@ ValueError: no release found
5359
Traceback (most recent call last):
5460
ValueError: no Subiquity release for this version
5561
"""
62+
5663
from argparse import ArgumentParser, Action, SUPPRESS
5764
from doctest import DocTestSuite
58-
from unittest import TestCase, TextTestRunner, makeSuite
65+
from unittest import TestCase, TextTestRunner, TestLoader
5966
from unittest.mock import patch
6067
from urllib.request import Request, build_opener, HTTPRedirectHandler
6168
from urllib.error import URLError, HTTPError
@@ -120,11 +127,14 @@ def get_iso_url(version, subiquity: bool, arch='amd64'):
120127
urlpath = f'https://releases.ubuntu.com/{v.short}/'
121128
isofile = f'ubuntu-{v.long_if_patch}-live-server-{arch}.iso'
122129
else:
123-
urlpath = (
124-
'https://cdimage.ubuntu.com/ubuntu-legacy-server/releases'
125-
f'/{v.short}/release/'
126-
)
127-
isofile = f'ubuntu-{v.long_if_patch}-legacy-server-{arch}.iso'
130+
if v.major >= 22:
131+
raise ValueError(f'No legacy ISO for version {v.short}')
132+
else:
133+
urlpath = (
134+
'https://cdimage.ubuntu.com/ubuntu-legacy-server/releases'
135+
f'/{v.short}/release/'
136+
)
137+
isofile = f'ubuntu-{v.long_if_patch}-legacy-server-{arch}.iso'
128138
elif v.major >= 18:
129139
if subiquity:
130140
urlpath = f'https://releases.ubuntu.com/{v.short}/'
@@ -181,7 +191,7 @@ class Tests(TestCase):
181191

182192
def fake_head_status_code(url):
183193
if url in (
184-
f'{cd_legacy}/20.04.1/release/ubuntu-20.04.1-legacy-server-amd64.iso',
194+
f'{cd_legacy}/20.04/release/ubuntu-20.04.1-legacy-server-amd64.iso',
185195
f'{releases}/20.04/ubuntu-20.04.1-live-server-amd64.iso',
186196
f'{old}/20.04.0/ubuntu-20.04-live-server-amd64.iso',
187197
'https://www.google.com',
@@ -195,9 +205,10 @@ class Tests(TestCase):
195205
get_iso_url('20.04.1', True),
196206
f'{releases}/20.04/ubuntu-20.04.1-live-server-amd64.iso',
197207
)
208+
198209
self.assertEqual(
199210
get_iso_url('20.04.1', False),
200-
f'{cd_legacy}/20.04.1/release/ubuntu-20.04.1-legacy-server-amd64.iso',
211+
f'{cd_legacy}/20.04/release/ubuntu-20.04.1-legacy-server-amd64.iso',
201212
)
202213
self.assertEqual(
203214
get_iso_url('20.04.0', True),
@@ -210,7 +221,7 @@ class Tests(TestCase):
210221
class _TestAction(Action):
211222
def __init__(self, option_strings, dest, default=SUPPRESS, help=None):
212223
if dest == 'unittests':
213-
self._suite = makeSuite(Tests)
224+
self._suite = TestLoader().loadTestsFromTestCase(Tests)
214225
elif dest == 'doctests':
215226
self._suite = DocTestSuite()
216227
else:

images/iso/isolinux/grub.cfg

+27-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
1-
21
if loadfont /boot/grub/font.pf2 ; then
3-
set gfxmode=auto
4-
insmod efi_gop
5-
insmod efi_uga
6-
insmod gfxterm
7-
terminal_output gfxterm
2+
set gfxmode=auto
3+
insmod efi_gop
4+
insmod efi_uga
5+
insmod gfxterm
6+
terminal_output gfxterm
87
fi
98

109
set menu_color_normal=white/black
1110
set menu_color_highlight=black/light-gray
1211

1312
set timeout=30
13+
14+
loadfont unicode
15+
1416
menuentry "Install ONA (Static IP)" {
15-
set gfxpayload=keep
16-
linux /install/vmlinuz file=/cdrom/preseed/nodhcp.seed quiet ---
17-
initrd /install/initrd.gz
18-
}
19-
menuentry "Install ONA (DHCP)" {
20-
set gfxpayload=keep
21-
linux /install/vmlinuz file=/cdrom/preseed/dhcp.seed quiet ---
22-
initrd /install/initrd.gz
17+
set gfxpayload=keep
18+
linux /casper/vmlinuz debug autoinstall ds=nocloud\;s=/cdrom/nocloud-dhcp/ ---
19+
initrd /casper/initrd
2320
}
21+
22+
23+
24+
grub_platform
25+
if [ "$grub_platform" = "efi" ]; then
26+
menuentry 'Boot from next volume' {
27+
exit 1
28+
}
29+
menuentry 'UEFI Firmware Settings' {
30+
zo fwsetup
31+
}
32+
else
33+
menuentry 'Test memory' {
34+
linux16 /boot/memtest86+.bin
35+
}
36+
fi

0 commit comments

Comments
 (0)