Friday, August 21, 2020

Running Bot Libre Community Edition using Kubernetes on Amazon AWS

This forum post will go over how to run the Bot Libre Community Edition containers from AWS using kubectl on a Kubernetes setup.

What is Kubernetes?

According to kubernetes.io, "Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available."

For an overview of Kubernetes, visit https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/.

You can also visit their home page at https://kubernetes.io/.

Required Software:

  • Kubernetes
  • kubectl

Ensure that kubectl and Kubernetes are configured properly before proceeding

Firewall:

Before starting up the server, make sure to set up your firewall correctly for Bot Libre.

Bot Libre Community Edition requires the following ports to be open:

22 – SSH
80 – HTTP
443 – HTTPS
25 – SMTP
465 – SMTPS
110 – POP3
995 – POP3S
143 – IMAP
993 – IMAPS
6665 – IRC

The procedure for how to set up the firewall depends on the firewall you are using. For example, an Amazon EC2 instance would use security groups. For a typical Linux server, iptables can be used.

For the bare minimums, only the HTTP port needs to be accessible.

AWS Marketplace Product Subscription

You will gain access to the Bot Libre Community Edition container registry by subscribing on the AWS Marketplace.

  1. Go to https://aws.amazon.com/marketplace.
  2. Search for Bot Libre Community Edition, and filter for container products.
    https://aws.amazon.com/marketplace/pp/B08FXT93P9
  3. Click on "Continue to Subscribe".
  4. Read the Terms and Conditions, and click on "Accept Terms".
  5. After your request has been processed, click on "Continue to Configuration".
  6. Select the latest version, and click on "Continue to Launch".

Deploying the Containers

  1. Log in to the Bot Libre Community Edition container registry using the following command:
    • $ aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 117940112483.dkr.ecr.us-east-1.amazonaws.com
  2. Download our Kubernetes manifest file from our GitHub. This can be done with the following command:
  3. Apply the manifest using kubectl:
    • $ kubectl apply -f kubemanifests.yaml
  4. Wait until the app-web and app-db pods are ready.
    • You can use the following command to watch the status of the pods:
      • $ watch kubectl get pods
  5. (Optional) Set up HTTP port forwarding to the app-web pod with the following command:
    • $ kubectl port-forward --address 0.0.0.0 app-web 80:80
    • This can be repeated for other ports to enable Bot Libre to connect to other services.
  6. Open the home page on a web browser. This will take up to 3 minutes to load. If you are starting the container for the first time, a random admin password will be generated.

Retrieving the Admin Password

  1. Once the page has been loaded on a web browser, use the following command with the container name to retrieve the admin password:
    • $ kubectl logs app-web | grep "ADMIN PASSWORD"
  2. Log in to Bot Libre on your web browser by using the username "admin" and the password you have just retrieved.
    • We recommend that you update your admin password after logging in. This is because if the logs have been erased, then you will no longer be able to access the default admin password.

Running the Bot Libre Community Edition docker containers on Amazon AWS

This forum post will go over how to run the Bot Libre Community Edition containers from AWS using Docker Compose on any machine.

Required Software:

Firewall:

Before starting up the server, make sure to set up your firewall correctly for Bot Libre.

Bot Libre Community Edition requires the following ports to be open:

22 – SSH
80 – HTTP
443 – HTTPS
25 – SMTP
465 – SMTPS
110 – POP3
995 – POP3S
143 – IMAP
993 – IMAPS
6665 – IRC

The procedure for how to set up the firewall depends on the firewall you are using. For example, an Amazon EC2 instance would use security groups. For a typical Linux server, iptables can be used.

AWS Marketplace Product Subscription

You will gain access to the Bot Libre Community Edition container registry by subscribing on the AWS Marketplace.

  1. Go to https://aws.amazon.com/marketplace.
  2. Search for Bot Libre Community Edition, and filter for container products.
    https://aws.amazon.com/marketplace/pp/B08FXT93P9
  3. Click on "Continue to Subscribe".
  4. Read the Terms and Conditions, and click on "Accept Terms".
  5. After your request has been processed, click on "Continue to Configuration".
  6. Select the latest version, and click on "Continue to Launch".

Deploying the Containers

  1. Log in to the Bot Libre Community Edition container registry using the following command:
    • $ aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 117940112483.dkr.ecr.us-east-1.amazonaws.com
  2. Download our docker-compose.yml configuration file from our GitHub. This can be done with the following command:
  3. Build and create the containers with the following command:
    • $ sudo docker-compose up --no-start
  4. To start the containers, run the following command:
    • $ sudo docker-compose start
  5. Open the home page on a web browser (this is the same IP address as the server where the Docker commands are run). This will take up to 3 minutes to load. If you are starting the container for the first time, a random admin password will be generated.
    • If you are unsure about your server's public IP address, you can use the following command:
      • $ curl ifconfig.me

Retrieving the Admin Password

  1. Once the page has been loaded on a web browser, use the following command to retrieve the default admin password:
    • $ sudo docker-compose logs | grep "ADMIN PASSWORD"
  2. Log in to Bot Libre on your web browser by using the username "admin" and the password you have just retrieved.
    • We recommend that you update your admin password after logging in. This is because if the logs have been erased, then you will no longer be able to access the default admin password.

Tuesday, July 28, 2020

Running Bot Libre on Amazon EC2 using the Bot Libre Community Edition AMI

You can host your own server running the Bot Libre platform using Amazon EC2. Bot Libre provides a free AMI (Amazon Machine Image) that makes it easy to install and configure the open source Bot Libre Community Edition platform.

The EC2 instance can be launched from either the AWS Marketplace page or the EC2 page.

Launching from the AWS Marketplace:

  1. Search the AWS Marketplace for the Bot Libre Community Edition AMI, and open the page.
    https://aws.amazon.com/marketplace/pp/B08DG88ZSV?qid=1595956177307
  2. Click on "Continue to Subscribe".
  3. Read the Terms and Conditions, and click on "Continue to Configuration".
  4. Select the latest software version, and any region of your choosing. Then, click on "Continue to Launch".
  5. Under "Choose Action", select "Launch through EC2", and click on "Launch". This will take you to the EC2 configuration page.

Launching from the EC2 home page:

  1. Click on "Launch Instance".
  2. Select the "AWS Marketplace".
  3. Search for the Bot Libre Community Edition AMI.
    https://aws.amazon.com/marketplace/pp/B08DG88ZSV?qid=1595956177307
  4. Select it, and click on "Continue". This will take you to the EC2 configuration page.

EC2 configuration:

  1. Select an instance type of your choosing. We recommend having 8 GB of RAM at minimum (e.g. t3a.large). Click on "Next: Configure Instance Details".
  2. Configure your instance details, and click on "Next: Add Storage".
  3. The amount of storage required depends on the amount of content your users will generate. The size of the storage volume can be modified later, if required. Once you have the storage configured, click on "Review and Launch".
  4. Review the instance details, and click on "Lanch".
  5. Select an existing key pair or create a new key pair. This will be used to connect to the instance via SSH.

Retrieving the admin password:

  1. Go to the EC2 Instances page, and find the Public DNS or Public IP of the Bot Libre instance. Note that the DNS and IP will not persist if the instance is stopped.
  2. Copy the DNS or IP into a web browser to load the Bot Libre home page. It can take up to 3 mins for the page to load when launching for the first time.
  3. Once the webpage has loaded for the first time, connect to the instance with SSH using either the DNS or the IP. To log in, use "centos" as the username and use the key you selected during the EC2 configuration. For more information on connecting to an EC2 instance, see this page: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstances.html.
    • To get the admin password, use the following command:
    • $ sudo cat /usr/local/tomcat8/logs/catalina.out | grep "ADMIN PASSWORD" 
    • This password will only be available the first time the instance is run.
  4. Log in to Bot Libre on your web browser by using the username "admin" and the password you have just retrieved.

For more information on the Bot Libre Community Edition see Bot Libre Community Edition

Tuesday, July 21, 2020

Running the Bot Libre platform on-premise using Docker

The Bot Libre Community Edition web platform is now available as a Docker container. This means that getting Bot Libre up and running on your server has never been easier!

What is Docker?

Docker is a platform that allows you to run “containers” using OS level virtualization. A container is a software package that is bundled with its required libraries and configuration, so you do not have to perform any additional configuration/installation yourself.

Software You Will Need:

Firewall:

Before starting up the server, make sure to set up your firewall correctly for Bot Libre.

Bot Libre Community Edition requires the following ports to be open:

  • 80 – HTTP
  • 443 – HTTPS
  • 25 – SMTP
  • 465 – SMTPS
  • 110 – POP3
  • 995 – POP3S
  • 143 – IMAP
  • 993 – IMAPS
  • 6665 – IRC

The procedure for how to set up the firewall depends on the firewall you are using. For example, an Amazon EC2 instance would use security groups. For a typical Linux server, iptables can be used.

Deploying Bot Libre using Docker Compose:

First, you will need to download the docker-compose.yml file from our GitHub.

This can be done with the following command:

To build and create the containers for Bot Libre, run the following command:

  • $ sudo docker-compose up --no-start

Running Bot Libre using Docker Compose:

To start the containers, run the following command:

  • $ sudo docker-compose start

To gracefully stop the containers, run the following command:

  • $ sudo docker-compose stop

To view the logs, run the following command:

  • $ sudo docker-compose logs

If you need to run bash on the Tomcat web server container (app-web), first get the name of the container with this command:

  • $ sudo docker ps

Then, use the following command with the container name:

  • $ sudo docker exec -it container_name bash

Friday, June 26, 2020

How to create your own special event bot

Chatbots are an exceptional way to grab users attention for your next special event. They can register and inform people through the web, via email, or even with social media.

To create your own special event bot, first head to Bot Libre or Bot Libre for Business.

Here you'll want to sign up for a new account, and then click on the "Bots" icon at the top of the screen.

Select "New Bot", give your bot a name, and then set the template to special_event_bot. 

Click create and we're almost done!

At this point you've created a bot, but they still have generic special event responses. Let's change that.

 

Select the Admin box and navigate to the Training & Chat Logs page.

Here you can handle greetings, responses, all the way up to more the advanced topics like conversation flows or Facebook accounts all with a few clicks!

To get you started have a chat with our demo special event bot

If you encountered any issues, or would like help setting up your bot please email us at support@botlibre.com or upgrade to our Platinum service and we can build your bot for you.

Friday, March 13, 2020

Searching Twitter tweets by location

Bot Libre allows to you connect your bot with a Twitter account. This allows you to automate interactions with your community, or automate the posting of information. For a tutorial on creating a Twitter bot see:

https://www.botlibre.com/forum-post?id=5015

Always ensure you comply with Twitter's terms of service and automation rules,

https://help.twitter.com/en/rules-and-policies/twitter-automation

Bot Libre's Twitter integration includes support for auto replies to mentions or direct messages to your bot, auto retweeting, Tweet search, auto replies, and auto posts.  The Tweet search feature allows your bot to search for tweets on Twitter to process with its rules.

In your bot's Admin Console on its Twitter page you can configure your Twitter bot's rules. One option is the "Tweet Search", this allows you to enter multiple Twitter search queries (each on a new line).  A Twitter search can contain a list of keywords, but can also include many other commands, for a full list see,

https://twitter.com/search-advanced

One option is geo location. This lets you search tweets by location.

For example to queries all tweets on the #chatbots hashtag in the USA you can use:

#chatbots geocode:39.8,-95.583068847656,2500km

To use geocode you need to know the coordinate of the city or location you are interested in. Here is a good website to get the coordinates for a place:

https://www.latlong.net/

For more geo location examples see:

http://thoughtfaucet.com/search-twitter-by-location/examples/

Tuesday, December 17, 2019

Announcing Bot Libre 8, now open source!

We have released Bot Libre 8!

The worlds most advanced bot platform just got better. Bot Libre 8 is a free and open source platform for developing and hosting bots. Bot Libre 8 includes support for chatbots, virtual agents, virtual assistants, social media bots, SMS bots, IVR bots, IOT bots, game bots, live chat, animated avatars, speech, deep learning analytics, and more. Bot Libre supports bots for the web, mobile, Facebook, Twitter, Skype, Telegram, Kik, WeChat, Slack, email, SMS, IVR, Alexa, Google Home, IRC, and new platforms are being added every month.
The Bot Libre 8 web platform is now open source, download now to host your own bot server. Host on your own server on-premise, or on your own cloud instance on any cloud platform such as Amazon EC2, or Microsoft Azure.

"Bot are the new apps".

Chat and chatbots are the new application paradigm that is replacing mobile and web as the new leading method of engaging your customers and users. Chat lets you engage your customers everywhere, on web, mobile, social media, phone, and on the Internet of things.

Bot Libre lets anyone create a bot for the web, mobile, social media, phone, and the Internet of things. Connect your bot to Twitter, Facebook, Telegram, Skype, Kik, Slack, WeChat, email, SMS, IVR, Alexa, Google Home, and more.

Bot Libre 8 supports rich HTML responses including buttons, links, choices, images, video, and audio. Bot Libre supports HTML responses on the web, mobile, and automatically maps HTML to social media platforms.

Bot Libre bots can be trained using natural language, chat logs, response lists, Twitter feeds, AIML, and scripting. Responses are automatically matched using a heuristic artificial intelligence algorithm and does not require any programming. Responses can also use keywords, topics, required words, labels, repeats, and other meta data.

Bot Libre 8 supports programming and scripting your bot using AIML 2, and Self. Self is our own dialect of JavaScript. Self is an object oriented scripting language, and integrated with an object database. Self extends JavaScript to provide support for natural language processing, state machines, object persistence, and includes a class library for accessing web services and utilities. Self also supports all AIML 2 operations, and some aspects of ChatScript patterns.

Bot Libre 8 is more than just bots, but a complete artificial intelligence platform. Bot Libre lets you create deep learning analytics for image recognition, speech and audio recognition, object detection, prediction and data analysis. You can create and train an image recognition analytic without any programming, just by uploading images. You can then access your analytics through our web API and mobile SDK, or from your bot.

New features in Bot Libre 8.0 since 7.0 include:

  • The Bot Libre web platform is now open source, download now to host your own bot server
  • Interactive Voice Response, automate your voice phone call center
  • Redesigned Training & Chat Logs user interface
  • AIML Map, Set, and properties file import support
  • AIML compatibility option
  • Knowledge graph view
  • Redesigned user and bot messaging
  • NLP 4 - Bot Libre's NLP engine has been redesigned to make bots response's better, make training bots easier, and better support international languages
  • User profile avatars and friends (add bot's as your friend using @bot-name)
  • Updated support for Microsoft Speech
  • Analytic testing repository and test reports

Create your own free account and bot today on botlibre.com,
or let us build your bot for you on our commercial service Bot Libre for Business.
or download our open source platform to run on-premise on your own server