Announcement

Collapse
No announcement yet.

When developing a plugin, where should I put it in the Docker container?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Paul Webster
    replied
    See my earlier reply ...
    LMS version checking routines treat the letter at the end to indicate a beta of the upcoming release

    I use
    0.0.1, 0.0.2a, 0.0.2b, 0.0.2c, 0.0.2, 0.0.3a, 0.0.3b, 0.0.3c, 0.0.3

    Leave a comment:


  • adhawkins
    replied
    Originally posted by mherger View Post
    No, your query would return the latest release version. Which is 8.2.0.
    8.2.1 is a nightly build. Stable but can change at any time. You'd get
    the latest 8.2.1 if you replaced 8.0.0 in your query with 8.2.1
    (whenever a new build was available).
    Ah ok, got it. I'll stick with what I'm using then, as it's my 'working' server, generally like to keep it as stable as possible.

    Hopefully final question, what version naming scheme can I use to indicate beta releases? It seems to get confused if I include anything other than numbers in there.

    I might go down the route the linux kernel used to do, with odd numbers being 'beta' and even numbers 'official' releases? So the betas for the work I'm doing will be 1.1.x, and then when I'm happy it'll go to 1.2.x.

    Andy

    Leave a comment:


  • adhawkins
    replied
    Originally posted by mherger View Post

    dev is 8.3 while stable is 8.2.1
    In my 'real' server, I have a script that checks for new Debian packages. It queries the following URL:



    Currently this is returning: https://downloads.slimdevices.com/Lo....2.0_amd64.deb

    Shouldn't this be something based on 8.2.1?

    If I query specifically for 'version=8.2.1' it does get the correct one. What URL should I be using to find the latest 'stable' .deb?

    Andy

    Leave a comment:


  • adhawkins
    replied
    Ok, just built my container from 'dev', and the scan completes as expected (the Info dialog shows it doing a 'Create Library Views' step which it wasn't previously).

    Thanks a lot for your help!

    Andy

    Leave a comment:


  • mherger
    replied
    When developing a plugin,where should I put it in the Docker container?

    > I assume if I use the 'dev' tag for the docker image that'll pick this
    > up?


    dev is 8.3 while stable is 8.2.1

    Leave a comment:


  • adhawkins
    replied
    Originally posted by mherger View Post
    Wow! You hit the nail on the head! I couldn't imagine until I tried
    myself. It would indeed use an internal, global variable "cachedir" -
    which is undefined in the scanner. I'll fix this. But you'll have to use
    a nightly build instead of 8.2.0, eg. "stable". It should be ready in a
    few minutes. Please give it a try and report back. Thanks a lot for your
    persistence!
    I assume if I use the 'dev' tag for the docker image that'll pick this up?

    Glad we got there in the end, I was seriously questioning my sanity for a while there!

    Andy

    Leave a comment:


  • mherger
    replied
    When developing a plugin,where should I put it in the Docker container?

    > Is there any chance the
    > scanner is being started with a different set of 'include' directories
    > or something?


    Wow! You hit the nail on the head! I couldn't imagine until I tried
    myself. It would indeed use an internal, global variable "cachedir" -
    which is undefined in the scanner. I'll fix this. But you'll have to use
    a nightly build instead of 8.2.0, eg. "stable". It should be ready in a
    few minutes. Please give it a try and report back. Thanks a lot for your
    persistence!

    Leave a comment:


  • adhawkins
    replied
    Ok, just set up a VM, installed LMS from a .deb, unpacked the ZIP of my plugin to /var/lib/squeezeboxserver/Plugins and it's working fine.

    I've realised I wasn't clicking the checkbox on the logging settings to save the log entries. I've now done this, and think I'm making some progress.

    On the VM, I see the 'init' log entry for my plugin in both the server.log and scanner.log

    On Docker, I only see the 'init' log entry for my plugin in the server.log.

    I've attached all the log files so you can see what's going on.

    To be clear, the plugin code files in both cases are the same, and are for the released version of my Plugin (SimpleLibraryViews).

    Hope this can help get some movement on this! Is there any chance the scanner is being started with a different set of 'include' directories or something?

    Thanks

    Andy
    Attached Files

    Leave a comment:


  • adhawkins
    replied
    I'm using the community container. Here's the full docker-compose file:

    version: "3.5"
    networks:
    default:
    name: lms

    volumes:
    music:
    driver: local
    driver_opts:
    type: nfs
    o: addr=nas.gently.org.uk
    device: ":/mnt/data/music"

    services:
    lms:
    container_name: lms
    hostname: lms-docker
    image: lmscommunity/logitechmediaserver:8.2.0
    restart: unless-stopped
    networks:
    - default
    ports:
    - "9000:9000"
    - "9090:9090"
    - "3483:3483"
    - "3483:3483/udp"
    volumes:
    # folder where lms stores its data (cache, logs, prefs)
    - ./lms_storage:/config
    # folder where lms should look for music
    - music:/var/spool/music
    # use time of host
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
    # - ./Plugins/SimpleLibraryViews/SimpleLibraryViews:/config/cache/Plugins/SimpleLibraryViews
    environment:
    - PUID=1000
    - PGID=1003
    (the commented out volume is me trying to inject the local source directory for the plugin into the container. I've stopped doing that for now while I work out what's going on).

    I run the container using 'docker-compose up -d'

    That's basically all I'm doing.

    Andy

    Leave a comment:


  • mherger
    replied
    When developing a plugin,where should I put it in the Docker container?

    > Ok, so I'm putting them in the right place it seems. Just odd that I'm
    > not seeing the initialisation messages then.


    Maybe you can describe your Docker workflow? It should work, after
    all... what image are you using? How are you building the container? How
    are you running it?

    Leave a comment:


  • adhawkins
    replied
    Ok, so I'm putting them in the right place it seems. Just odd that I'm not seeing the initialisation messages then.

    I chose to fire up a Docker container as it seemed the easiest way to keep everything self-contained. I'll spin up a VM and give things a try that way.

    Andy

    Leave a comment:


  • mherger
    replied
    When developing a plugin,where should I put it in the Docker container?

    > When I start the server up, I don't see any sign of the 'warn' logging
    > that's in InitPlugin. However, the plugin is listed in the web
    > interface, and if I make changes to its settings I get logging in the
    > server log file showing that the settings have been updated.
    >
    > Does this mean that the plugin isn't being loaded when the server
    > starts?


    No. If it wasn't loaded, then you wouldn't have any settings to change.

    > I guess it comes back to the original question. If I want to work on the
    > development of a plugin in the Docker container, where should I put the
    > plugin files while working on them?


    /config/cache/Plugins IMHO is the right place.

    But why would you need to run Docker in development? Any system able to
    run Docker should be able to run LMS from the source, IMHO.

    Leave a comment:


  • adhawkins
    replied
    God, this is so confusing.

    I've just cleaned out the container and any mounts to it. Copied in the plugin from my working server to /config/cache/Plugins/SimpleLibraryViews. The Plugin directories shown in the Info page of the server are:

    Plugin Folders: /config/cache/InstalledPlugins/Plugins, /lms/Plugins, /config/cache/Plugins

    When I start the server up, I don't see any sign of the 'warn' logging that's in InitPlugin. However, the plugin is listed in the web interface, and if I make changes to its settings I get logging in the server log file showing that the settings have been updated.

    Does this mean that the plugin isn't being loaded when the server starts?

    I guess it comes back to the original question. If I want to work on the development of a plugin in the Docker container, where should I put the plugin files while working on them?

    Andy

    Leave a comment:


  • mherger
    replied
    When developing a plugin,where should I put it in the Docker container?

    > Ok, I've done that. On my 'real' LMS server, I see entries for the
    > initPlugin in both server.log and scanner.log.


    What "that"? "warn" statements or regular debugging level changed?

    Are you sure you're running exactly the same code in both environments?
    Would the same plugin code run when executed in your normal environment?
    I guess you checked your scanner.log for information about failure to
    load the plugin?

    Leave a comment:


  • adhawkins
    replied
    Ok, I've done that. On my 'real' LMS server, I see entries for the initPlugin in both server.log and scanner.log.

    However, on the Docker instance, I only see the entry in server.log. There is no mention of my plugin in scanner.log.

    Can you think of any reason why this might be?

    Andy

    Leave a comment:

Working...
X