Categories:
Get started with Aura Bot
Guidelines including how to create a bot service, different approaches to install Aura Bot and procedure for its configuration
Related documents
📃 Aura Bot Platform descriptive documentation
Introduction
ℹ️ First time using Aura Bot? Go ahead with this section.
aura-bot architecture is a modular one and has been designed in order to fulfil an essential requisite of configurability and extensibility for Aura deployment if a customized Aura behavior is needed.
This section is mainly intended to developers interested in the installation and configuration of aura-bot.
Create a bot service
⚠️ This task must be carried out only once by an aura-bot developer
-
Follow the guidelines in Microsoft documentation: Create a bot with Azure Bot Service.
-
Save the value of the following variables from the created bot:
"AURA_MICROSOFT_APP_ID":"YOUR ID",
"AURA_MICROSOFT_APP_PASSWORD":"YOURPASS",
Install Aura Bot
Developers can install aura-bot following two different approaches:
-
Aura minibot
Aura minibot is a tool intended for testing purposes in local environment. It is highly recommended to use Aura minibot to get familiar with aura-bot when developing simple use cases. Learn how to install and work with Aura minibot. -
Full Aura Bot
If you want to install locally a fully functional working instance of aura-bot, go to the full Aura Bot section.
Configure Aura Bot
How to start a basic Aura Bot configuration
We recommend to use Kubernetes for the management of the environment variables required for the bot configuration.
Developers can use the process explained below:
Access with kubeconfig
The jq JSON processor can be used to decode all the private variables (developers should install it and get sure it is added to the OS PATH).
-
Set the KUBECONFIG file (provided by DevOps) through the following command:
export KUBECONFIG=<name of the file provided> -
To check all the available environments, use:
kubectl get ns -
Download all the environment variables and join them in a unique file:
( kubectl -n <env name> cm aura-bot -o json | jq.exe -r ".data|to_entries|map(\"\(.key)=\(.value|tostring)\")|.[]" ; kubectl -n <env name> get secret aura-bot -o json | jq.exe -r ".data|to_entries|map(\"\(.key)=\(.value|tostring|@base64d)\")|.[]" ) > <env name>
Where: <env name> is the name space selected on step 2 (kubectl get ns)
ℹ️ Base 64 decodification requires a jq version from 1.6 onwards
-
Copy this file into the project folder (wherever you are storing
.envfiles). -
Enable forwarding from your local address (localhost) to the kubernetes aura-configuration-api deployment.
kubectl --namespace <env name> port-forward deployments/aura-configuration-api 8999:8999
-
Point
AURA_CHANNELS_CONFIGURATION_API_ENDPOINTto previously forwarded service:http://localhost:8999/aura-services/v2/configuration. -
Highly Recommended: if using Visual Studio Code, you could add these objects to your
launch.jsonfile to be able to run the make-up process in debug mode and change certain variables without directly modifying aura-configuration-api channels information and/or (according toAURA_MAKEUP_FILES_DESTINATIONvariable) thebot-response.jsonfile.
[
{
"type": "node",
"request": "launch",
"name": "name of the script",
"program": "${workspaceFolder}/lib/index.js",
"console": "integratedTerminal",
"outFiles": [
"${workspaceFolder}/lib/**/*.js"
],
"env": {
"CONFIG_FILE": "your .env file path",
"AURA_MICROSOFT_APP_ID": "YOUR ID",
"AURA_MICROSOFT_APP_PASSWORD": "YOURPASS",
"AURA_LOGGING_FORMAT": "dev",
"AURA_LOGGING_LEVEL": "DEBUG"
}
},
{
"type": "node",
"request": "launch",
"name": "makeup",
"program": "${workspaceFolder}/lib/make/makeup-cli.js",
"outFiles": [
"${workspaceFolder}/lib/**/*.js"
],
"env": {
"CONFIG_FILE": "your .env file path",
"AURA_LOGGING_FORMAT": "dev",
"AURA_LOGGING_LEVEL": "DEBUG",
"AURA_MAKEUP_MODE": "local"
},
"console": "integratedTerminal"
}
]
In case the adjustment of the value for certain variables is required, modify directly the file launch.json, as explained before.
Example of environment configuration
As an example, the main configuration file (.env.PRO) can be defined as follows:
AURA_DEFAULT_LOCALE=es-ar
AURA_SERVER_PORT=8080
All environment variables with their description can be found at the following link Aura Bot Platform environment variables
In case aura-bot is started using the following command:
CONFIG_FILE=./env/.env.PRO AURA_DEFAULT_LOCALE=es-es npm start
Then, the aura-bot instance would use the following configuration variables and values:
AURA_DEFAULT_LOCALEwould take the valuees-essince it is set as an environment variable and has the highest priority.AURA_SERVER_PORTwould take the value8080since it is set in the main configuration file, and not as an environment variable.AURA_LOGGING_LEVELwould take the valueINFOsince it is set in the configuration schema definition and nowhere else (default value).