Synology Docker installation
-
LibraSunreplied to toggledbits on Feb 26, 2021, 3:49 PM last edited by LibraSun Feb 26, 2021, 11:11 AM
@toggledbits I followed to the letter your excellent step-by-step guide on launching a Docker container from the image I fetched from PR #58 this morning.
All proceeded swimmingly – folder creation, image upload, settings & parameters, etc. – until the moment of actual Launch.
Whereupon, Docker threw up the following on-screen "Stopped Unexpectedly" warning (which repeated every 30 seconds or so until I Stop'ped the container from running/restarting):
Concurrently, every attempt to access http://<mySynNAS_IP>:8111/ resulted in a "This site can't be reached" error page in Chrome (under Windows, mind you).
Immediately, I took the liberty of inspecting and Export'ing the logfile (Container ► Details ► Log) as an HTML file, which I attach below (oops, no attachment feature in this forum, so here is the direct link) for your inspection.
Hope you find some clues, because I'm not at all sure where things went wrong. (The only facet of setup where I expressly deviated from your typed notes involved creating a "Shared" (i.e. top-level, rather than under /home) folder called "Reactor" with r/w access, under which I created a subfolder named "Data", to which I pointed /var/reactor during container creation.)
Excellent write-up and thanks for the chance to test this out!!
- Libra
FOLLOW-UP NOTES
I do see where Container ► Edit ► Environment ► variable PATH has a value of "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" which strikes me as odd, but maybe that's normal nomenclature? (By contract, Windows and DOS always use semicolons, not colons, to separate PATH variable entries.)RESOLVED
Noting that the Log displayed an error message related to /var/reactor/config, I went and created a folder named 'config' (all lowercase) under the NAS's top-level Reactor\Data folder, then restarted the container. It's running fine now, and I'm able to access the :8111 interface for the first time.
Log ► "Configuration path: /var/reactor/config resolved /var/reactor/config"SUGGEST
Please add explicit declaration in your How-To regarding the need for a /config underneath the data folder. -
If someone smarter than me wishes to volunteer a simple write-up on the exact steps required to get MSR up and running on my Synology NAS (with Docker installed and active), I'd be delighted to give it a try. I realize a dedicated Docker-ized version of MSR is perhaps ideal -- and I'm happy to wait for that to manifest -- but if, in the meantime, someone out there can propose a build-your-own solution with minimal footprint, I'm game.
Unspoken here is how much I cringe when dealing with anything Linux, because for me it's like reading Chinese. But I can follow written instructions very well and provide meticulous feedback. So thanks in advance...
- Libra
-
I don't have any docker containers yet. The bug list is looking pretty quiet for things urgent at the moment, so maybe I'll spend an hour or two seeing what I can get built. I also have a Synology NAS, so I have a ready test platform. The image/container itself is easy, but I'm still figuring out the correct (Synology) way to do the volumes (or bind mounts, whatever they use) for the config and data.
-
Concur, and let's get @toggledbits ' earlier Docker-related notes copied into this thread as well. Dunno if they were higher up in the "MSR Available" thread?
-
Hopefully not about to ask the world's dumbest question, but here goes...
I'm stumped at Step 1 of the "Getting Started" docs (https://reactor.toggledbits.com/docs/Getting-Started/), since I'm unable to locate the referenced reactor.yaml file.
The only files I see under my <reactor-data>/config folder are:
all-json.out (2 bytes)
all-yaml.out (3 bytes)IMPORTANT NOTE: I'm running MSR under Docker on my Synology NAS, but I believe it behaves identically in all respects to bare metal (Linux) installs. I'm wondering if it's possible that the desired YAML file exists within the distributed image, but is not being exposed yet by the container running MSR.
Will not proceed until advised by someone more knowledgeable. Until then, I have no "Hub/HA" defined, so cannot do anything, really, with MSR. (Makes me kinda wish these settings lived within MSR's panels and not a YAML file, LOL!)
Thanks - Libra
-
The docker container is slightly different in that the data folder does not live within the container, it lives on a volume that the container mounts separately. This is so that the container can read and write data as needed and it is not destroyed when the image or container is replaced (e.g. you would otherwise lose your config and all your rules and reactions), and so you can edit your config without having to breach the walls of the container.
The install steps for the docker container has a step for you to create a directory that would become this volume. To confirm you are looking in the right place, open Docker via the package manager. Go to Container, then click the Reactor container. Hit the Details button, and then the Volume tab. The line that shows the mount path "/var/reactor" is the place where your config and data are stored (not /var/reactor, the path to the left of that under File/Folder. So check that to make sure you are looking in the right place. You should see
config
,logs
andstorage
at a minimum, and possibly alsolocal
andsys
. -
@toggledbits said in Multi-System Reactor Developer Preview AVAILABLE:
You should see config, logs and storage at a minimum, and possibly also local and sys
In that folder (which in my case happens to be Reactor/Data, I only see the following subfolders:
config
storage -
OK, then somehow the initial data didn't get copied. If you haven't already, open a PR for that on Mantis, and I'll post the two files so you can put them into the folder yourself, and I'll hunt down why it didn't copy them in the first place.
-
"no sooner said than done" I believe.
-
I like, "Your wish is my command."
-
FYI, I can move them also.
-
Beneath your pay grade sir.
-
No job too big or too small. If it needs to get done, I'm happy to do it.
-
Strictly FYI, I've gone ahead and installed NODE.JS v12 on my Synology NAS in anticipation of attempting the Reactor backup conversion to MSR Rulesets. In my Linux-challenged mind, that's a step in the right direction. Next, I'll need to (re-)learn how to SSH into the NAS for executing Terminal commands. Will let you know if this gets me further along that trajectory.
EDIT: Nope, I was clearly jumping the gun. Will have to take another tack.
-
I've also rolled 21062 (today's daily build) into a docker container for Synology. Link is in PR #58 on the bug tracker.
-
Installed. Works like a charm. Your instructions were spot on, as per usual.
-
We can both thank @kfxo for those instructions!
8/31