-
Notifications
You must be signed in to change notification settings - Fork 3
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
Dockerize ttnhabbridge #5
Comments
In general I like the idea, I don't have much experience with docker myself, so please go ahead :) |
I would also recommend setting up GitHub actions to automatically build the docker container when the repo is updated. We currently do this for many of the Project Horus applications: https://github.com/orgs/projecthorus/packages You can see some examples of how snh configured it with Github Actions here: https://github.com/projecthorus/tawhiri/blob/master/.github/workflows/container.yml, https://github.com/projecthorus/tawhiri-downloader-container/blob/main/.github/workflows/container.yml, https://github.com/projecthorus/wenet/blob/master/.github/workflows/container.yml This would make it very easy for newcomers to install and update. |
agree. Pushing the latest ttnhabbridge version to a docker registry will be quite useful. The TTNhabbridge currently has a github action to test a successful build of the project but no docker integration. github action yml: https://github.com/bertrik/ttnhabbridge/blob/1632f137ae0c0e12ecf54d7703255e8945800bbc/.github/workflows/gradle.yml |
My docker knowledge is not so good, but I'm wondering, is this really making things easier, or just introducing different problems. The current situation is that someone has to install the JDK, run the gradle command and then they have a zip or tarball that they can extract and run. What do you have with Docker? And what would you expect to be present in the archive/releases? |
The main reason I use the docker setup is once I setup the pipeline(install docker, docker-compose), its only one command( But from using the docker route, I have run in to problems extracting the log files from the image; Its quite easy to wipe them out if not careful with docker( Passing the |
Docker seems much better suited for stateless applications. Typically, many docker based applications send out logs and other data to be stored to dedicated databases outside the container. |
Also another benefit I found with docker is it will auto restart the application if it somehow is stopped. This could happen if the server is restarted. On startup, docker will fire up the application. |
How I can see this work:
A user wanting to use it, then has to do the following:
This way, there is a uniform docker image that can be used by all users, which is customized with their own yaml file. |
I would recommend a setup similar to what radiosonde_auto_rx uses with an automatically built Docker image using GitHub actions that can accept an external configuration file as an argument that would contain all the keys and settings. This way the user just needs to download and edit a default configuration file then they can pull the latest docker image and link it to that file. The same method can be used for saving logs to a specified directory. You can see some info on it here: https://github.com/projecthorus/radiosonde_auto_rx/wiki/Docker |
I played a bit with it this weekend. Steps to run are now:
This image was created by me by hand by running the gradle script and pushing the resulting image to the github docker repo. |
Many thanks @bertrik, I too was working on dockerising ttnhabbridge last weekend. I was working on integrating the MQTT broker for helium in as well. So my objective was to fire up both ttnhabbridge, and an MQTT broker, and get them talking, all in one command:
I have got it working on my fork here: https://github.com/ImperialSpaceSociety/ttnhabbridge/blob/master/docker-compose.yml |
however, I think it would be best to keep ttnhabbridge seperate, and make a seperate repo that hosts a docker-compose.yml file for ttnhabbridge+MQTT broker. The user will be able to fire up ttnhabbridege, as well as the MQTT broker easily, and provision the passwords in config files. |
I need to figure out how to synchronize my repo with yours. And contribute to bertrik/ttnhabbridge. The only difference is I have a custom packet format for my balloon flights, which is not in bertrik/ttnhabbridge. |
Its quite fiddly to deploy TTNhabbridge on remote servers due to the installation requirements of Java etc. I have been using Docker to easily set things up much more recently. In a single command(
docker-compose up
) I can install all dependencies, including java, and start running ttnhabbridge. I think it will be a good addition to the repo.My dockerfile looks like this at the moment:
My
docker-compose.yml
looks like this:Things todo:
The text was updated successfully, but these errors were encountered: