Rasa X - AWS ECS Fargate Deployment

So I’m about to take my test bot setup on Rasa X and setup the Devops pipeline for it and will be using AWS Cloud Development Kit to deploy the entire stack as well. I don’t really foresee any major issues since I can use RDS for the postgres part but has anyone else done anything like this yet am I way off base on this working?

One issue I have is where the models and stuff are saved locally since in this case I don’t have true storage with the way Fargate works so I might have to stick to EC2 ECS unless someone can shed any light on options to store this data somewhere else and bring it in.

It seems like it should be pretty straight forward with a ALB just forwarding to the internal port exposed on the container.

Can you set up EFS with Fargate?

No EFS is only supported right now on AWS EC2 I know its coming for fargate soon though. I was figuring I would still have to have EFS since even if I had my models and stuff pulling from AWS it still trains and loads all that locally right?

Was just trying to outline my Pipeline stuff for jenkins and how this process might work before I deploy it.

I already have AWS CDK python code to deploy all of this via code as well so I can share it all when its all ready, I just wanted to confirm before I build it out I’ll have to use ECS EC2 with EFS so I can have it load balanced out and scaled it up or down.

I’m going to use Aurora Postgres for the tracker store.

1 Like

Yeah Im not the AWS expert, but I think if you want persistent and scalable (i.e. new instances launched in a cluster get the volumes too), EFS is the way to go. Not sure quite how EBS works, but I’ve seen about of horror stories of people losing their data randomly on EBS

Yea EFS is the proper solution if there are requirements for local storage which it sounds like there is atm

Yeah, models are stored on disk so it’s definitely a requirement in that sense

@btotharye I’m in the middle of setting up my Jenkins pipeline for Rasa X and am curious how it has gone for you? I think I’m including files or directories in my git repo that are causing problems when I bring up the Rasa X docker stack.

I don’t really want to run the install script as part of the deploy. I’d prefer to check-in the files to git and manage updating the containers via the docker-compose file but I’m not sure this is going to work based on the errors I’m getting.

Hey Greg I actually just started working for Rasa this week so if you give me some time to settle in I can help out on some of this most likely. I was working on before leaving my last place to come here splitting up all the Rasa X services from the compose into a more structured setup with say ECS Services etc.

If you want to share any issues/errors you are seeing I can try to help in the meantime but I have plans for working on some of this for future customers/community members wanting a easier IaC setup for AWS.

I’m using AWS CDK atm for some testing if you are familiar with it and was hoping to have a turnkey setup for that shortly to build out a basic Rasa setup in a ECS with ALB instead of the typical just ec2 without load balancing.

Curious any feedback you have on this as well.

Thanks

Congratulations, @btotharye. I’m interested in automating the steps to setup the Rasa CE docker compose setup (not an AWS specific solution).

Ok it may be a week or two before I have some time but I’ll work on some stuff for this, I need to do some of it anyways for the AWS ECS stuff I want to do. In the meantime let me know if you make any progress @stephens

I pretty much have my deploy scripting done. I’ve done a post on my blog.

1 Like

Hey @btotharye We have taken a similar route, our application with the bot is on AWS ECS but we still have not migrated rasa-x on AWS ECS.

Could you provide some pointer on how one can go about it?

Hi @btotharye I’ve been asked to investigate deploying RasaX on ECS.

Would you be able to share your docker-compose files and/or any tips for getting it all up there? I’m having a problem getting everything running.

2 Likes

Hey Jonathan… were you able to figure it out?