• Executables for Docker

    From Deon@VERT/CHINWAG to Digital Man on Tuesday, October 16, 2018 10:11:31
    Hey Digital Man,

    I'm in the process of building Synchronet into a Docker container (should make it easier for folks to try it out - I'll provide some details how they can get up and running when I have the container built).

    Not sure if you have used Docker before, but one of the great things with Docker is it forces you to consider applications, working space and data files. In simple terms applications are static (the container represents a version of an application), working space is where temp files are created (and in the case of BBSes semaphore files would be created) and data is the persistent configuration and data for the application (in BBS terms this would be the config, mail areas and file areas, ansi/ascii files and menus..

    I'll probably ping you on a few topics, my aim is to build a "lean" container (smaller means easier to transfer) - as well as help understanding the internals of Syncronet. (I've only beein playing with it for a week!)

    First thing - the exec js files in ./exec/ are they by definition "static" - they shouldnt be modified (unless you "upgrade")? I need to puth the "binaries" in the container, and the "data" outside the container and I thought settings SBBSCTRL would enable me to do that (ie: it would point to /opt/sbbs/data). However, it seems the javascript files are found by the SBBSCTRL path?

    ...deon
    ...deon

    ---
    þ Synchronet þ Linucus SBBS | BBS in Docker on Pi!
  • From Digital Man@VERT to Deon on Tuesday, October 16, 2018 12:12:33
    Re: Executables for Docker
    By: Deon to Digital Man on Tue Oct 16 2018 10:11 am

    First thing - the exec js files in ./exec/ are they by definition "static" - they shouldnt be modified (unless you "upgrade")?

    Right. The "mods" directory is where modified (or sysop-generated) .js and .src/bin files should be placed. That said, I think a lot of sysops modify the files in exec directly.

    I need to puth the
    "binaries" in the container, and the "data" outside the container and I thought settings SBBSCTRL would enable me to do that (ie: it would point to /opt/sbbs/data).

    No, SBBSCTRL needs to point to the "ctrl" directory.

    However, it seems the javascript files are found by the
    SBBSCTRL path?

    Everything (configuration, data, and executable files) is found based on the SBBSCTRL path.

    digital man

    This Is Spinal Tap quote #45:
    I don't really think the end can be assessed as of itself as being the end Norco, CA WX: 75.2øF, 11.0% humidity, 9 mph SE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deon@VERT/CHINWAG to Digital Man on Wednesday, October 17, 2018 01:30:12
    Re: Executables for Docker
    By: Digital Man to Deon on Tue Oct 16 2018 12:12 pm

    Right. The "mods" directory is where modified (or sysop-generated) .js and .src/bin files should be placed. That said, I think a lot of sysops modify the files in exec directly.

    OK, good, Docker can accommodate that scenario. So are things searched for in the mods dir first, before being attempted in the exec dir?

    No, SBBSCTRL needs to point to the "ctrl" directory.

    Ahh, you are correct, I have it pointing to /opt/sbbs/data/ctrl

    Everything (configuration, data, and executable files) is found based on the SBBSCTRL path.

    OK, this is problematic. I found references to SBBSEXEC on th wiki but it doesnt seem to do anything. IE: I build with SBBSEXEC set, and I run with it set (it points to /opt/sbbs/exec), however, I see in the logs it is look for everything in /opt/sbbs/data/exec - which I guess is calculated from '$SBBSCTRL/../exec'?

    Is it easy to change that behaviour?

    ...deon
    ...deon

    ---
    þ Synchronet þ Linucus SBBS | BBS in Docker on Pi!
  • From Digital Man@VERT to Deon on Tuesday, October 16, 2018 18:51:08
    Re: Executables for Docker
    By: Deon to Digital Man on Wed Oct 17 2018 01:30 am

    Re: Executables for Docker
    By: Digital Man to Deon on Tue Oct 16 2018 12:12 pm

    Right. The "mods" directory is where modified (or sysop-generated) .js and .src/bin files should be placed. That said, I think a lot of sysops modify the files in exec directly.

    OK, good, Docker can accommodate that scenario. So are things searched for in the mods dir first, before being attempted in the exec dir?

    Yes, when .js scripts and .bin modules are executed the mods (or mods/load) are searched first.

    No, SBBSCTRL needs to point to the "ctrl" directory.

    Ahh, you are correct, I have it pointing to /opt/sbbs/data/ctrl

    That seems wrong. If you have sbbs installed in /opt/sbbs, then the SBBSCTRL env var would normally be set to /opt/sbbs/ctrl.

    Everything (configuration, data, and executable files) is found based on the SBBSCTRL path.

    OK, this is problematic. I found references to SBBSEXEC on th wiki but it doesnt seem to do anything.

    It is optional and usually not necessary.

    IE: I build with SBBSEXEC set, and I run with it
    set (it points to /opt/sbbs/exec), however, I see in the logs it is look for everything in /opt/sbbs/data/exec - which I guess is calculated from '$SBBSCTRL/../exec'?

    Is it easy to change that behaviour?

    I don't think there's any behavior that needs to change, but if you do, please elaborate.

    digital man

    Synchronet "Real Fact" #50:
    JAM and Squish were considered before developing Synchronet Message Base format.
    Norco, CA WX: 74.3øF, 10.0% humidity, 1 mph S wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Tony Langdon@VERT to Digital Man on Wednesday, October 17, 2018 13:54:00
    On 10-16-18 12:12, Digital Man wrote to Deon <=-

    Right. The "mods" directory is where modified (or sysop-generated) .js
    and .src/bin files should be placed. That said, I think a lot of sysops modify the files in exec directly.

    That's one thing I really like about Synchronet - the ability to install modes without trashing the original files. I use it as designed and have my mods in mods/


    ... And now for something you'll really like! -Rocky
    === MultiMail/Win v0.51
    --- SBBSecho 3.03-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From echicken@VERT/ECBBS to Tony Langdon on Wednesday, October 17, 2018 00:25:28
    Re: Re: Executables for Docker
    By: Tony Langdon to Digital Man on Wed Oct 17 2018 13:54:00

    That's one thing I really like about Synchronet - the ability to install modes without trashing the original files. I use it as designed and have my mods in mods/

    I hope most sysops do it this way. Those who don't ... learn to do so eventually.

    Occasionally I end up with stuff in mods/ and forget about it, only to realize I have changes that didn't make their way into CVS, or that I'm not benefitting from changes that have shown up there. Good to go through that directory and weed it out once in a while. (Mine's a disaster right now with some 100+ files in it.)

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-425-5435
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Tony Langdon@VERT to echicken on Wednesday, October 17, 2018 17:24:00
    On 10-17-18 00:25, echicken wrote to Tony Langdon <=-

    I hope most sysops do it this way. Those who don't ... learn to do so eventually.

    Yeah, does make it easy to roll back (or forward) to stock. :)

    Occasionally I end up with stuff in mods/ and forget about it, only to realize I have changes that didn't make their way into CVS, or that I'm not benefitting from changes that have shown up there. Good to go
    through that directory and weed it out once in a while. (Mine's a disaster right now with some 100+ files in it.)

    I've only got a couple of mods myself, so fair;y straightforward to manage. :)


    ... It's no secret a man's conscience can sometimes be a pest.
    === MultiMail/Win v0.51
    --- SBBSecho 3.03-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deon@VERT/CHINWAG to Digital Man on Wednesday, October 17, 2018 12:58:28
    Re: Executables for Docker
    By: Digital Man to Deon on Tue Oct 16 2018 06:51 pm

    Re: Executables for Docker
    By: Deon to Digital Man on Wed Oct 17 2018 01:30 am

    OK, this is problematic. I found references to SBBSEXEC on th wiki
    but it doesnt seem to do anything.

    It is optional and usually not necessary.

    IE: I build with SBBSEXEC set, and I run with it
    set (it points to /opt/sbbs/exec), however, I see in the logs it is
    look for everything in /opt/sbbs/data/exec - which I guess is
    calculated from '$SBBSCTRL/../exec'?

    I don't think there's any behavior that needs to change, but if you do, please elaborate.

    Here is what I'm trying to do. The "Application" can live anywhere - I'm choosing to install it in /opt/sbbs (so it is from /opt/sbbs, I run the make install after downloading the makefile from here).

    Once the build is complete, in /opt/sbbs I have the sbbs "application" files in /opt/sbbs/exec (and standard web pages in ./web, doors in ./xtrn).. Everything else in /opt/sbbs is considered "configuration" (how SBBS works) or "data" (message, files, menus, etc)... I want to move those files to be under /opt/sbbs/data/{node1,node2,ctrl,text,mods...}.

    I set SBBSCTRL to /opt/sbbs/data/ctrl, and with PATH set to /opt/sbbs/exec "scfg" works no problems. However, when I start sbbs /opt/sbbs/exec/sbbs, it starts looking for stuff in /opt/sbbs/data/exec. Now the kludge fix would be to symlink that back, but I would rather fix it properly. (I have executables looked for in /opt/sbbs/exec.) I thought SBBSEXEC would enable that but it appears to not be effective.

    Does this make sense?
    ...deon

    ---
    þ Synchronet þ Linucus SBBS | BBS in Docker on Pi!
  • From Digital Man@VERT to Deon on Wednesday, October 17, 2018 11:26:05
    Re: Executables for Docker
    By: Deon to Digital Man on Wed Oct 17 2018 12:58 pm

    Re: Executables for Docker
    By: Digital Man to Deon on Tue Oct 16 2018 06:51 pm

    Re: Executables for Docker
    By: Deon to Digital Man on Wed Oct 17 2018 01:30 am

    OK, this is problematic. I found references to SBBSEXEC on th wiki
    but it doesnt seem to do anything.

    It is optional and usually not necessary.

    IE: I build with SBBSEXEC set, and I run with it
    set (it points to /opt/sbbs/exec), however, I see in the logs it is
    look for everything in /opt/sbbs/data/exec - which I guess is
    calculated from '$SBBSCTRL/../exec'?

    I don't think there's any behavior that needs to change, but if you do, please elaborate.

    Here is what I'm trying to do. The "Application" can live anywhere - I'm choosing to install it in /opt/sbbs (so it is from /opt/sbbs, I run the make install after downloading the makefile from here).

    Once the build is complete, in /opt/sbbs I have the sbbs "application" files in /opt/sbbs/exec (and standard web pages in ./web, doors in ./xtrn).. Everything else in /opt/sbbs is considered "configuration" (how SBBS works) or "data" (message, files, menus, etc)... I want to move those files to be under /opt/sbbs/data/{node1,node2,ctrl,text,mods...}.

    Why? So then you'd have /opt/sbbs/data/data/... seems potentially confusing.

    I set SBBSCTRL to /opt/sbbs/data/ctrl, and with PATH set to /opt/sbbs/exec "scfg" works no problems. However, when I start sbbs /opt/sbbs/exec/sbbs, it starts looking for stuff in /opt/sbbs/data/exec. Now the kludge fix would be to symlink that back, but I would rather fix it properly. (I have executables looked for in /opt/sbbs/exec.) I thought SBBSEXEC would enable that but it appears to not be effective.

    Does this make sense?

    The path to the exec directory (and others) is configured in SCFG->System->Advanced Options. The default (for exec) is "../exec", relative to the ctrl directory. I suggest you leave these alone and just use the standard sbbs directory tree layout, so you'd have (for your examples of installing in /opt/sbbs):

    /opt/sbbs/exec
    /opt/sbbs/ctrl
    /opt/sbbs/data
    /opt/sbbs/text
    /opt/sbbs/node1
    etc.

    digital man

    Synchronet/BBS Terminology Definition #47:
    SMB = Synchronet Message Base (e.g. smblib)
    Norco, CA WX: 76.2øF, 23.0% humidity, 8 mph WSW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From wkitty42@VERT/SESTAR to echicken on Wednesday, October 17, 2018 15:26:55
    Re: Re: Executables for Docker
    By: echicken to Tony Langdon on Wed Oct 17 2018 00:25:28

    That's one thing I really like about Synchronet - the ability to install modes without trashing the original files. I use it as designed and have my mods in mods/

    I hope most sysops do it this way. Those who don't ... learn to do so eventually.

    while this isn't exactly about using docker, it brings me to ask if my modified 404.ssjs that you helped me with should be in /mods and i should restore the original 404.ssjs??


    )/\(aldo

    ---
    þ Synchronet þ SouthEast Star Mail HUB - SESTAR
  • From echicken@VERT/ECBBS to wkitty42 on Wednesday, October 17, 2018 16:34:48
    Re: Re: Executables for Docker
    By: wkitty42 to echicken on Wed Oct 17 2018 15:26:55

    while this isn't exactly about using docker, it brings me to ask if my modified 404.ssjs that you helped me with should be in /mods and i should restore the original 404.ssjs??

    No, the web server doesn't use the mods/ directory in this context, so that wouldn't work. (As far as I know.) Maybe it could/should.

    You can just leave the modified file there; won't be a problem unless you update your web/ directory from CVS, which is rarely necessary at the moment.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-425-5435
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Deon@VERT/CHINWAG to Digital Man on Wednesday, October 17, 2018 22:21:38
    Re: Executables for Docker
    By: Digital Man to Deon on Wed Oct 17 2018 11:26 am

    Re: Executables for Docker
    By: Deon to Digital Man on Wed Oct 17 2018 12:58 pm

    Why? So then you'd have /opt/sbbs/data/data/... seems potentially confusing.

    It could be /opt/sbbs/foobar - I'm moving to get all all the "data" associated with SBBS under a common root - makes a docker deployment simpler. (And that common root needs to be a different common root to the application binaries.)

    For that matter, I dont care if SBBS is installed in /opt/sbbs and the data in /var/opt/sbbs (as in good *unix practice - depending on your heritage).

    The path to the exec directory (and others) is configured in SCFG->System->Advanced Options. The default (for exec) is "../exec",

    OK, I hadnt found that yet - I might be able to work with that.
    ...deon

    ---
    þ Synchronet þ Linucus SBBS | BBS in Docker on Pi!