...
Introduction:
Makes chatbot menu options configurable so it can easy to maintain without a dev engineer. So we can add/edit existing menu options. It has the following advantages:
...
Able to change the text
Able to change the menu options (Add/edit/remove)
Able to create new flows/structure such as introducing new menu options which are not there
Able to change answers to queries
Able to add/edit/remove hyperlinks
Able to analyze the data after changes
Key Design Problems:
How to upload a local file to blob storage.
Versioning and rollback for files
Secure (Only authorized users can access)
Design solutions:
Solution 1:
Using AWS containerJenkins job where we can upload a file while build and deploy of the job.
...
Enable load and execute config from aws AWS container for a chatbot.
Make literals and chart flow configurable.
Keep files in blob storage public accessible.
While doing a build for chatbot/router run the below commands in the docker file
Code Block FROM node:10.19.0 as builder WORKDIR /app COPY . /app ADD http://source.file/config/literals /config/literals.js ADD http://source.file/config/chatflow /config/chatflow.js RUN npm install FROM node:10.19-slim COPY --from=builder /app . EXPOSE 4000 8443 CMD [ "node", "appRest.js" ]
For every build, it will download it from the blob and add it
/router/config/*
files.So now we can change only those required files and do build and deploy
...
Only a tech person can do it over, Jenkins
Solution 2:
...
Create a separate application for accessing and modifying the file
User onboard via API(DB)Store config in Database to fetch and update config. It all using APIs to create and update config using a JSON object as the request body.backend)
Share credentials with user
...
Code Block |
---|
Create
{{host}}/chatbot/config/create
Update
{{host}}/chatbot/config/update |
This will take place in Jenkins job, Any owner can update config.
...