Skip to content

Commit 983024b

Browse files
authored
Merge pull request #38 from obsrvbl-oss/update_public_repository
Update to v5.1.3
2 parents be541d7 + 8d5591b commit 983024b

File tree

22 files changed

+314
-92
lines changed

22 files changed

+314
-92
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 14 additions & 10 deletions
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

Lines changed: 5 additions & 5 deletions
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/autoinstall/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Ubuntu Autoinstall
2+
3+
Link: https://canonical-subiquity.readthedocs-hosted.com/en/latest/intro-to-autoinstall.html
4+
5+
## DHCP/Static IP
6+
7+
* Automated DHCP: `nocloud-dhcp/user-data`
8+
* Static IP: `nocloud-nodhcp/user-data` (there is
9+
*interactive-sections* which will invoke text UI to enter IP
10+
address manually or select the DHCP).
11+
12+
13+
## Note
14+
15+
The `autoinstall.yaml` is expected to be present in the root of ISO
16+
Image. Its format is missing main `autoinstall:` header in 22.04. In
17+
later version (>= 24) it is expected to have different indentation:
18+
19+
```yaml
20+
# Autoinstall configuration
21+
autoinstall:
22+
version: 1
23+
24+
# Storage configuration with LVM
25+
storage:
26+
layout:
27+
name: lvm
28+
...
29+
```
30+

images/iso/autoinstall/nocloud-dhcp/meta-data

Whitespace-only changes.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#cloud-config
2+
# https://ubuntu.com/server/docs/install/autoinstall-reference
3+
autoinstall:
4+
version: 1
5+
6+
interactive-sections:
7+
- network
8+
- identity
9+
- locale
10+
- keyboard
11+
12+
13+
apt:
14+
fallback: offline-install
15+
preserve_sources_list: false
16+
17+
18+
19+
20+
source:
21+
search_drivers: false
22+
id: ubuntu-server
23+
24+
storage:
25+
layout:
26+
name: lvm
27+
28+
29+
30+
31+
users:
32+
- name: ubuntu
33+
groups: [adm, cdrom, dip, plugdev, lxd, sudo]
34+
lock-passwd: false
35+
sudo: ALL=(ALL) NOPASSWD:ALL
36+
shell: /bin/bash
37+
locale: en_US.UTF-8
38+
timezone: UTC
39+
40+
ssh:
41+
install-server: true
42+
allow-pw: true
43+
ssh_pwauth: true
44+
45+
resize_rootfs: false
46+
47+
# iptables-persistent settings
48+
early-commands:
49+
- echo 'iptables-persistent iptables-persistent/autosave_v6 boolean false' | debconf-set-selections
50+
- echo 'iptables-persistent iptables-persistent/autosave_v4 boolean false' | debconf-set-selections
51+
52+
53+
54+
late-commands:
55+
- rm -r /target/var/cache/apt
56+
- cp -r /cdrom/apt /target/var/cache/
57+
- curtin in-target --target /target -- apt-get -yy install apt-transport-https iptables-persistent ipset libjansson4 libltdl7 liblzo2-2 libnet1 libyaml-0-2 nano ntp ntpdate snmp tcpdump net-tools libsnappy1v5 python3-dateutil
58+
- |
59+
if [ -d /sys/firmware/efi ]; then
60+
apt-get install -y efibootmgr
61+
efibootmgr -o $(efibootmgr | perl -n -e '/Boot(.+)\* ubuntu/ && print $1')
62+
fi
63+
- cp -r /cdrom/ona/ /target/root/
64+
- curtin in-target --target=/target -- bash -xv /root/ona/configure.sh
65+

images/iso/build_iso.sh

Lines changed: 117 additions & 26 deletions
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+

0 commit comments

Comments
 (0)