MI Chatbot Deployment (v6.3.5+)
This article provides a step-by-step instruction on how to install the MI Chatbot on your server and update the bot to a newer version.
The MI Chatbot is implemented as part of the functionality that integrates with the Slack App/MS Teams.
MI Chatbot functionality has been improved in v6.3.5 to simplify the deployment and installation with the following major changes:
- MI Chatbot for Slack can be installed on the same server as MI application without the DMZ deployment.
- Chatbot settings are now stored in Metric Insights' database and can be modified via Slack/Microsoft Teams Integration Editors.
- Security mappings are managed by default in Dashboard DB (the metadata database for Metric Insights) without the need for a separate, manually-created Dataset.
After the MI Chatbot has been installed on the server and the Slack App/MS Teams with bot functions has been built in Slack/MS Teams, MI Chatbot has to be connected with the corresponding app – Slack or MS Teams.
PREREQUISITES:
- If you are deploying Chatbot for MS Teams, allow all incoming requests to port 443 of the Chatbot application server.
The process of MI Chatbot deployment is as follows:
Chatbot Deployment Architecture
- Obtain External Application Credentials
- Connect to the Server by SSH
- Download the MI Chatbot Installation Package
- Operating Systems Supported
4.1. Additional Actions for Operating Systems
- Unpack the Downloaded .tar.gz Archive with the Following Command
- Enter the New Unpacked Folder
- Initiate the Installation Process
7.1. The List of Arguments that Can Be Used During Installation
8. The MI Chatbot Update via Packages
9. What's Next?
The whole process of deploying MI Chatbot and connecting it to Metric Insights comprises the following steps:
1. Obtain External Application Credentials
Access Admin > System > External Applications
- [+ New External Application]
- Make sure the External Application is enabled
- Enter a Name for the External Application
- [Save]
- Set User management access and Cross Domain access to 'yes'
- [Save]
- Click [Show Credentials] to display the Application ID and Application key. These values are needed to connect the Metric Insights application with the Chatbot
2. Connect to the Server by SSH
- Use ssh [email protected] and replace the zeros with the IP address of the server where the Chatbot will be installed
- Example:
ssh [email protected]
- Example:
- When prompted, enter the root password provided by your IT specialist
3. Download the MI Chatbot Installation Package
- Depending on the version, you will be given a link to the corresponding MI Chatbot installation package.
- Along with the link, Username and Password will be provided by the MI support team; enter these credentials into the respective fields
- Confirm your agreement with the Terms and Conditions of the MI Chatbot usage
- [Submit]
This will initiate the download process of the .tar.gz archive (containing all files required to install the system).
4. Operating Systems Supported
The list of supported Operating Systems:
- RHEL 7, 8
- CentOS 7
- Ubuntu 18.04, 20.04, 22.04
- Debian 9,10, 11
- Oracle Linux 7
- Amazon Linux 2
4.1. Additional Actions for Operating Systems
If you are using a firewall on the machine where the Chatbot is installed, opening inbound TCP ports 80 and 443 is necessary for the MI Chatbot to work correctly. Use the following commands to open the ports:
Examples for iptables:
iptables -A INPUT -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp --sport 443 -m state --state ESTABLISHED -j ACCEPT
Examples for ufw:
ufw allow 80/tcp
ufw allow 443/tcp
Examples for firewall-cmd:
firewall-cmd --zone=public --add-port=80/tcp
firewall-cmd --zone=public --add-port=443/tcp
firewall-cmd --runtime-to-permanent
firewall-cmd --reload
5. Unpack the Downloaded .tar.gz Archive with the Following Command
tar -zxf MetricInsights-Chatbot-<version_number>.tar.gz
6. Enter the New Unpacked Folder
cd MetricInsights-Chatbot-<version_number>
7. Initiate the Installation Process
There are three options of MI Chatbot installation:
- Install MI Chatbot on the same server as MI Application
- Install MI Chatbot on a separate server
- Install MI Chatbot on a DMZ server
PREREQUISITES:
- The MI Chatbot must have an open access to the web
- The installation commands below can only be run by a root user
Install MI Chatbot on the Same Server as MI Application
PREREQUISITE:
Metric Insights application has to be installed on the server before the Chatbot installation process.
Note: MI Chatbot for MS Teams can be installed on the same server as MI Application only if the server has a public address.
Install MI Chatbot on a Separate Server
./installer.py --standalone
Install MI Chatbot on a DMZ Server
The MI Chatbot can also be deployed within a DMZ (Perimeter) network.
In case the Chatbot is used for MS Teams, it must be accessible from the internet. DMZ deployment allows the Bot app to be reachable from the Public Network, while the data it queries from Metric Insights remains securely locked within a Private Network.
For details, view the architecture diagrams for Slack and MS Teams.
7.1. The List of Arguments that Can Be Used During Installation
- Download MI Chatbot installation package
- Extract installation files from the downloaded package
- Run the installer providing 4 required parameters:
--app-id
,--app-key
,--app-user
,--hostname
- Wait until MI Chatbot is deployed and check the container list, two new containers should be present:
mi-nlu
andmi-chatbot
. Additionally you can check whether the MI Chatbot is working correctly by accessing<MI hostname>/chatbot/health_check
from your browser
8. The MI Chatbot Update via Packages
This method only works if the MI Chatbot has been initially installed via the installation package (as described above).
To update the MI Chatbot:
- Download the new package
- Extract the archive
- Install it over the old version