Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Unsolved
Collapse
Discussion Forum to share and further the development of home control and automation, independent of platforms.
  1. Home
  2. openLuup
  3. Docker
  4. Moving to Docker
Moving to Docker
akbooerA

A number of folk are running openLuup on Docker...

...and I'm about to try the same.

There are a couple of epic threads in the old place:

Dec 10, 2015 openLuup on Synology via Docker openLuup on Synology via Docker

Hi all. I would like to start a thread dedicated to running openLuup on Synology via Docker. I have successfully downloaded the airedale/openluup/ docker and have it running with AltUI, but am running into the issue of non-persistence after stop/start and limited success with adding...

Aug 16, 2018 openLuup on Docker (Hub) openLuup on Docker (Hub)

To simplify plugin development I created a Docker image for openLuup and made it available on Docker Hub. The Docker image is based on Debian (9, slim) and installs the master branch release of openLuup. The image uses the automated installation script of openLuup and therefore also contains...

Much of the heavy lifting appears to have been done by @vwout there (and I've asked if they'll join us here!) There's a great GitHub repository:

GitHub - vwout/docker-openluup: Dockerized openLuup environment with AltUI GitHub - vwout/docker-openluup: Dockerized openLuup environment with AltUI

Dockerized openLuup environment with AltUI. Contribute to vwout/docker-openluup development by creating an account on GitHub.

Hoping to get a conversation going here (and a new special openLuup/Docker section) not least because I know I'm going to need some help!

Docker
Openluup docker filling up disk space?
PerHP

I've been doing other projects the past weeks, and now started seeing sluggish behaviour in the system.. SSH'ed in, and noticed that the harddrive was completely full!

I had some other issues as well that caused it to fill up, but i noticed that when I removed the openluup container, that freed up 1.5GB!
This is obviously not the persistent storage folder (cmh-ludl), what else can do this?

On the base system, it showed as a massive sized /overlay2 folder in the /var/lib/docker/..

Mabye @vwout knows some docker-hints on this?

Docker
InfluxDB 1.x in docker
PerHP

I've now gotten most of my applications/components into the docker system, only one left is influxdb.
I allready have the database files on an external SSD, and the plan was to have a volume for the influxDB (which holds the .conf file), and a bind mount to the database folder.

This is however not the only files of influxdb that needs to be persistent, when i load up the docker, influx has no information about the databases, even when i know the database folder is available.
Anyone here know where influxDB stores database setup info? influxdb.conf just enables stuff and sets folders, the info on existing databases and settings is stored elsewhere.

(should the docker forum be under software, not openluup?)

Docker
Grafana on Docker
akbooerA

As part of my hardware infrastructure revamp (a move away from 'hobby' platforms to something a bit more solid) I've just switched from running Grafana (a very old version) on a BeagleBone Black (similar to RPi) to my Synology NAS under docker.

Despite the old system being on the same platform as my main openLuup instance (or, perhaps, because of this) and now with the new system the data has to be shipped across my LAN, this all seems to work much faster.

I had been running Grafana v3.1.1, because I couldn't upgrade on the old system, but now at 7.3.7, which seems to be the latest Docker version. It's a bit different UI from the old one, and needed next to no configuration, apart from importing the old dashboard settings.

One thing I'm missing is that the old system had a pull-down menu to switch between dashboards, but the new one doesn't seem to have that, since it switches to a whole new page with a list of dashboards. This doesn't work too well on an iPad, since it brings up the keyboard and obscures half the choices. Am I missing something obvious here?

Thanks for any suggestions.

Docker

Moving to Docker

Scheduled Pinned Locked Moved Docker
62 Posts 11 Posters 11.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mrFarmer
    replied to akbooer on last edited by
    #31

    @akbooer a quick restore from a fatal crash of the Pi (SD/SSD) yes.

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vwout
      replied to akbooer on last edited by
      #32

      @akbooer As @RHCPNG said, you can easily do this, once you have a running setup by copying the contents of /etc/cmh-ludl/ to a local folder, restart the container with that folder mounted to /etc/cmh-ludl/.

      The difference between using a volume and a folder mount is (amongst other details) how Docker handles this at first startup. When using a volume, Docker copies the contents of e.g. /etc/cmh-ludl/ when it is started with a empty new volume, to that volume. As of that moment all changes are kept in the volume and survive container restarts and updates.
      A mounted folder also preserves all settings, but in contrary to volumes, Docker does not copy the original contents of the mount target to the folder at first startup. This means you need to store create the files needed in /etc/cmh-ludl/ yourself, which makes it harder to initially get start (except for one who masters openLuup 😉 ).

      1 Reply Last reply
      2
      • PerHP Offline
        PerHP Offline
        PerH
        wrote on last edited by PerH
        #33

        I thought i'd give this a stab, as i have some dependency issues.. Found an old laptop and installed Debian to test with.

        I want the following apps to run on the machine:
        openLuup
        Z-Way
        Domoticz
        InfluxDB
        Grafana
        Miio Server (stupid implementation of domo plugin for my vacuum)

        Any reason not to just have one docker each? They all use TCP/UDP for all communication (i use ser2net for usb ports)..

        I've had to install python on the domoticz image i have, and therefore saved a new image. Where is this image stored?

        R 1 Reply Last reply
        0
        • PerHP Offline
          PerHP Offline
          PerH
          wrote on last edited by
          #34

          @vwout: There is a choice between Debian and Alpine in your image, why? 🙂 is there advatages to one or the other? If its just interface/packages in the container there wouldn't be a difference if you're not doing changes to it right? (which ideally is not nessecary)

          akbooerA 1 Reply Last reply
          0
          • R Offline
            R Offline
            RHCPNG
            replied to PerH on last edited by
            #35

            @perh I think the main point of dockers is to put every service in it's own docker. This way it is easier to manage with as less dependence as possible.

            1 Reply Last reply
            1
            • akbooerA Offline
              akbooerA Offline
              akbooer
              replied to PerH on last edited by
              #36

              @perh said in Moving to Docker:

              There is a choice between Debian and Alpine in your image, why?

              The Alpine image is somewhat smaller. It comes with a more limited set of Linux installed utilities, but who cares about that in the openLuup environment?

              1 Reply Last reply
              0
              • PerHP Offline
                PerHP Offline
                PerH
                wrote on last edited by
                #37

                As long as it works.. 🙂

                New question: I've set up two containers (domoticz and miio server), and by default - they are on the same network. This network will however give the containers an IP at startup, and it seems to be first come - first served. Is there a way to give them static IP's in this internal docker network?
                I tried docker run --IP=<IP> without success..

                The plugin in Domo reaches miio server with that IP, so i need it to be the same after restarts!

                1 Reply Last reply
                0
                • akbooerA Offline
                  akbooerA Offline
                  akbooer
                  wrote on last edited by
                  #38

                  OK, now I have a problem.

                  It was all going so well until I realised that all incoming IP addresses were being mapped to 172.17.0.1by the LuaSocket library.

                  Reading the Docker docs: https://docs.docker.com/config/containers/container-networking/

                  "By default, the container is assigned an IP address for every Docker network it connects to. The IP address is assigned from the pool assigned to the network, so the Docker daemon effectively acts as a DHCP server for each container. Each network also has a default subnet mask and gateway."

                  But I don't understand, yet, how this works if I want a straight-forward mapping of IPs from my LAN into the Docker container.

                  It may be that the Synology Docker interface is not adequate for this and I have to revert to the command line?

                  Any advice/clarification much appreciated.

                  akbooerA 1 Reply Last reply
                  0
                  • PerHP Offline
                    PerHP Offline
                    PerH
                    wrote on last edited by
                    #39

                    ok, i got the IP stuff figured. A custom network must be made in order to choose IP, then connect the container.

                    sudo docker network create -d bridge --subnet=192.168.0.0/16 --ip-range=192.168.0.0/24 --gateway=192.168.0.254 <Network name>
                    sudo docker network connect --ip=<IP> <Network created by you> <container name>
                    sudo docker network disconnect bridge <container name>
                    

                    Still struggling with getting openluup to work as i want it.. tried to copy the cmh-ludl folder from my prod. system to the _data folder for my volume, but can't seem to overwrite user_data.json..

                    Tried to bind to a folder instead, but then it won't start, as the folder is missing the "openLuup_reload_for_docker" file..

                    what do i do next?

                    akbooerA 1 Reply Last reply
                    1
                    • akbooerA Offline
                      akbooerA Offline
                      akbooer
                      replied to PerH on last edited by akbooer
                      #40

                      @perh said in Moving to Docker:

                      but can't seem to overwrite user_data.json.

                      You can't do this when the system is running, because it gets overwritten with the current system state on restarts. Stop openLuup with a /data_request?id=exit request, change the file, then stop and restart the container (to restart openLuup.)

                      1 Reply Last reply
                      0
                      • PerHP Offline
                        PerHP Offline
                        PerH
                        wrote on last edited by
                        #41

                        offcourse.. its getting late! thanks.

                        1 Reply Last reply
                        0
                        • PerHP Offline
                          PerHP Offline
                          PerH
                          wrote on last edited by
                          #42

                          My plan for USB devices was to have ser2net on host for all usb's, and then bind the dockers to the ser2net ports for the devices. If however ser2net is sending on ie. port 3485, the docker can't bind to that port.

                          How can I do this?

                          1 Reply Last reply
                          0
                          • PerHP Offline
                            PerHP Offline
                            PerH
                            wrote on last edited by PerH
                            #43

                            Solution: Don't bind the port at all in the docker, and call the IP of the host in the application running inside container..

                            EDIT: Or even better, use the "gateway" IP in the internal docker network, this way its easier to move the whole setup to hardware with a different IP address without editing this attribute.

                            1 Reply Last reply
                            1
                            • LibraSunL Offline
                              LibraSunL Offline
                              LibraSun
                              wrote on last edited by LibraSun
                              #44

                              For funsies, I decided to hop on board with OpenLuup by running @vwout 's pre-built container (excellent piece of work, by the way, sir!) on my Synology NAS using Docker's wizards.

                              It took some convincing by others more experienced than myself (both with OpenLuup and Docker), NOT to change anything in the Synology NAS GUI before simply LAUNCH-ing the Image. The only thing I set manually were the ports - changing from 'Auto' to numbers matching those in the right column under Advanced Settings > Ports, then clicking "Apply".

                              From within DiskStation on your Synology NAS:

                              1. Open Docker (install from Package Center if not installed)
                              2. Registry > search for "OpenLuup" > select 'vwout / openluup' (alpine)
                              3. Click Download.
                              4. Images > select 'vwout / openluup' > click Launch.
                              5. On Advanced Settings tab > 'Advanced Settings' > check 'Enable auto-restart'
                              6. On Ports tab:
                                • Change each port from "Auto" to match right-hand #.
                              7. On Environment tab:
                                • Change (if desired) the 'Value' field next to TZ, from 'UTC' to your time zone (e.g. GMT-5)
                              8. Click Apply

                              Your new OpenLuup container will now start.

                              Head over to http://<nas_ip>:3480/console for some fun with OpenLuup!

                              BONUS: For step-by-step instructions on linking your Vera(s) to OpenLuup, see this reply below.

                              THANKS!

                              1 Reply Last reply
                              0
                              • akbooerA Offline
                                akbooerA Offline
                                akbooer
                                wrote on last edited by
                                #45

                                My first foray into Docker was with this image, on Synology NAS, but I didn’t mount external volumes. It’s worked flawlessly, which is just as well because I know very little about Docker, although I’m learning a bit because I’m creating my own version from a raw Alpine base.

                                So I’ve not seen this issue, ever... which doesn’t really help you at all, except to know that it can work.

                                1 Reply Last reply
                                1
                                • toggledbitsT Offline
                                  toggledbitsT Offline
                                  toggledbits
                                  wrote on last edited by
                                  #46

                                  On the NAS, open Docker, then click on the container in the Container list, then click the Details button. A dialog will pop up which has a "Log" tab, and there you will find the console output of the container, which could have some messages related to the stop that will help you troubleshoot.

                                  Author of Multi-system Reactor and Reactor, DelayLight, Switchboard, and about a dozen other plugins that run on Vera and openLuup.

                                  1 Reply Last reply
                                  1
                                  • K Offline
                                    K Offline
                                    kfxo
                                    wrote on last edited by
                                    #47

                                    I think I had this same issue. If you copy the files in cmh-ludl from an existing openluup install into ' /OpenLuup/openluup-env' it should start right up.

                                    1 Reply Last reply
                                    1
                                    • LibraSunL Offline
                                      LibraSunL Offline
                                      LibraSun
                                      wrote on last edited by
                                      #48

                                      I checked the log per your advice and saw the following line repeated 42 times:

                                      /bin/sh: can't open '/etc/cmh-ludl/openLuup_reload_for_docker': No such file or directory
                                      

                                      The other piece of advice about copying existing openLuup files makes sense, although I have never used openLuup before so would not know where to begin.

                                      Is this the classic chicken and the egg problem?

                                      parkercP 1 Reply Last reply
                                      0
                                      • K Offline
                                        K Offline
                                        kfxo
                                        wrote on last edited by kfxo
                                        #49

                                        There is a post from me above in this thread (sorry don't know how to link specific post) that explains how I got it to work. Have you tried that? I think the issue is synology gui does not support the correct type of volumes and you have to ssh into synology and run the correct docker command to set it up.

                                        LibraSunL 1 Reply Last reply
                                        1
                                        • LibraSunL Offline
                                          LibraSunL Offline
                                          LibraSun
                                          replied to kfxo on last edited by
                                          #50

                                          @kfxo said in Moving to Docker:

                                          you have to ssh into synology and run the correct docker command to set it up.

                                          That's exactly what I was being lazy about and hoping to avoid altogether, but now it appears necessary and I will delve into that ASAP.

                                          Thanks for the suggestion! I will also amend my step-by-step tutorial once I get mine working so that others can avoid the pitfalls I encountered.

                                          1 Reply Last reply
                                          0

                                          Recent Topics

                                          • Disaster recovery and virtualisation
                                            CatmanV2C
                                            CatmanV2
                                            0
                                            5
                                            569

                                          • Remote access of Zwave stick from Z-wave server
                                            CatmanV2C
                                            CatmanV2
                                            0
                                            3
                                            291

                                          • Organizing/ structuring rule sets and rules
                                            G
                                            gwp1
                                            0
                                            5
                                            347

                                          • Moving MSR from a QNAP container to RP 5 - some issues
                                            G
                                            gwp1
                                            0
                                            5
                                            291

                                          • Widget deletion does not work and landing page (status) is empy
                                            G
                                            gwp1
                                            0
                                            4
                                            263

                                          • Need help reducing false positive notifications
                                            T
                                            tamorgen
                                            0
                                            7
                                            455

                                          • Reactor (Multi-System/Multi-Hub) Announcements
                                            toggledbitsT
                                            toggledbits
                                            5
                                            120
                                            35.1k

                                          • Deleting widgets
                                            toggledbitsT
                                            toggledbits
                                            0
                                            4
                                            440

                                          • MQTT configuration question
                                            tunnusT
                                            tunnus
                                            0
                                            11
                                            590

                                          • System Configuration Check - time is offset
                                            G
                                            gwp1
                                            0
                                            8
                                            582
                                          Powered by NodeBB | Contributors
                                          Hosted freely by 10RUPTiV - Solutions Technologiques | Contact us
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Unsolved