Virtual agent Migration Guide
Last updated
Last updated
This manual is a step-by-step guide to clone, upload, download and migrate a virtual agent between environments.
This document is aimed at users who work with eva in different environments. It is primarily intended for technology professionals with server experience, specialized software, and previous knowledge of JAVA, Maven, Node, NPM, Gcloud SDK.
eva is a cloud-based platform that can be installed on a diverse array of cloud environments. As a cloud-native application, eva allows the same organization to create multiple environments. Sometimes, a virtual agent might need to be cloned, downloaded, uploaded or sent to another environment.
Important: This manual current version is 3.2.4.0. When the placeholder [CURRENT_VERSION] appears, replace it with 3.2.4.0.
eva allows you to clone, download or upload a virtual agent. You can also migrate this virtual agent between environments. To do so, you have first to configure the procedure in Docker.
Open Docker Settings, go to General and check Expose daemon on {URL}
https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fb94e721c-2b44-42f6-b27b-945191facff1%2FUntitled.png?table=block&id=2d23f01e-fdb9-4f43-a2dc-750a98a54110&width=2560&cache=v2
Go to Docker engine
https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fe6c0724f-78f7-4b92-b781-4dfca429e263%2FUntitled.png?table=block&id=362e1d29-78ac-492d-aaf1-54a024f52ad2&width=2560&cache=v2
Paste nexus.eva.bot:8083 at the "insecure-registries" array to download the Docker images.
Create a file named env.list. You will use this file to configure the databases involved in the migration and cloning processes. In this file, create the variables of your desired environments databases.
The variables in the table below are the ones from the external environment where the virtual agent will be taken from. They are the origin of the data that will be taken to the other environment, here named origin database.
The table below show the variables of the environment that will receive the virtual agent, here named destination database.
Pie de pagina_Mesa de trabajo 1.png
If you are cloning a virtual agent, fill the variables with data from the destination environment.
Example: if you want to clone a virtual agent in the Environment A, fill the following variables with data from the Environment A:
DB_TO_MIGRATOR_HOST=[ENVIRONMENT A IP] DB_TO_MIGRATOR_USERNAME=[ENVIRONMENT A USERNAME] DB_TO_MIGRATOR_PASSWORD=[ENVIRONMENT A PASSWORD] DB_TO_MIGRATOR_DATABASE=[ENVIRONMENT A DATABASE]
If you are migrating a virtual agent between environments, the env.list file that links two environments must have the data from the original ENVIRONMENT A (http://original_ environment) and from the destination ENVIRONMENT B (http://destination_environment).
It would look like that:
DB_MIGRATOR_HOST=[ENVIRONMENT A IP] DB_MIGRATOR_USERNAME=[ENVIRONMENT A USERNAME] DB_MIGRATOR_PASSWORD=[ENVIRONMENT A PASSWORD] DB_MIGRATOR_DATABASE=[ENVIRONMENT A DATABASE]
DB_TO_MIGRATOR_HOST=[ENVIRONMENT B IP] DB_TO_MIGRATOR_USERNAME=[ENVIRONMENT B USERNAME] DB_TO_MIGRATOR_PASSWORD=[ENVIRONMENT B PASSWORD] DB_TO_MIGRATOR_DATABASE=[ENVIRONMENT B DATABASE]
In this variable, you have to insert the origin and destination URL_DM. This is an internal service of the Kubernetes cluster where eva is deployed. To get it, you have to follow these steps:
Link the kubectl command to the cluster where eva is installed. In a cloud solution, you will have to execute your cloud-specific commands and have your cloud-specific
Pie de pagina_Mesa de trabajo 1.png
permissions. First, do it for the origin database. The example below is how you connect to the Google Cloud Platform.
$ gcloud container clusters get-credentials
--zone --project
- Execute the port fowarding for the eva-dialogmanager service in the cluster using the command below:
$ kubectl port-forward --namespace eva $(kubectl get pod --namespace eva --selector="app=eva- dialogmanager" --output jsonpath='{.items[0].metadata.name}') 8090:8080
Insert the URL http://localhost:8090 in the file env.list next to the URL_DM_MIGRATOR variable.
Repeat the steps above in the destination environment:
Connect the kubectl command to the destination cluster.
Execute the port forwarding
$ kubectl port-forward --namespace eva $(kubectl get pod --namespace eva --selector="app=eva- dialogmanager" --output jsonpath='{.items[0].metadata.name}') 8091:8080
Insert the URL http://localhost:8091 in the file env.list next to the URL_DM_MIGRATOR variable.
Contact eva support to secure access for the environments and databases described by the variables URL_DM_MIGRATOR= http://host.docker.internal:8090 (origin environment) and URL_DM_TO_MIGRATOR= http://host.docker.internal:8091 (destination environment).
Pie de pagina_Mesa de trabajo 1.png
The process of port forwarding to get the URLs for the URL_DM variables described below is exclusive to the Google Cloud Platform. Other cloud providers might have different processes. Always check the documentation.
First, select the origin project.
After you selected the origin project, click on the menu and select Kubernetes engine -> Workloads.
Then, select eva-dialog-manager -> eva-dialog-manager v1
Click on the desired environment. After that, select “exposing services”.
Pie de pagina_Mesa de trabajo 1.png
Then, click on “Port Forwarding”.
Then, copy the command to paste on the terminal and execute the port forwarding.
After that, follow the same steps on the destination environment.
Pie de pagina_Mesa de trabajo 1.png
Open the terminal of your preference.
Login in NEXUS with the following command:
docker login nexus.eva.bot:8083
*******************************
User: everisva
Password: everis4life
Download the migration application from NEXUS using the command below:
docker pull nexus.eva.bot:8083/eva-cockpit-v2-bot- cloner:[CURRENT_VERSION]
Look for the Migrator IMAGE ID:
docker images
Copy the IMAGE ID and use the command:
docker run --env-file env.list --name migrator -p 3026:3000 COPIED_IMAGE_ID
docker build -t migrator . docker images
Look for the migrator IMAGE ID
docker run --env-file env.list --name [ADD_YOUR_MIGRATOR]** -p 3000:3000 [ADD_YOUR_MIGRATOR_IMAGE_ID]
Pie de pagina_Mesa de trabajo 1.png
To clone a virtual agent, click on clone and then Add bot:
A modal will open so you can select the virtual agent to be cloned:
Pie de pagina_Mesa de trabajo 1.png
Those virtual agents don’t leave their origin environment. If they belong to the ENVIRONMENT A, they will stay in the ENVIRONMENT A.
After you have selected a virtual agent to be cloned, click on “Select”.
The cloned virtual agent will appear on the right.
Now you can download this virtual agent to your local device or clone it in the same environment.
Pie de pagina_Mesa de trabajo 1.png
To migrate a virtual agent, follow the same steps of the virtual agent cloning. The only difference is that you will see virtual agents of origin environment in the dropdown.
If you are migrating a virtual agent from ENVIRONMENT A to ENVIRONMENT B, the dropdown will show the ENVIRONMENT A virtual agents.
To upload a virtual agent, click on upload. An upload modal will open.
Click on “upload your file here”, select the virtual agent you want to upload and click on continue. If the virtual agent is in the ENVIRONMENT A, it will leave to your local device.
Pie de pagina_Mesa de trabajo 1.png
After you select a file, you can remove it or continue with the virtual agent upload. When the uploading is done, the virtual agent will appear in the chosen environment.
URL_DM_TO_MIGRATOR=809 1
URL_DM_MIGRATOR=8090
URL_DM_TO_MIGRA809 1
Access the migrator through your local host [PORT]. You will find in this screen three options: Clone, Migrate or Upload.