PDA

View Full Version : Girder package on docker ?



rgouyet
May 12th, 2015, 04:42 PM
Synology just release DSM 5.2. In this new version, they add the support of DOCKER (https://www.docker.com).

Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications.

My Synology NAS is the main part of my digital life. Many applications run on it. It has space, is backed up and is protected by an APC.

It would be a nice thing if Girder may have a package that work on this platform. It will allow Girder to run on many devices... and on my Synology NAS. :p

May this dream become real ?

Ron
May 12th, 2015, 04:51 PM
Anything is possible :) All we need is a armel build of Girder. I tried a few months ago but was stopped by the lack of a good environment to build in. If anyone has done armel cross compiling from Linux let me know.

rgouyet
May 12th, 2015, 04:59 PM
The Synology docker package works only on intel processor.

I've got an X64 (not arm) processor

Ron
May 13th, 2015, 09:56 PM
I've looked at docker a few times now. I have to say it's incredibly confusing stuff. Which OS is exposed to the application?

rgouyet
May 15th, 2015, 01:32 AM
It looks like it is Linux... But I 'am not a developer. .

rgouyet
May 24th, 2015, 04:11 AM
I have done my first Docker image for Girder. :)
https://registry.hub.docker.com/u/rgouyet/girder6/

Information are on the docker projet page. I publish the dockerfile to allow to build or modify the image.

I success in running Girder 6 Service.
You have to set the path to your licence file.

It works on Synology too. I will publish later a tutorial how to launch it.

But, I have no linux skill so I have a trouble with USB and Serial devices.
I think, FTDI driver is missing and for the moment, I don't know what I have to do to compil it ... For example for RFXCOM
Help is welcome.

I see the USB device:

root@6c9184ca7fc8:/# lsusb
Bus 003 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

Ron
May 24th, 2015, 09:12 AM
Very cool! Let's see if we can locate the serial ports that Linux creates ( from http://stackoverflow.com/questions/2530096/how-to-find-all-serial-devices-ttys-ttyusb-on-linux-without-opening-them )



ls -la /sys/class/tty

rgouyet
May 24th, 2015, 04:59 PM
unfortunately, it doesn't help ...


root@8ac12b99509f:/# lsusb
Bus 003 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 006 Device 002: ID f400:f400
Bus 007 Device 002: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1 Fob, 1-Wire adapter
Bus 007 Device 003: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub


Here is the answer of the above command :


ls -la /sys/class/tty
total 0
drwxr-xr-x 2 root root 0 May 24 20:52 .
drwxr-xr-x 39 root root 0 May 24 20:52 ..
lrwxrwxrwx 1 root root 0 May 24 20:52 console -> ../../devices/virtual/tty/console
lrwxrwxrwx 1 root root 0 May 24 20:52 ptmx -> ../../devices/virtual/tty/ptmx
lrwxrwxrwx 1 root root 0 May 24 20:52 ptya0 -> ../../devices/virtual/tty/ptya0
lrwxrwxrwx 1 root root 0 May 24 20:52 ptya1 -> ../../devices/virtual/tty/ptya1
lrwxrwxrwx 1 root root 0 May 24 20:52 ptya2 -> ../../devices/virtual/tty/ptya2
lrwxrwxrwx 1 root root 0 May 24 20:52 ptya3 -> ../../devices/virtual/tty/ptya3
lrwxrwxrwx 1 root root 0 May 24 20:52 ptya4 -> ../../devices/virtual/tty/ptya4
lrwxrwxrwx 1 root root 0 May 24 20:52 ptya5 -> ../../devices/virtual/tty/ptya5
lrwxrwxrwx 1 root root 0 May 24 20:52 ptya6 -> ../../devices/virtual/tty/ptya6
lrwxrwxrwx 1 root root 0 May 24 20:52 ptya7 -> ../../devices/virtual/tty/ptya7
lrwxrwxrwx 1 root root 0 May 24 20:52 ptya8 -> ../../devices/virtual/tty/ptya8
lrwxrwxrwx 1 root root 0 May 24 20:52 ptya9 -> ../../devices/virtual/tty/ptya9
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyaa -> ../../devices/virtual/tty/ptyaa
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyab -> ../../devices/virtual/tty/ptyab
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyac -> ../../devices/virtual/tty/ptyac
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyad -> ../../devices/virtual/tty/ptyad
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyae -> ../../devices/virtual/tty/ptyae
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyaf -> ../../devices/virtual/tty/ptyaf
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyb0 -> ../../devices/virtual/tty/ptyb0
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyb1 -> ../../devices/virtual/tty/ptyb1
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyb2 -> ../../devices/virtual/tty/ptyb2
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyb3 -> ../../devices/virtual/tty/ptyb3
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyb4 -> ../../devices/virtual/tty/ptyb4
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyb5 -> ../../devices/virtual/tty/ptyb5
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyb6 -> ../../devices/virtual/tty/ptyb6
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyb7 -> ../../devices/virtual/tty/ptyb7
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyb8 -> ../../devices/virtual/tty/ptyb8
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyb9 -> ../../devices/virtual/tty/ptyb9
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyba -> ../../devices/virtual/tty/ptyba
lrwxrwxrwx 1 root root 0 May 24 20:52 ptybb -> ../../devices/virtual/tty/ptybb
lrwxrwxrwx 1 root root 0 May 24 20:52 ptybc -> ../../devices/virtual/tty/ptybc
lrwxrwxrwx 1 root root 0 May 24 20:52 ptybd -> ../../devices/virtual/tty/ptybd
lrwxrwxrwx 1 root root 0 May 24 20:52 ptybe -> ../../devices/virtual/tty/ptybe
lrwxrwxrwx 1 root root 0 May 24 20:52 ptybf -> ../../devices/virtual/tty/ptybf
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyc0 -> ../../devices/virtual/tty/ptyc0
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyc1 -> ../../devices/virtual/tty/ptyc1
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyc2 -> ../../devices/virtual/tty/ptyc2
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyc3 -> ../../devices/virtual/tty/ptyc3
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyc4 -> ../../devices/virtual/tty/ptyc4
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyc5 -> ../../devices/virtual/tty/ptyc5
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyc6 -> ../../devices/virtual/tty/ptyc6
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyc7 -> ../../devices/virtual/tty/ptyc7
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyc8 -> ../../devices/virtual/tty/ptyc8
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyc9 -> ../../devices/virtual/tty/ptyc9
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyca -> ../../devices/virtual/tty/ptyca
lrwxrwxrwx 1 root root 0 May 24 20:52 ptycb -> ../../devices/virtual/tty/ptycb
lrwxrwxrwx 1 root root 0 May 24 20:52 ptycc -> ../../devices/virtual/tty/ptycc
lrwxrwxrwx 1 root root 0 May 24 20:52 ptycd -> ../../devices/virtual/tty/ptycd
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyce -> ../../devices/virtual/tty/ptyce
lrwxrwxrwx 1 root root 0 May 24 20:52 ptycf -> ../../devices/virtual/tty/ptycf
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyd0 -> ../../devices/virtual/tty/ptyd0
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyd1 -> ../../devices/virtual/tty/ptyd1
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyd2 -> ../../devices/virtual/tty/ptyd2
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyd3 -> ../../devices/virtual/tty/ptyd3
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyd4 -> ../../devices/virtual/tty/ptyd4
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyd5 -> ../../devices/virtual/tty/ptyd5
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyd6 -> ../../devices/virtual/tty/ptyd6
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyd7 -> ../../devices/virtual/tty/ptyd7
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyd8 -> ../../devices/virtual/tty/ptyd8
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyd9 -> ../../devices/virtual/tty/ptyd9
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyda -> ../../devices/virtual/tty/ptyda
lrwxrwxrwx 1 root root 0 May 24 20:52 ptydb -> ../../devices/virtual/tty/ptydb
lrwxrwxrwx 1 root root 0 May 24 20:52 ptydc -> ../../devices/virtual/tty/ptydc
lrwxrwxrwx 1 root root 0 May 24 20:52 ptydd -> ../../devices/virtual/tty/ptydd
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyde -> ../../devices/virtual/tty/ptyde
lrwxrwxrwx 1 root root 0 May 24 20:52 ptydf -> ../../devices/virtual/tty/ptydf
lrwxrwxrwx 1 root root 0 May 24 20:52 ptye0 -> ../../devices/virtual/tty/ptye0
lrwxrwxrwx 1 root root 0 May 24 20:52 ptye1 -> ../../devices/virtual/tty/ptye1
lrwxrwxrwx 1 root root 0 May 24 20:52 ptye2 -> ../../devices/virtual/tty/ptye2
lrwxrwxrwx 1 root root 0 May 24 20:52 ptye3 -> ../../devices/virtual/tty/ptye3
lrwxrwxrwx 1 root root 0 May 24 20:52 ptye4 -> ../../devices/virtual/tty/ptye4
lrwxrwxrwx 1 root root 0 May 24 20:52 ptye5 -> ../../devices/virtual/tty/ptye5
lrwxrwxrwx 1 root root 0 May 24 20:52 ptye6 -> ../../devices/virtual/tty/ptye6
lrwxrwxrwx 1 root root 0 May 24 20:52 ptye7 -> ../../devices/virtual/tty/ptye7
lrwxrwxrwx 1 root root 0 May 24 20:52 ptye8 -> ../../devices/virtual/tty/ptye8
lrwxrwxrwx 1 root root 0 May 24 20:52 ptye9 -> ../../devices/virtual/tty/ptye9
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyea -> ../../devices/virtual/tty/ptyea
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyeb -> ../../devices/virtual/tty/ptyeb
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyec -> ../../devices/virtual/tty/ptyec
lrwxrwxrwx 1 root root 0 May 24 20:52 ptyed -> ../../devices/virtual/tty/ptyed

....
up to


lrwxrwxrwx 1 root root 0 May 24 20:35 ttyze -> ../../devices/virtual/tty/ttyze
lrwxrwxrwx 1 root root 0 May 24 20:35 ttyzf -> ../../devices/virtual/tty/ttyzf

rgouyet
May 25th, 2015, 05:38 AM
I successfully use my USB Rfxcom device from my docker image but only on my windows test machine (boot2docker-vm)
The USB serial device was recognize automatically (after adding oracle virtual Extension pack)


lsusb
Bus 002 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


dmesg | grep usb
usb 2-1: new full-speed USB device number 3 using ohci-pci
usb 2-1: Detected FT232RL
usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0


I set ttyUSB0 in Girder RFXCOM plugin and send and receive was OK.

So I think that on my synology docker, I have to investigate on USB driver by SYNOLOGY OS...

rgouyet
May 25th, 2015, 01:30 PM
Ok, now, it works in my synology docker container.

In fact, the USB drivers for my USBToSerial device was not installed on my Synology NAS.
I will need to make a cross compil to build the drivers because it's the host hosting docker that need to have the drivers.

But, someone else deliver a synology package (Pulse Station) with working driver : http://www.pulse-station.com/faqs/how-to-install-on-synology-nas/
I dont' need Pulse Station but the driver is working...

There is an other synology package (USB Serial Drivers Only for Test v3.0.2)that can install just the drivers. Link here : http://jadahl.dscloud.me/sspks/index.php?fulllist=true
But this package is not yet updated for last version of Synology DSM (5.2). Discussion about this package here : http://forum.synology.com/enu/viewtopic.php?f=155&t=82843
When the package will be updated, it will be enough to make USB-toSerial devices working with Girder withing the Girder docker container.