rauldpm / ChatbotTFG

This project houses a chatbot built with the Open Source Rasa software.
GNU General Public License v3.0
0 stars 0 forks source link

Add CICD tasks #10

Closed rauldpm closed 1 year ago

rauldpm commented 2 years ago

This issue aims to add continuous integration and continuous delivery tasks, such as the automatic execution of rasa tests, unit tests of the actions in the created PR

This could be done through GitHub Actions or through the use of Jenkins pipelines.

rauldpm commented 1 year ago

Update report

Due to the design of the architecture, the use of Jenkins has been discarded for the time being in favor of Github Actions for simple tasks such as creating trained models, creating images hosted on Dockerhub or performing tests.

Regarding the deployment of instances, a series of scripts have been developed using bash controlled by a cron task according to the number of active connections in the load balancer. If the number of active connections at a given time (periodic check) exceeds a threshold, a script is executed that creates an instance, provisions it and configures what is necessary so that it works together with the rest of the servers and is accessible by users. If the threshold drops, as many instances as necessary are removed adjusting the number of instances to the number of users.

Example (each server can support 10 users simultaneously):

This means that if we have a server and the load balancer detects that there are 21 active connections, 2 instances will be deployed in addition to the current one, supporting up to 30 users.

When we have 4 instances (maximum of 40 users) and the number of active connections drops to 13, 2 instances will be deleted, leaving another 2 available (maximum 20 users)