Basic question regarding custom connectors/channels and Kubernetes deployment

Hi folks. I am currently the “more Ops than Dev” guy that is helping out an internal group of students building a chat application with rasa/rasa-x. I am supporting with the infrastructure, CI/CD part but I don’t have yet too much understanding of the inner workings of rasa.

We are deploying rasa-x via your helm chart to a managed GKE cluster. This part is working fine. We have a custom action server up and running and helm basically just works. The students also want to use a custom channel and have created a python script (eg custom_channel_rasa.py) for that, which I am told is already working locally when mounted in the rasa-x container. My question is, where does rasa expect this script? It’s not about the configuration in the credentials.yml that seems pretty straight forward. My understanding is, that the python script itself has to be present in the “rasa-x” container of the rasa-x k8s deployment. But this would mean that we would have to build a custom rasa-x image which feels somewhat off. This would have big implications regarding the CI/CD helm workflow and just doesn’t feel right. Can rasa-x deal with custom channels for example present in the action server container? Or in any other container that is available in the namespace? And if so, how or where could you configure the “endpoint” of the custom connector? Maybe its a misunderstanding or I am holding it wrong, I am open for suggestions. Thanks in advance

hey @kago

where does rasa expect this script?

Channels (code with the implementation) are inside the Rasa Open Source, not Rasa X. More specifically, it’s under rasa/core/channels folder. So if you were able to make custom_channel_rasa.py work locally, it’s there :slight_smile:

It’s not about the configuration in the credentials.yml

It’s actually exactly there! All channels have names, and in order to enable a channel, it’s name should be listed in the credentials.yml. By default the webhook for your channel will be listening on the port 5005. All relevant info for the custom channels is here.

the python script itself has to be present in the “rasa-x” container

Since the channels are in Rasa Open Source container, your need to first build a custom docker container with your code inside (using this Dockerfile for example), and then use this container in your k8s deployment for rasa app.

Can rasa-x deal with custom channels for example present in the action server container

Not really, action server is using SDK code, it’s a different repository that has nothing to do with channels.

I hope that helps!

Thank you for your answer. I finally found this post today that pointed me to the right direction:

So instead of building a custom rasa-x image we now build custom worker/production image that contains the channel and according to our devs that worked. Like I said, the configuration via helm were basically correct but the script was in the wrong location/container. It still feels a bit clunky to be honest. But enabling custom channels in Kubernetes without building a custom image (eg via configmap or init containers) is probably something for the helm chart repository. Thanks!

@kago

Yes, exactly. You can also mount the folder with you custom channel in it, but container has to be a “Rasa Open Source” one.