-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
DietPi-Software | ADS-B Feeder: track airplanes using SDRs and feed the data to ADS-B aggregators #6587
Conversation
@MichaIng - I know we talked about this before, but I'm really struggling to get the build process to use my branch instead of your master branch... I believe it's supposed to be something like this:
But unless I hack around in the build script and flat out override the defaults, that doesn't appear to work for me. |
It is two things:
|
in the DietPi GitHub process - what does it mean that this PR is 'assigned' to me? Just making sure that I meet expectations 😎 |
Btw, we can also test things via GitHub Actions: https://github.com/MichaIng/DietPi/actions/runs/6030396640/job/16362120035 AFAIK you should also be able to trigger those on your fork, after enabling GitHub Actions there. It currently fails since your repo does not contain the We can also add service or CLI tests for this software title to the test. But it has some limitations: Currently the Docker service cannot start within those containers, as they currently use the host network directly, while Docker requires a guest network (where it has "write" access to) to create its nested guest network, the routes/rules etc.
I use this "assignment" as "this is from" for the PR. Usually there are multiple commits done on a PR, WIP, fixups etc, while I like to squash those into a single commit when merging into the |
part of the functionality can be tested without docker. The adsb-setup python app runs without the container and we can check that the website does come up, etc. |
Indeed, as it is not served with one of the regular webservers, it would conflict with them when listening on port 80. So I'd prefer to have it on a different port and instead document how to change the port (in the Docker Compose YAML, I guess?), if no proxy is used anyway. |
Do you have a registry of ports used? How do I find one that's free? There is a bit of painful issue here that one of my 'outside' services won't work if this isn't on port 80... I need to redesign this... but someone who installs this locally really doesn't need that specific service as they obviously know the name/address of the DietPi machine (I have a neat little callback where once this starts up, you can go to my.adsb.im and get forwarded to your ADSB Feeder page - but that of course uses port 80. |
Oh, and oddly... most of the Workflows don't show up in my fork... I only see the shellcheck one... |
Apparently not. All I get is shellcheck. None of the other actions.
Some days I am more on top of things than others. Today wasn't one of those days. I intentionally wanted to have a dedicated branch for the dietpi build to make sure that I can provide something that is tested and stable and all of that for the DietPi Software build. And then forgot to copy the branch that I had been working on over to that name 🤦🏻♂️🤦🏻♂️🤦🏻♂️ |
926d8ab
to
a7ea9d8
Compare
This is close but not quite there, yet. There are still a couple of differences between my own images and being "just an app" on a standard DietPi image that need to be addressed. And moving the config files added to the confusion. |
oh, one more question - I need a tempfs that I can share between a couple of containers (so that we reduce writes to the filesystem that may be on an SD card) - but that tempfs cannot have |
0e3225a
to
eb38d5d
Compare
OK, this is now reasonably well tested, both on a couple of different SBCs (OrangePi 5Plus and RPi4b) as well as in a VM. Please consider for merging. |
one question... is there a way to register an app that should be called every time docker gets restarted? |
With "app" you mean container? That should be the case OOTB, but can be toggled per-container if I am not wrong. If you mean another non-docker app, no natively that I am aware of. A |
The adsb-feeder app will start between three and N containers, depending how many aggregators a user wants to feed or if they use multiple SDRs. Right now N is 14, but that may change over time. I like the idea of chaining a service, that way this stays generic. Thanks |
We could also have a look into other Docker Conpose projects. I guess there is a common beat practice for starting/stopping all related containers gracefully with the Docker and/or containerd service. If I am not mistaken, containerd is actually the more important one for the containers to continue running, while Docker itself is more the communication/management API. |
Since the actual setup app isn't in a container, all it needs is to find out when they go down and need to be restarted. |
Reading the man page is always a good start. Admittedly, this one had me confused at first, but with a bit of googling and some trial and error, I think I know what I need. I'd still appreciate any other review, test, etc, that is needed to get this PR merged as the main functionality is indeed working fine already - and I'd love to know if there are other issues / blockers from your perspective, @MichaIng |
Thank you kindly. I will of course continue to monitor things in case there are any issues or suggestions - also always feel free to just @-tag me if you want my thoughts / help / input on stuff. I am also planning to submit a few more changes for the workflow challenges that I feel there are today :) |
I don't know if that's the right place to write about this, but after installing this software all my running containers have been stopped and volumes deleted. Maybe it could be handled differently. Fortunately I didn't lose any critical data, and I am not even 100% sure that this is the cause, but It's very likely that the script somehow interferes with other containers. Do you have any clue? @dirkhh |
I think I might know the reason: When installing Docker via Quite interesting that this issue never came up before, but I think we should handle it gracefully. Either we move So @andreagdipaolo please verify that all your previous containers are in sudo mv /mnt/dietpi_userdata/docker-data /mnt/dietpi_userdata/docker-data.bak
sudo mv /var/lib/docker /mnt/dietpi_userdata/docker-data
sudo dietpi-software reinstall 141 And if all works well, no container or something is missing: rm -R /mnt/dietpi_userdata/docker-data.bak |
Sadly they are not there. Indeed the files are there, but they are empty because volumes have already been re-created when I ran a docker compose up in order to update and restart the containers. Also, I usually do a prune after every successful upgrade. After launching your three commands the aiplane containers have not gone up, and my home assistant instance is broken. Probably moving the paths broke something in my database configuration. Immich is refusing the connections and Z2M is dead. My Docker installation has been via dietpi-software. |
Hmm, nothing else should directly access to the Docker data directory, but only Docker itself. So I cannot imagine how it could have broke something. But of course you can just move things back and also change the data directory in
Ah, so, there was no content in
You use HA supervised? Just that we do not forget: #6660 |
I don't know. Containers are up (except those managed by adsb.im) but nothing seems to run correctly.
Files were all there, but the one I was looking for (the immich database) was empty, probably because after a down -v and a prune it got nuked and recreated with my following update.
|
I believe my data was in the dietpi_userdata folder, but something was in the var/lib folder too. |
It would be good to understand in more detail what for disconnected and why. |
Not sure. I guess it is also possible to define a data/image dir explicitly for a specific container. Probably you can find out whether it really is still in use and which container it is used by, checking timestamps. Leaving a symlink |
Now everything started working without doing anything. I'm quite confused by this behaviour.
If I check in dietpi-software both docker and docker compose have the * , so I believe they were installed in that way. Also, adsb.im is stuck at version 16.3 even after reinstalling. Do dietpi software releases take more time to follow github releases? |
The ADS-B feeder pulls docker and docker compose. My question was how you initially installed docker, before installing the ADS-B feeder app |
The host-side services, scripts and config files are updated on reinstall, but the container image itself is not, as far as I can see. Is |
The dietpi release of 0.17.x will happen tonight |
As I said, I don't remember, but if I see them with the * in dietpi software I suppose they were installed in that way. |
You can update the feeder from the web UI. |
This would be true as well if you did install Docker differently before. One possible indicator: ls -l /etc/apt/keyrings/docker.gpg That |
Does it mean anything? |
Yes, this means you installed Docker via their installer in the first place, indeed. |
Oh, ok. So dietpi-software detects it even if I didn't install it via that? |
Since Docker is defined as dependency for ADS-B Feeder in |
- CHANGELOG | ADS-B Feeder: The uninstall has been hardened to rule out the removal of unused Docker images which were not created by ADS-B Feeder. Furthermore, beta tags are now correctly shown in the version string. Many thanks to @andreagdipaolo for reporting a related issue and @dirkhh for implementing the enhancement: MichaIng#6587 (comment)
DietPi-Software | add ADSB-Feeder app that allows feeding ADSB data from one (or more) SDRs to various aggregators (based on https://adsb.im)
Please consider this a draft - I would love feedback on all aspects of this. Did I pick the right category? Any issues with the code? I tried to follow the guidelines I could fine and the comments that you made in our discussions today. But as this is my first time adding code to DietPi, I'm sure there are things that I missed.
This has been tested both in a VM and on an RPi and appears to work ok. I assume there are features in the Web UI that will need tweaking since some things work differently when installed like this.