Dialogue Studio OnPremises Deployment Manual
Anywhere365 Dialogue Studio is deployed as a Docker container for an on-premises deployment. This eliminates Dialogue Studio manual installation steps and configuration. Dialogue Studio has dependencies on third-party software that is also prepared in the container. All those dependencies are already installed inside the Dialogue Studio container image. A container is a virtual environment that runs on top of an Operating System kernel. Data from a container on your host system is by default not saved, unless you explicitly mount a host directory as a volume inside the container. The use of containers takes away deployment complexity and it also improves security.
Anywhere365 Dialogue Studio container images are built on Docker. For more information about Docker, please review their website.
Quickstart
This chapter expects that you have basic knowledge of Docker and have Docker already installed on your server. It is recommended that you read the sections about your OS.
The Anywhere365 Dialogue Studio installation media can be imported in Docker with:
To run the Anywhere365 Dialogue Studio container image, use the following command. Change the name, local folder path, host port, username, password and time zone to your preference.
docker run \
--name dialoguestudio \
-d \
-p 1880:1880 \
-v ~/dialoguestudio:/data \
-e NODE_RED_USERNAME=John \
-e NODE_RED_PASSWORD=Doe \
-e TZ=Europe/Amsterdam \
--restart unless-stopped \
anywhere365-dialoguestudio:8.0.0.34950
Now Dialogue Studio is available through http://localhost:1880/ on the Docker host.
The ~ sign is replaced by /home/username.
To update, simply stop and rename the container and start a new one with the new version.
docker stop dialoguestudio
docker rename dialoguestudio dialoguestudio-backup
docker run \
--name dialoguestudio \
-d \
-p 1880:1880 \
-v ~/dialoguestudio:/data \
-e NODE_RED_USERNAME=John \
-e NODE_RED_PASSWORD=Doe \
-e TZ=Europe/Amsterdam \
--restart unless-stopped \
anywhere365-dialoguestudio:8.0.0.34950
Installation of Docker
Installation steps may vary for different Linux distributions. In this document we will handle an Ubuntu 18.04 LTS a Debian based distribution. Ubuntu 18.04 LTS or 20.04 are Anywhere365 Dialogue Studio reference platforms. You can deploy Desktop or Server. If you are unsure deploy Desktop, if you are experienced linux user consider Server.
Install Ubuntu Desktop or Server 18.04 LTS on a x64 hardware or Virtual Machine.
Make sure you have your OS up to date by running
Then install docker by running
Or use your Linux distribution specific or preferred Docker installation instructions.
Verify that docker is installed and operational by running
If everything is working you should see the message Hello world in your terminal like the image below.
Deploying Anywhere365 Dialogue Studio
General
Load the container distribution into Docker
In general, you will always start with importing the Dialogue Studio container distribution into Docker. First obtain a Dialogue Studio container distribution (see paragraph obtain container image per OS section below).
To import the container image, make sure the container image file is downloaded to the Docker host and you have a terminal window open in the directory containing the file. Now, to import the container image, execute following command. Replace the filename with the file’s name you have downloaded.
If the operation succeeds a result like the screenshot below. Please take note of the container image name on the last line of the response. In this example it is anywhere365-dialoguestudio:8.0.0.34950.
Run Dialogue Studio
The command below can be used to start a Dialogue Studio container. If this is the first time you are working with containers, please read the rest of the manual first before you try to get Dialogue Studio to work.
After executing the docker run command with the detach parameter -d you won’t see any startup errors. You can see if the container is running with docker ps -a. If the container isn’t running, then the container is stopped / exited. You can inspect the logs manually with the docker logs <containername> command.
Note that we are splitting the docker run command in multiple lines below, you should execute it in one line on your terminal or powershell window.
docker run \
--name dialoguestudio \
-d \
-p 1880:1880
-v ~/.dialoguestudio:/data \
-e NODE_RED_USERNAME=John \
-e NODE_RED_PASSWORD=Doe \
-e TZ=Europe/Amsterdam \
--restart unless-stopped \
anywhere365-dialoguestudio:8.0.0.34950
-
Linux volume mounts should be mounted on /data
Docker information
To start Dialogue Studio, you need to assemble a docker run command. We’ll take you step by step doing so. First, let’s look at the semantics of the docker run command.
The docker run command always starts with docker run following the options, the image:tag and optionally a command with arguments. For Dialogue Studio the command and arguments are not required, so this document will not handle that.
The most basic docker run command is a docker run with the image and tag.
When this command is executed Dialogue Studio will start and the logs are printed in the terminal window. However, there are some things we did not take care of at this moment.
-
The container does not have a human friendly name
-
The container is not run in detached mode
-
The container does not have a port mapping
-
The container does not have a volume manually assigned
-
The Dialogue Studio’s username and password are default admin/admin
-
The Dialogue Studio’s time zone is UTC
-
The container does not automatically start at OS boot time
It seems a lot of work that has to be done in order to have the list above fixed, but as you will see it is not that much work. Docker has command line parameters for each.
Set a human friendly name
This is one of the easiest things we can do. Think of a name that is logical for your deployment. It has to be an alphanumeric name. It can also contain dashes and underscores. When we decide we want a Dialogue Studio instance for a group of UCC A Unified Contact Center, or UCC, is a queue of interactions (voice, email, IM, etc.) that are handled by Agents. Each UCC has its own settings, IVR menus and Agents. Agents can belong to one or several UCCs and can have multiple skills (competencies). A UCC can be visualized as a contact center “micro service”. Customers can utilize one UCC (e.g. a global helpdesk), a few UCC’s (e.g. for each department or regional office) or hundreds of UCC’s (e.g. for each bed at a hospital). They are interconnected and can all be managed from one central location.’s (a Dialogue Studio instance can handle multiple UCCs). Then we could come up with a name like dialoguestudio-support. In order to give our container this name we can compose the docker run command to contain a name:
Now the container has a human friendly name that can be used to control the container, for example to stop it you can use
and to start it again use
Run container in detached mode
When we run the container, we generally don’t want the Dialogue Studio logs printed in our terminal window. The windows can be detached from the container by pressing CTRL+P,Q. To run Dialogue Studio detached immediately we can add -d to the options of the docker run command:
Assign a port mapping
To be able to connect with a browser like Chrome or Firefox to the Dialogue Studio flow design user interface, a host port needs to be assigned to the container. Dialogue Studio inside the container runs on port 1880. If we want to bind it to the host’s port 8080 instead, we can add an extra option to the docker run command. A port mapping is done in the form of -p host_port:container_port. For example -p 8080:1880
docker run \
--name dialoguestudio \
-d \
-p 8080:1880 \
anywhere365-dialoguestudio:8.0.0.34950
Now it is possible to access the Dialogue Studio interface from a webbrowser by browsing to
http://serverhostname:8080 or 127.0.0.1:8080 or just localhost:8080
To run multiple Dialogue Studio containers at the same time use port mapping. E.g. -p 1880:1880 and -p 1881:1880
Assign a volume
The container is isolated from your host OS and this also true for the filesystem. This means that, by default, the user data like Dialogue Studio flows are stored inside the container and are difficult to backup. To work around this, it is possible to mount a directory on the host OS inside the container.
By default, Docker assigns a Docker volume to the container. This is fine if you don’t care where your data is stored or if your Docker server has a volume provider configured (i.e. a SAN). Our scope is to map a directory on the host OS to the container. This is a per OS specific operation, so make sure to take a look at one of the OS sections below.
In generally a folder on the host OS can be mounted in the container with the volume option -v hostdirectorypath:containerdirectorypath. The userdata inside the container is stored on the /data path for Linux images. Manually create the host directory before you start the docker run command. Replace /home/user with your home path.
docker run \
--name dialoguestudio \
-d \
-p 8080:1880 \
-v /home/user/dialoguestudio:/data \
anywhere365-dialoguestudio:8.0.0.34950
When the container is started files will be created inside the directory on the host OS. This directory should be checked and backed up regularly to prevent data loss when the user makes a mistake in the Dialogue Studio interface.
To restore a backup, simply stop the docker container by running docker stop <containername>, restore the data in the directory and start the container again by running docker start <containername>.
Set username and password
Dialogue Studio is configured with default username admin and password admin. This can be changed with environment variables. Dialogue Studio looks at the container’s environment variables to set the username and password configuration. The environment variable NODE_RED_USERNAME is used for the username and the NODE_RED_PASSWORD environment variable is used for the password. To change the username and password the docker run command can be modified:
docker run \
--name dialoguestudio \
-d \
-p 1880:1880 \
-v /home/user/dialoguestudio:/data \
-e NODE_RED_USERNAME=John \
-e NODE_RED_PASSWORD=Doe \
anywhere365-dialoguestudio:8.0.0.34950
The example above sets the username to John and the password to Doe.
For production environments it is recommended to use docker secrets.
Set time zone
The time zone can also be set by using an environment variable. Valid time zone identifiers can be found on https://en.wikipedia.org/wiki/List_of_tz_database_time_zones under the column TZ database name. A time zone is set as follows:
docker run \
--name dialoguestudio \
-d \
-p 1880:1880 \
-v /home/user/dialoguestudio:/data \
-e NODE_RED_USERNAME=John \
-e NODE_RED_PASSWORD=Doe \
-e TZ=Europe/Amsterdam \
anywhere365-dialoguestudio:8.0.0.34950
This example changes the time zone from UTC to Europe/Amsterdam time zone.
Start container at OS boot time
To make the container start at boot time we must add a restart policy to the docker run command. There are 4 restart policies and each one has its own behavior.
Restart policy |
Behavior |
---|---|
no |
Does not automatically restart the container (default). |
on-failure |
Restarts automatically when the container crashes. However, does not start when server reboots. |
always |
Restarts when container stops unexpectedly. When the container is stopped manually it will be started again after the host reboots. |
unless-stopped |
Same as always but doesn’t start at host boot time container when it was manually stopped. |
docker run \
--name dialoguestudio \
-d \
-p 1880:1880 \
-v /home/user/dialoguestudio:/data \
-e NODE_RED_USERNAME=John \
-e NODE_RED_PASSWORD=Doe \
-e TZ=Europe/Amsterdam \
--restart unless-stopped \
anywhere365-dialoguestudio:8.0.0.34950
That’s it
The Dialogue Studio container is now fully configured and up and running. When the container is created with docker run, you don’t have to recreate it again after you stop the container. You can just simply start the container with docker start. A list of common docker commands can be found below.
Start container
If you have assigned a –-name this is easier to use than the id.
Stop container
Restart container
Container logs
Will write the container log to containerlog.txt.
Inspect container configuration
To see the container configuration info
Delete container
Container can only be deleted if stopped first.
List containers
This lists all running containers. To list also non-running containers, add the flag -a
List container images
Delete container images
Container images can only be deleted when they aren’t used by any container.
Docker detailed information
Linux
Mount volume on local disk
Create a directory on your disk and take note of the full directory path. It is important that the directory is empty. Also make sure that the owner of the directory is not the root user. The run command for a deployment with a mounted folder inside the container looks like this
docker run \
-v /path/to/your/volume/directory:/data \
anywhere365-dialoguestudio:8.0.0.34950
Update Dialogue Studio
To update Dialogue Studio, the new container image needs to be imported into Docker again. Always make sure to also update the Dialogue Studio UCC plugin and check Anywhere365 Core version in release notes.
Stop Dialogue Studio
Rename old container
Make sure to backup the userdata of Dialogue Studio (this is the folder that is mapped into the container).
Start container by running the docker run command with the new image version. It is important you run the same configuration in order to let Dialogue Studio work correctly. Use docker inspect <containername> if you need to look up the configuration.
When Dialogue Studio is up and running again, delete the old backup container (or you can keep it until next update).
Troubleshooting
A: Check if the container is still running with docker ps -a. If the container is exited, then the container is not running. Run docker start <containername> to start the container again. If the container is listed but Dialogue Studio isn’t reachable via the browser, try to use a browser on the docker host machine and navigate to localhost:1880 (or the port you have assigned). If that works, then you have to check the firewall settings of the host machine.
A: That is normal Docker behavior. Docker doesn’t respond with detailed information. When an error occurs, you will get detailed information from Docker.
A: Check that Docker is able to read and write the directory you have mounted. It can also be that you have provided an invalid path inside the container. Docker allows this because it tries to mount the folder at every startup. If it can’t it won’t start. Make sure you create the host directory before you start the docker run command, if not Docker will create and root will be owner of the directory.
A: Check the logs of the container by running docker logs <containername> > containerlog.txt. Then check the containerlog.txt file for errors.
A: Or for a new or reconfigured container run docker container inspect <containername> Then check if settings are conform your earlier docker run command.
A: Did you add a port setting to Plugin Settings list on Sharepoint? Use 8888 for default value.
A: Check the Dialogue Studio Node red plugin configured in config.xml. No errors during ucc startup in ucc log?
A: Check the host directory you put in the –v flag, ownership. If root is the owner, change it so you are the owner and the container is able to write to the directory. Pre create the directory before you execute the first docker run command referencing it.