# Best scalable infrastructure to install Open edX on AWS

**URL:** <https://discuss.openedx.org/t/best-scalable-infrastructure-to-install-open-edx-on-aws/444>\
**Category:** Site Operators\
**Created:** [September 5, 2019, 11:50pm UTC](https://discuss.openedx.org/t/best-scalable-infrastructure-to-install-open-edx-on-aws/444 "2019-09-05T23:50:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scarback](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/scarback/32/220_2.png) [@Scarback](https://discuss.openedx.org/u/Scarback)\
**Post date:** [September 5, 2019, 11:50pm UTC](https://discuss.openedx.org/t/best-scalable-infrastructure-to-install-open-edx-on-aws/444/1 "2019-09-05T23:50:42Z")

</div>

Hello everyone!

I was doing some research about open EDX because there’s a cultural organization here in Brazil that wants to establish an open EDX countrywide and we are looking for the best infrastructure for that. This organization already uses AWS as their cloud provider and we want to keep it that way.  
For what I have seen until now, the best way to deploy a scalable Open EDX would be to segragate the databases and having an autoscaling group for each service (xserver, commomcluster, xqueue, certificates, insights and analytics-api).  
But I couldn’t find any step by step for this kind of configuration. Have anyone here made this before?  
I also have some considerations about:  
Using MongoDB - The only way to use mongo on AWS is having it installed on a EC2 instance, but that doesn’t allow me to use an multi-az. Would it be possible to use dynamoDB instead?  
rabbitqn - AWS has SQS, could it be used instead?

If anyone could help me with this… I thank you all a lot!

---

<div class="post-metadata">

**Author:** ![jramnai](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/jramnai/32/87_2.png) [@jramnai](https://discuss.openedx.org/u/jramnai)\
**Post date:** [September 6, 2019, 4:40am UTC](https://discuss.openedx.org/t/best-scalable-infrastructure-to-install-open-edx-on-aws/444/2 "2019-09-06T04:40:28Z")

</div>

you can check this [link](https://openedx.atlassian.net/wiki/spaces/OpenOPS/pages/60228120/Running+Open+EdX+in+Production#RunningOpenEdXinProduction-edX.orgDeployment), it does not have precise steps for deployment but will give an insight of edx deployment.

---

<div class="post-metadata">

**Author:** ![Scarback](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/scarback/32/220_2.png) [@Scarback](https://discuss.openedx.org/u/Scarback)\
**Post date:** [September 6, 2019, 5:09pm UTC](https://discuss.openedx.org/t/best-scalable-infrastructure-to-install-open-edx-on-aws/444/3 "2019-09-06T17:09:15Z")

</div>

Nice, @jramnai!

I can provide the infrastructure, but how do I make those edxapp.yml, forum.yml, commoncluster.yml to install on the EC2?

---

<div class="post-metadata">

**Author:** ![viadanna](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/viadanna/32/276_2.png) [@viadanna](https://discuss.openedx.org/u/viadanna)\
**Post date:** [September 6, 2019, 8:23pm UTC](https://discuss.openedx.org/t/best-scalable-infrastructure-to-install-open-edx-on-aws/444/4 "2019-09-06T20:23:21Z")

</div>

> [@Scarback](#):
>
> I can provide the infrastructure, but how do I make those edxapp.yml, forum.yml, commoncluster.yml to install on the EC2?

That documentation is quite old and points to nonexistent files. Those YAML files are actually the [Ansible playbooks](https://github.com/edx/configuration/tree/open-release/ironwood.2/playbooks) you’ll need to run to deploy each service.

What you need is to run the playbook to deploy the services into a pristine VM and turn that into an image for your autoscaling group.

---

<div class="post-metadata">

**Author:** ![Scarback](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/scarback/32/220_2.png) [@Scarback](https://discuss.openedx.org/u/Scarback)\
**Post date:** [September 6, 2019, 9:25pm UTC](https://discuss.openedx.org/t/best-scalable-infrastructure-to-install-open-edx-on-aws/444/5 "2019-09-06T21:25:45Z")

</div>

Thank you a lot, @viadanna! I’ll try to do it and tell you here if I’ve succeeded!

---

<div class="post-metadata">

**Author:** ![Scarback](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/scarback/32/220_2.png) [@Scarback](https://discuss.openedx.org/u/Scarback)\
**Post date:** [September 12, 2019, 8:36pm UTC](https://discuss.openedx.org/t/best-scalable-infrastructure-to-install-open-edx-on-aws/444/6 "2019-09-12T20:36:36Z")

</div>

@jramnai and @viadanna,

I think it is far from the best way to do it, but now it works! My steps were:

- Install Open EDX in a single instance
- take mysql dump to a RDS and mongodb dump to a ec2
- change the server endpoint in cms.auth.json and lms.auth.json

Now, I wonder how can I take rabbitmq to annother instance? Where do I change the endpoint?  
And where EDX saves files, like coursecards? I could point to an S3 bucket, right?

---

<div class="post-metadata">

**Author:** ![viadanna](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/viadanna/32/276_2.png) [@viadanna](https://discuss.openedx.org/u/viadanna)\
**Post date:** [September 16, 2019, 11:38am UTC](https://discuss.openedx.org/t/best-scalable-infrastructure-to-install-open-edx-on-aws/444/7 "2019-09-16T11:38:38Z")

</div>

> [@Scarback](#):
>
> I think it is far from the best way to do it, but now it works! My steps were:
> 
> - Install Open EDX in a single instance
> - take mysql dump to a RDS and mongodb dump to a ec2
> - change the server endpoint in cms.auth.json and lms.auth.json

You can make sure of Ansible extra variables to deploy Open edX already pointing to separate servers, but if it works it works 🙂

> [@Scarback](#):
>
> Now, I wonder how can I take rabbitmq to annother instance? Where do I change the endpoint?

You can find these settings in `/edx/etc/lms.yml` for the LMS. You’ll also find YAML config files for the other services there. Remember that these are the de-facto configuration files from here on, as the JSON ones have been deprecated and already removed in master. The settings you’ll be looking for are:

```auto
CELERY_BROKER_HOSTNAME: localhost
CELERY_BROKER_PASSWORD: celery
CELERY_BROKER_TRANSPORT: amqp
CELERY_BROKER_USER: celery
CELERY_BROKER_USE_SSL: false
CELERY_BROKER_VHOST: ''

```

> [@Scarback](#):
>
> And where EDX saves files, like coursecards? I could point to an S3 bucket, right?

That’s correct. You’ll find the settings related to this in the same files stated earlier, just grep it for `AWS|S3`.
