Professional Documents
Culture Documents
Summary
Odoo is an open source business solution software that is suitable for SMEs. Small
businesses primarily deploy Odoo on premise. And over the time, this “on
premise” deployment can be a challenge because it does not give them a highly
available, cost-efficient, fault-tolerant and scalable system. The purpose of this
paper is to demonstrate that it is possible to have an Odoo deployment that costs
less than $100/month for 50 concurrent users. Moreover, this system will be
always available and fault-tolerant and very much scalable. All this, because of its
cloud architecture.
Note: This document is a working in progress because my intention is to make
Odoo as “stateless” as possible.
Objectives:
Being able to build a highly available and cost-efficient, fault tolerant and highly
scalable system.
Deployment workflow
AWS IAM VPC Pos tgres RDS Odoo AMI Auto Sca ling ELB Route 53
• Create AWS • create user • set up VPC • Install Postgres • Install Odoo • Create an auto • set up Elastics • Register a
account and roles • set up route RDS on • Configure scaling Load balancing domain
• Setting up • set up AWS S3 and internet Multiple AZ Odoo configuration service • Link the ELB to
billing and AWS EC2 gateway • Create the • Install AWS CLI • Create an auto the Route 53
policies • set up subnets Odoo user • Remove scaling group domain
into at least 2 Postgres SQL
availabity zone • Install Ngnix
• Configure
Odoo port
rewrite on
Nginx
For the scope of this document we will skip the following steps and link to
documentations that can allow the users to successfully deploy or implement
those steps:
- AWS: to create an AWS account go to https://aws.amazon.com to create
an AWS account
- AWS IAM: read more about this here https://aws.amazon.com/iam/
- AWS VPC: read more here https://aws.amazon.com/vpc/
- AWS RDS: read more here https://aws.amazon.com/rds/
- AWS elastic load balancing https://aws.amazon.com/elasticloadbalancing/
- AWS Route 53 https://aws.amazon.com/route53/
In this document, we will only focus on what is not available out there.
We will use the auto scaling group and the newly created AMI to launch a second
instance in the other Availability Zone.
Auto Scaling configuration
Per Amazon “Auto Scaling helps you maintain application availability and allows
you to scale your Amazon EC2 capacity up or down automatically according to
conditions you define. You can use Auto Scaling to help ensure that you are
running your desired number of Amazon EC2 instances. Auto Scaling can also
automatically increase the number of Amazon EC2 instances during demand
spikes to maintain performance and decrease capacity during lulls to reduce
costs. Auto Scaling is well suited both for applications that have stable demand
patterns or that experience hourly, daily, or weekly variability in usage” (ref:
https://aws.amazon.com/autoscaling/ )
Create the auto scaling group
Go to Ec2>> Auto scaling >> launch configuration
Click on the “Create Auto Scaling group” button
At the instance type selection step, we will select an instance type t2.micro
because our main goal is to save cost and take advantage of the highly available
and highly scalable AWS infrastructures. Let’s click on the “Next: Configuration
details” to continue
Now we will name our launch configuration and select an AWS IAM role that have
read right on S3. Continue to the next step and then select your security group.
Select a security group that allows a public internet access on port 80, the. clicked
on the “Create launch configuration” button.
The final step is to create an Auto Scaling group and configure the auto scaling
policies. There are other steps, in this section, such as configure the notification
and then configure the tags before we can review everything. But we will skip
these steps as they are not necessary for this simple demo.
The Auto scaling policies are instructions given to the Auto Scaling group to
launch or kills instances based on certain criteria. Here we have decided to
increase the number of instance by 1 one whenever the average CPU usage
reaches 60% and decreases by 1 when that average is below 60%of the CPU
usage.
If everything goes well, as the auto scaling group is created, you can see the EC2
dashboard that the auto scaling group will a new instance.