Community discussions

MikroTik App
 
User avatar
CTassisF
newbie
Topic Author
Posts: 35
Joined: Thu Jun 11, 2020 10:26 pm
Location: São Paulo, Brazil
Contact:

RIPE Atlas Software Probe running on v7.1rc3 [development]

Sat Sep 11, 2021 3:17 am

Now that RouterOS v7.1rc3 supports running containers, I took the time to create a Docker image to run RIPE Atlas Software Probe on my MikroTik router.

The image is based on the official code provided by RIPE NCC, with a few tweaks to make it run under Alpine Linux. Alpine is based on musl, not glibc, and that makes the image a lot smaller and faster to run in containers. I'm currently running it on my hAP ac³ and it is working great :D

To use this image is very simple:
# Create veth interface
/interface/veth/add address=172.16.0.1/24 gateway=172.16.0.254 name=veth1

# Create bridge interface
/interface/bridge/add admin-mac=00:53:FF:1A:2B:3C auto-mac=no mtu=1500 name=bridge-docker

# Add IPv4 to bridge
/ip/address/add address=172.16.0.254/24 interface=bridge-docker

# Add veth to bridge
/interface/bridge/port/add bridge=bridge-docker ingress-filtering=no interface=veth1

# Add bridge to LAN (so it can do NAT)
/interface/list/member/add interface=bridge-docker list=LAN

# Create mounts for /var/atlas-probe/etc and /var/atlas-probe/status
/container/mounts/add dst=/var/atlas-probe/etc name=atlas-probe-etc src=atlas-probe-etc
/container/mounts/add dst=/var/atlas-probe/status name=atlas-probe-status src=atlas-probe-status

# Create container
/container/add dns=172.16.0.254 hostname=ripe-atlas interface=veth1 mounts=atlas-probe-etc,atlas-probe-status root-dir=ripe-atlas start-on-boot=yes remote-image=ctassisf/ripe-atlas-alpine:latest

# Start container
/container/start number=0

# Check if container is status=running
/container/print

Use the public SSH key probe_key.pub saved in your router's storage to register your probe here: https://atlas.ripe.net/apply/swprobe/

And then let me know if it worked for you :)

This is still a work in progress. Maybe there's something not quite right. I'm also interested in making IPv6 work (either natively or through NAT) but I wasn't able to do so yet.

You can see my probe running here. I'm also attaching some screenshots showing how my hAP ac³ is handling the load (it doesn't make a dent lol).

Project is available on GitHub and Docker Hub.

More info can also be found on MikroTik Documentation.
You do not have the required permissions to view the files attached to this post.
Last edited by CTassisF on Thu Feb 16, 2023 11:05 pm, edited 3 times in total.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26287
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: RIPE Atlas Software Probe running on v7.1rc3 [development]

Sat Sep 11, 2021 10:37 am

Thanks for the tutorial!
 
vovailchenko
just joined
Posts: 16
Joined: Fri Sep 08, 2017 1:20 pm

Re: RIPE Atlas Software Probe running on v7.1rc3 [development]

Thu Dec 01, 2022 6:58 pm

Hello CTassisF
Thank you for the tutorial.
I've tried it and it works like a charm - until a reboot.
After reboot - i can not start the container. webfig/winbox/cli - nothing works. nothing happens - no messages. and container is still stopped. there are no messages in the log (logging is enabled on the container and as a topic in /system/logging).
I'm storing the image tar-file, as well as mount-points on the external USB-stick (ext4 fs). I'm using hap ac^2.

Have you ever encountered anything like this? I saw some messages on the forum, but those bugs were resolved in 7.5betax - i'm using 7.6 stable now.
 
User avatar
Maggiore81
Trainer
Trainer
Posts: 558
Joined: Sun Apr 15, 2012 12:10 pm
Location: Italy
Contact:

Re: RIPE Atlas Software Probe running on v7.1rc3 [development]

Sun Feb 26, 2023 7:24 pm

News on this topic?
 
User avatar
CTassisF
newbie
Topic Author
Posts: 35
Joined: Thu Jun 11, 2020 10:26 pm
Location: São Paulo, Brazil
Contact:

Re: RIPE Atlas Software Probe running on v7.1rc3 [development]

Mon Feb 27, 2023 3:33 am

These images continue to work fine with my MikroTik devices (RB5009 (arm64) and hAP ac³ (arm)).

By the way, I recently updated the instructions above to reflect the new images available in Docker Hub.

Please let me know if you're still having issues with ctassisf/ripe-atlas-alpine.
 
Mitar
newbie
Posts: 35
Joined: Thu Mar 28, 2013 1:07 am

Re: RIPE Atlas Software Probe running on v7.1rc3 [development]

Sun May 07, 2023 12:49 am

It works great on Hap AX2, BUT I have noticed that there is a lot of writes to the disk and its due to atlas probe writing constantly temporary data to \var\atlasdata
I think it would be best to mount \var\atlasdata as 32 MB tmpfs so that internal flash drive wouldn't die too soon.
I have measured that without tmpfs it does 300 000 sector writes DAILY, so its safe to assume it could kill Mikrotik flash in just a few months, same goes for lower quality pendrives.

Temporary solution that I have found is to make ramdisk on mikrotik because doing it from container itself turned out to be harder than I thought without running container as root.

1) Create 32MB ramdisk on mikrotik :
/disk add type=tmpfs tmpfs-max-size=33554432 slot=atlasdata
2) Mount that ramdisk to a container :
/container/mounts/add dst=/var/atlasdata name=atlasdata src=atlasdata
 
GreDi
just joined
Posts: 1
Joined: Thu Feb 09, 2023 9:09 pm

Re: RIPE Atlas Software Probe running on v7.1rc3 [development]

Sun Jan 21, 2024 11:33 pm

model: RB4011iGS+
current-firmware: 7.13.2

Your probe is currently connected! 8)

Thx U @CTassisF
 
User avatar
baragoon
Member Candidate
Member Candidate
Posts: 294
Joined: Thu Jan 05, 2017 10:38 am
Location: Kyiv, UA
Contact:

Re: RIPE Atlas Software Probe running on v7.1rc3 [development]

Mon Jan 22, 2024 9:29 am

Good job, will try at free time. My Altas probes runing on RPIs, maybe it's time to migrate :)
BTW, maybe you know a working solution of "looking glass" container for Tik devices?

Who is online

Users browsing this forum: No registered users and 71 guests