Engage Docker - rallytac/pub GitHub Wiki
IMPORTANT
Please make a point to read and understand Engage-Linguistics-Service before you proceed.
Contents
This container contains only binaries for:
- Engage Linguistics Service (ELS)
- ELS Proxy for Microsoft Azure Cognitive Services
- Rallypoint
Summary Of Steps
- Install and populate configuration files on the host machine's file system
- Open TCP port 7443
- Run the container
Configuration Files
As no configuration files are provided in the image, you will need to point the binaries in the container to their respective directories on another container (a "volume container") by way of mapping to bind mounts on the host. Volume bind mounts are the simplest with everything being accomplish in just the docker run
invocation with the use of -v
. See below for an example of running the container, using the -v
option to mount the host's etc/machine-id
file, /etc/elsproxyazured
, /etc/engagelingod
, and /etc/rallypointd
directories into the container. Once changes are completed to the files in these configuration directories, simply restart the container for them to take effect.
While language processing with Engage is pretty straightforward; you really should have a good idea of how it works before going any further.
OK, now that you've got that information internalized and well-understood, let's get going.
Before you get excited about getting your Docker container running, you're going to need configuration files for the goodies inside the container.
These configuration files usually ship inside the installation packages of our components but as we're doing a Docker thang we can't provide the configurations inside the container. Rather, the configurations are stored outside the container on the host file system and mapped in with Docker's -v
option at runtime.
Install empty configuration files
First, download the installation script. This is not yet release software so you'll need to grab it from our unstable build repository. Don't be concerned though - it's stable, just not generally available.
wget http://unstable.rallytac.com:9191/builds/1.235.9075/000/linux_x64/rts-configuration-templates.sh
Next, make that script executable
chmod +x rts-configuration-templates.sh
Now, run it
./rts-configuration-templates.sh
Populate the configuration files' core settings
Rallypoint (RP)
The RP only needs an ID - any valid string will do - such as ELSRP
. Set this in the id
field in the JSON. You're welcome to take a look at our wiki article for the RP at (Engage-Rallypoints)[https://github.com/rallytac/pub/wiki/Engage-Rallypoints] but, frankly, that's overkill for what's needed here.
nano /etc/rallypointd/rallypointd_conf.json
ELS Proxy for Microsoft Azure Cognitive Services
The ELS Proxy for Azure needs just a few items related to authentication with Azure to allow you to actually use Azure. Please see Engage-Linguistics-Service#the-proxy for more information.
nano /etc/elsproxyazured/elsproxyazured_conf.json
Engage Linguistics (ELS)
ELS doesn't need a whole lot of core configuration outside of an ID and licensing. Check out Engage-Linguistics-Service#configuration for more information.
nano /etc/engagelingod/engagelingod_conf.json
Now that you have your core configuration done for the three components in the container, you'll need to populate the variable configuration for ELS in /etc/engagelingod/lingo.json
so that it knows what groups/channels you want it to process. (We call this variable configuration because it'll likely change over time whereas the core configuration will generally not change going forward.)
The variable configuration (i.e. sessions & groups) is covered extensively in the Engage Linguistics Service wiki article. Please be sure to consult that document, especially the section covering the lingo configuration file.
To make your life a little easier, take a look again at the mention of the
lmc
in But Wait, There's More section in the linguistics wiki article. We're sure you'll agree its a cool toy!
Ports Exposed
The only port exposed by the container is TCP 7443. This allows the built-in Rallypoint to accept incoming connections. However, if you're not using the Rallypoint, you need not expose the port.
Logging
All output in the container goes to stdout
which, in turn, can be captured by the host's Linux journaling system (journald
). To make provision for this, use the --log-driver=journald
option.
Invocation
The following will run the container in detached mode, naming it rtsels
. TCP port 7443
is exposed, and a. number of files and directories from the host are bind-mounted with multiple -v
options. All logging will be routed to the Linux journald
daemon and can be viewed using journalctl
.
docker run \
-itd \
-p 7443:7443/TCP \
-v /etc/machine-id:/etc/machine-id \
-v /etc/elsproxyazured:/etc/elsproxyazured \
-v /etc/engagelingod:/etc/engagelingod \
-v /etc/rallypointd:/etc/rallypointd \
--log-driver=journald \
--name rtsels \
rallytac/els-plus-rp
If you want to run the container in the foreground so you can see what's going on, simply specify
-it
instead of -itd
so that the container does not run in detached (i.e. background) mode.