Chatbots are driving the industry. With Botium we are driving chatbots. Botium is a suite of open source software components that support chatbot makers in training and quality assurance.
Botium Box is running on standard components available for free. You can install it on your own server (on premise), or use cloud providers for serverless installation, or even a mixture of those approaches.
IF YOU LIKE WHAT YOU SEE, PLEASE CONSIDER GIVING US A STAR ON GITHUB!
This is the fastest way to launch Botium Box and all required components (docker and docker-compose required):
> curl --output docker-compose-all.yml https://raw.githubusercontent.com/codeforequity-at/botium-box-basic-dist/master/docker-compose-all.yml
> docker-compose -f docker-compose-all.yml up -d
> docker-compose -f docker-compose-all.yml logs -f
The last command is optional, you will see log output
Botium Box will now run on http://127.0.0.1:4000
If you already have installed Botium Box before and just want to update to the latest Botium Box build, run this:
> docker-compose -f docker-compose-all.yml stop
> docker-compose -f docker-compose-all.yml pull
> docker-compose -f docker-compose-all.yml up -d
> docker-compose -f docker-compose-all.yml logs -f
The last command is optional, you will see log output
Botium Box can be installed "serverless" using existing cloud services.
Get Redis - a free instance from https://redislabs.com/ as a starter. From the "Configuration" please note the Endpoint and the Redis Password for later use (you can choose any Redis username when configuring Botium Box later).
Get Prisma - a free instance running on Heroku as a starter. See here. From the Heroku Dashboard, open the "Settings" tab, then "Reveal Config Vars", the environment variable named "CONFIG" shows the "Management API Secret" - you will need this later. The Heroku endpoint is required later as well.
Fill in the environment variables from what you know from above, and afterwards navigate to the Heroku App.
Attention: the Heroku free tier is not suitable for Botium Box production usage
Botium Box requires three directories for operations. You can just let them created inside the Docker container, but this is not recommended.
- A directory holding the test sets should be mounted to /app/server/testsets
- A working directory for the Botium Box server mounted to /app/server/botiumwork and for the agents mounted to /app/agent/botiumwork
- A resources directory for the Botium Box server mounted to /app/server/resources and for the agents mounted to /app/agent/resources
All of them can be handed over to docker with the -v command line flag.
For hosting Botium Box as Docker, use these commands to run the Docker image:
> docker run -v `pwd`/botiumwork:/app/server/botiumwork \
-v `pwd`/botiumwork:/app/agent/botiumwork \
-v `pwd`/testsets:/app/server/testsets \
-v `pwd`/resources:/app/server/resources \
-v `pwd`/resources:/app/agent/resources \
-e BOTIUMBOX_QUEUE_REDISURL=redis://redisuser:redispassword@redishost:redisport \
-e PRISMA_ENDPOINT=https://my-prisma-endpoint:my-prisma-port/demo/dev \
-e PRISMA_MANAGEMENT_API_SECRET=my-prisma-management-api-secret \
-e PRISMA_SECRET=something123 \
-e JWT_SECRET=something123 \
-p 4000:4000 botium/botium-box-ce:box-latest
Botium Box will now run on http://127.0.0.1:4000
For some log output, you can add the -e DEBUG=botium* environment variable
You can run Botium Box on your own server.
- docker
- docker-compose
- Node.js (only when running node processes outside of docker)
If you have a firewall, you have to make sure that it allows inbound connections to port 4000 (default Botium Box listen port), or any other port if you are not using the default port
The Docker-Compose file contains all prerequisites for running Botium Box and is the recommended and most easy way to run Botium Box.
- Download docker-compose-all.yml and save to your local hard drive.
- Start Botium Box by running docker-compose:
> docker-compose -f docker-compose-all.yml up
- Point your browser to http://127.0.0.1:4000
To make your Botium testsets, resources and working directory point to a folder of your choice (recommended), you have to edit the docker-compose-all.yml file!
Botium Box can use "docker-in-docker" to startup in a single docker container, spawning the prerequisites in separate docker containers.
Don't use this setup in production environments!
> docker run -v `pwd`/botiumwork:/app/server/botiumwork \
-v `pwd`/botiumwork:/app/agent/botiumwork \
-v `pwd`/testsets:/app/server/testsets \
-v `pwd`/resources:/app/server/resources \
-v `pwd`/resources:/app/agent/resources \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 4000:4000 botium/botium-box-ce:standalone-latest
Point your browser to http://127.0.0.1:4000
Prepare Backend services
- Download docker-compose.yml and save to your local hard drive.
- Start backend services (includes Prisma, MySQL and Redis) by running docker-compose:
> docker-compose up
Download and run Botium Box
- Download Botium Box:
> npm install -g botium-box
- Run Botium Box:
> botium-box-cli start --pe http://127.0.0.1:4466/box/dev -r redis://127.0.0.1:6379 -p 8080
- Point your browser to http://127.0.0.1:8080
if you run this under macOS then you need to install those first. This is basically needed, because there is no timeout command in the OSX bash shell. Here you find more information wait-for-it OSX issue timeout
> brew install coreutils
> alias timeout=gtimeout
> git clone https://github.com/codeforequity-at/botium-box-basic-dist.git && cd botium-box-basic-dist
> npm install
> npm run start-standalone:backend
> npm run start-standalone:frontend
Botium Box will now run on http://127.0.0.1:4000
Installation and startup can take a while, especially on first usage.
It is possible to mix the above architecture: Prisma, Redis and Botium Box are loosly coupled, you can choose whatever your infrastructure suggests as best option - Prisma and Redis in the cloud, Botium Box locally. Or run Prisma locally, Botium Box in the cloud and use an existing Redis service - it's totally up to you.
The only thing you have to make sure is connectivity between Botium Box and Prisma as well as Redis service.
Default username: "admin"
Default password: "nooneknows"
Have fun.