SlideShare a Scribd company logo
1 of 17
Simple Odoo ERP auto scaling on AWS
The Solution Architecture
Summary
Odoo is an open sourcebusiness solution softwarethat 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 purposeof this
paper is to demonstratethat it is possibleto havean Odoo deployment that costs
less than $100/month for 50 concurrentusers. Moreover, this systemwill 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 becausemy 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.
What is the use of Odoo?
Odoo (formerly known as OpenERP and beforethat, TinyERP) is a suite of
enterprise management applications. Targeting companies of all sizes, the
application suite includes billing, accounting, manufacturing, purchasing,
warehousemanagement, and project management. (ref: https://en.wikipedia.org
/wiki/Odoo ).
We are going to use the Odoo version 10 community edition for this demo.
Audience for this document
This is documentis meant for:
- Students
- Small businesses.
- Solution Architect
- Odoo implementers
About the architecture principle use in this document
This document is meant to be simplistic, for this reason we decided to only show
few architecturalviewpoints. And we also skip some steps that are out of the
scoop of this document. Especially the VPCand the general networking
configuration that arenecessary beforeyou can deploy such system.
This document also skipped the provisioning of the RDS systembecausethere are
plenty of literature available for the Postgres SQL deployment on AWS.
Solution Architecture design pattern: Auto Scaling viewpoint
We design a solution architecture to be simple and readable. And to achieve that,
we show a solution architecture design pattern into several viewports. The
diagrambelow shows the Auto scaling viewpoint diagram. This viewpointneither
requires us to show the virtual privatecloud network viewpoint diagramnor the
security viewpoint diagram.
A good solution architecture design pattern should be simple and concise in its
scope. This is whatwe tried to do here by only showing the Auto Scaling
viewpoint.
What makes this system highly scalable, fault tolerant and cost-
efficient?
This systemis highly scalable because weare using the AWS auto scaling
capabilities to allow this systemto scale out (increasethe number of instances
(nodes)) or to scale in (remove the number of nodes) very rapidly.
The systemis fault tolerant becausethe auto scaling configuration comes with
health check features that allow your Odoo infrastructureto be resilient.
Itis cost-efficient becauseprovisioning your systemwith “t2.micro” instances is
very cheap and moreover they scale gracefully.
Deployment workflow
For the scopeof 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 moreabout this here https://aws.amazon.com/iam/
- AWS VPC: read more here https://aws.amazon.com/vpc/
AWS
• Create AWS
account
• Setting up
billing
IAM
• create user
and roles
• set up AWS S3
and AWS EC2
policies
VPC
• set up VPC
• set up route
and internet
gateway
• set up subnets
into at least 2
availabity zone
Postgres RDS
• Install Postgres
RDS on
Multiple AZ
• Create the
Odoo user
Odoo AMI
• Install Odoo
• Configure
Odoo
• Install AWS CLI
• Remove
Postgres SQL
• Install Ngnix
• Configure
Odoo port
rewrite on
Nginx
Auto Scaling
• Create an auto
scaling
configuration
• Create an auto
scaling group
ELB
• set up Elastics
Load balancing
service
Route 53
• Register a
domain
• Link the ELB to
the Route 53
domain
- 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 whatis not available out there.
Create an Odoo AMI
What is an AMI? According to Wikipedia, “An AmazonMachine Image (AMI) is a
special type of virtual appliance that is used to create a virtualmachine within
the Amazon Elastic Compute Cloud ("EC2").” (ref:
https://en.wikipedia.org/wiki/Amazon_Machine_Image).
InstallAWS Command Line interface
apt install awscli -y
InstallOdoo
wget-O - https://nightly.odoo.com/odoo.key| apt-key add -
echo "deb https://nightly.odoo.com/10.0/nightly/deb/./" >>
/etc/apt/sources.list.d/odoo.list
apt-getup1date && apt-getinstall odoo -y
service Odoo stop
ConfigureOdoo
You can usethe odoo configuration file below , justcopy& paste the commands
below but replace db_host with the Postgres SQL RDS endopoint :
[options]
; This is the password thatallows database operations:
; admin_passwd = admin
db_host= your.aws.rds.endpoint.url
; db_port: the database portis 5432
db_port= 5432
db_user = odoo
db_password =$your.odoo.rds.user.password$
addons_path =/usr/lib/python2.7/dist-packages/odoo/addons
Remove Postgres SQL
Now that we have configured Odoo, wewill removethe Postgres sqldatabase
that comes with the Odoo nightly package.
apt-getautoremove postgresql -y
service postgresqlstop
apt-getupdate -y
InstallNginx
What is Nginx? NGINX is an open sourcesoftwarefor web serving, reverse
proxying, caching, load balancing, media streaming, and more. Itstarted out as a
web server designed for maximum performanceand stability. In addition to its
HTTP server capabilities, NGINX can also function as a proxy server for email
(IMAP, POP3, and SMTP) and a reverseproxy and load balancer for HTTP, TCP,
and UDP servers. (Ref: https://www.nginx.com/resources/glossary/nginx/ )
To install Nginx, you can usethe following script:
apt-getinstall nginx -y
ConfigureOdoo port rewrite with Nginx
When you install Odoo, it runs on port8069 by default. That can be a little bit
annoying especially because few people are awarethat you can add a port
number after you type a weblink. Moreover, it is more convenient.
Let’s configureOdoo port rewrite. To do this, weshould go to the sites-available
using the following path and command:
But before this let’s stop Nginx
service nginx stop
and now let’s go to the “sites-available” directory
cd /etc/nginx/sites-available/
Here, wewill create a new file called Odoo and later we’ll link this file to the site-
enabled directory using the commands below
Create the Odoo file
sudo nano odoo
now copy and paste the code below. You don’t need to change anything because
Nginx is really looking at the original portthat is port8069 and the redirect port
or listening port that is port 80
server {
listen 80;
server_name example.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8069;
}
}
Then hit the following command to savethe file and return to the CLI or
command line interface.
Ctrl + o and enter then Ctrl + x
ln -s /etc/nginx/sites-available/odoo /etc/nginx/sites-enabled/odoo
The “sites-available” directory contains a file called “default”. We need to delete
it now.
rm default
rm /etc/nginx/sites-enabled/default
After this, wewill update our Ubuntu server using our apt-get update command
apt-getupdate -y
We can now start Odoo and Nginx
service odoo start
service nginx start
This marks the end of the initial setup.
Odoo Initial deployment
In the previous section, we have setup the Odoo server. In this section, we will do
the initial deployment of the Odoo application. We will access the Odoo
application through the browser.
Let’s go back to the consoleand copy the DNS address of our ec2 instance and
then paste it into our web browser. If everything goes well, you will see the
screen below.
At this stage justenter the name of the firstdatabase. For this demo, we will use
the name “demo” and deploy Odoo with the demo data.
If everything goes well, you will see the screen below:
Create an AMI images
With the steps taken above, we can now create our Odoo AMI. This machine
image will allow us to create new Odoo instances.
To create a machine, go to the EC2 dashboard > Select your newly created Odoo
instance .
Then go to Action >Image>Create Image as shown below
We will usethe 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 useAuto Scaling to help ensurethat 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 performanceand 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>> Autoscaling >> launch configuration
Click on the “Create AutoScaling group” button
Next, click on the “create launchconfiguration” button to create a launch
configuration group. In the next screen, select the tab called “My AMIs”.
Here, wewill select the Odoo AMI that we have previously taken the snapshotof.
On
At the instance type selection step, we will select an instancetype t2.micro
because our main goal is to save costand 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 IAMrole 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 port80, the. clicked
on the “Create launchconfiguration” button.
The final step is to create an Auto Scaling group and configurethe auto scaling
policies. There are other steps, in this section, such as configurethe notification
and then configurethe tags before we can review everything. But wewill 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 havedecided to
increase the number of instance by 1 one whenever the average CPUusage
reaches 60% and decreases by 1 when that averageis below 60%of theCPU
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.
This is the mark the end of the auto scaling configuration
Thank you
Julien LECADOU
lecadou@gmail.com

More Related Content

What's hot

What's hot (20)

Common Performance Pitfalls in Odoo apps
Common Performance Pitfalls in Odoo appsCommon Performance Pitfalls in Odoo apps
Common Performance Pitfalls in Odoo apps
 
Odoo 3D Product View with Google Model-Viewer
Odoo 3D Product View with Google Model-ViewerOdoo 3D Product View with Google Model-Viewer
Odoo 3D Product View with Google Model-Viewer
 
Odoo's Test Framework - Learn Best Practices
Odoo's Test Framework - Learn Best PracticesOdoo's Test Framework - Learn Best Practices
Odoo's Test Framework - Learn Best Practices
 
OpenERP Performance Benchmark
OpenERP Performance BenchmarkOpenERP Performance Benchmark
OpenERP Performance Benchmark
 
QWeb Report in odoo
QWeb Report in odooQWeb Report in odoo
QWeb Report in odoo
 
[WSO2 API Manager Community Call] Mastering JWTs with WSO2 API Manager
[WSO2 API Manager Community Call] Mastering JWTs with WSO2 API Manager[WSO2 API Manager Community Call] Mastering JWTs with WSO2 API Manager
[WSO2 API Manager Community Call] Mastering JWTs with WSO2 API Manager
 
An in Depth Journey into Odoo's ORM
An in Depth Journey into Odoo's ORMAn in Depth Journey into Odoo's ORM
An in Depth Journey into Odoo's ORM
 
How to Define Many2many Field in Odoo 15
How to Define Many2many Field in Odoo 15How to Define Many2many Field in Odoo 15
How to Define Many2many Field in Odoo 15
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
 
Impact of the New ORM on Your Modules
Impact of the New ORM on Your ModulesImpact of the New ORM on Your Modules
Impact of the New ORM on Your Modules
 
Prometheus Overview
Prometheus OverviewPrometheus Overview
Prometheus Overview
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
Ansible
AnsibleAnsible
Ansible
 
Odoo - Create themes for website
Odoo - Create themes for websiteOdoo - Create themes for website
Odoo - Create themes for website
 
Odoo erp implementation methodology
Odoo erp implementation methodologyOdoo erp implementation methodology
Odoo erp implementation methodology
 
IT Infrastructure Automation with Ansible
IT Infrastructure Automation with AnsibleIT Infrastructure Automation with Ansible
IT Infrastructure Automation with Ansible
 
Getting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and GrafanaGetting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and Grafana
 
Cloud Monitoring tool Grafana
Cloud Monitoring  tool Grafana Cloud Monitoring  tool Grafana
Cloud Monitoring tool Grafana
 
Cloud Monitoring with Prometheus
Cloud Monitoring with PrometheusCloud Monitoring with Prometheus
Cloud Monitoring with Prometheus
 
Odoo for engineering and contruction industry
Odoo for engineering and contruction industryOdoo for engineering and contruction industry
Odoo for engineering and contruction industry
 

Similar to Simple Odoo ERP auto scaling on AWS

AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...
AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...
AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...
Simplilearn
 

Similar to Simple Odoo ERP auto scaling on AWS (20)

Mateusz Zając - Continuous Integration i jej skalowalność w oparciu o TeamCit...
Mateusz Zając - Continuous Integration i jej skalowalność w oparciu o TeamCit...Mateusz Zając - Continuous Integration i jej skalowalność w oparciu o TeamCit...
Mateusz Zając - Continuous Integration i jej skalowalność w oparciu o TeamCit...
 
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...
 
Scaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloudScaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloud
 
AWS CodeDeploy
AWS CodeDeploy AWS CodeDeploy
AWS CodeDeploy
 
Monitoring on Amazon AWS Cloud
Monitoring on Amazon AWS Cloud Monitoring on Amazon AWS Cloud
Monitoring on Amazon AWS Cloud
 
Integrate AWS CodeDeploy With Git And Deploy A Revision
Integrate AWS CodeDeploy With Git And Deploy A RevisionIntegrate AWS CodeDeploy With Git And Deploy A Revision
Integrate AWS CodeDeploy With Git And Deploy A Revision
 
Cloud computing03
Cloud computing03Cloud computing03
Cloud computing03
 
AWS re:Invent re:Cap - 비용 최적화: 모범사례와 아키텍처 설계 기초편 - 이종남
AWS re:Invent re:Cap - 비용 최적화: 모범사례와 아키텍처 설계 기초편 - 이종남AWS re:Invent re:Cap - 비용 최적화: 모범사례와 아키텍처 설계 기초편 - 이종남
AWS re:Invent re:Cap - 비용 최적화: 모범사례와 아키텍처 설계 기초편 - 이종남
 
AWS DevOps: Introduction to DevOps on AWS
  AWS DevOps: Introduction to DevOps on AWS  AWS DevOps: Introduction to DevOps on AWS
AWS DevOps: Introduction to DevOps on AWS
 
AutoScaling and Drupal
AutoScaling and DrupalAutoScaling and Drupal
AutoScaling and Drupal
 
A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)
 
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
 
AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...
AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...
AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...
 
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
AWS Sydney Summit 2013 - Continuous Deployment Practices, with Production, Te...
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
 
AWS CodeDeploy - basic intro
AWS CodeDeploy - basic introAWS CodeDeploy - basic intro
AWS CodeDeploy - basic intro
 
Richard Cole of Amazon Gives Lightning Tallk at BigDataCamp
Richard Cole of Amazon Gives Lightning Tallk at BigDataCampRichard Cole of Amazon Gives Lightning Tallk at BigDataCamp
Richard Cole of Amazon Gives Lightning Tallk at BigDataCamp
 
DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web Services
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web Services
 

More from Julien Lecadou,MSc.

Production Scheduling Using Microsoft Dynamics AX
Production Scheduling Using Microsoft Dynamics AXProduction Scheduling Using Microsoft Dynamics AX
Production Scheduling Using Microsoft Dynamics AX
Julien Lecadou,MSc.
 

More from Julien Lecadou,MSc. (16)

Microsoft Windows Shared Storage on AWS
Microsoft Windows  Shared Storage on AWSMicrosoft Windows  Shared Storage on AWS
Microsoft Windows Shared Storage on AWS
 
How to set up a Windows Domain on AWS
How to set up a Windows Domain on AWS How to set up a Windows Domain on AWS
How to set up a Windows Domain on AWS
 
Microsoft Dynamics AX 2009 WMS on handheld device
Microsoft Dynamics AX 2009 WMS on handheld deviceMicrosoft Dynamics AX 2009 WMS on handheld device
Microsoft Dynamics AX 2009 WMS on handheld device
 
Production Scheduling Using Microsoft Dynamics AX
Production Scheduling Using Microsoft Dynamics AXProduction Scheduling Using Microsoft Dynamics AX
Production Scheduling Using Microsoft Dynamics AX
 
Dynamics AX Fast Sales Quotation
Dynamics AX Fast Sales QuotationDynamics AX Fast Sales Quotation
Dynamics AX Fast Sales Quotation
 
Microsoft Dynamics AX 2009 CRM training
Microsoft Dynamics AX 2009 CRM trainingMicrosoft Dynamics AX 2009 CRM training
Microsoft Dynamics AX 2009 CRM training
 
Customizing job shop scheduling using microsoft dynamics ax part2 3
Customizing job shop scheduling using microsoft dynamics ax part2 3Customizing job shop scheduling using microsoft dynamics ax part2 3
Customizing job shop scheduling using microsoft dynamics ax part2 3
 
Prodction Scheduling series Best Machine Selection BPM
Prodction Scheduling series  Best Machine Selection BPMProdction Scheduling series  Best Machine Selection BPM
Prodction Scheduling series Best Machine Selection BPM
 
Production Scheduling series ATP BPM
Production Scheduling series ATP  BPM Production Scheduling series ATP  BPM
Production Scheduling series ATP BPM
 
Production Scheduling series Tools scheduling
Production Scheduling series  Tools schedulingProduction Scheduling series  Tools scheduling
Production Scheduling series Tools scheduling
 
Production Sheduling series capacity management 's BPM
Production Sheduling series  capacity management 's BPMProduction Sheduling series  capacity management 's BPM
Production Sheduling series capacity management 's BPM
 
Dynamics AX 2009 CRM Implementation : The fit gap analysis
Dynamics AX 2009 CRM Implementation : The fit gap analysis Dynamics AX 2009 CRM Implementation : The fit gap analysis
Dynamics AX 2009 CRM Implementation : The fit gap analysis
 
Warehouse Management Activities "As Is" process map
Warehouse Management Activities "As Is" process mapWarehouse Management Activities "As Is" process map
Warehouse Management Activities "As Is" process map
 
Inventory counting using Dynamics AX
Inventory counting using Dynamics AXInventory counting using Dynamics AX
Inventory counting using Dynamics AX
 
WMS Update: Create Pallet Id in item Transaction Journal
WMS Update: Create Pallet Id in item Transaction Journal WMS Update: Create Pallet Id in item Transaction Journal
WMS Update: Create Pallet Id in item Transaction Journal
 
New reservation and picking process
New reservation and picking processNew reservation and picking process
New reservation and picking process
 

Recently uploaded

The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
daisycvs
 
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
allensay1
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
ZurliaSoop
 
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in PakistanChallenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
vineshkumarsajnani12
 

Recently uploaded (20)

Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
 
Falcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business Growth
 
Bangalore Call Girl Just Call♥️ 8084732287 ♥️Top Class Call Girl Service Avai...
Bangalore Call Girl Just Call♥️ 8084732287 ♥️Top Class Call Girl Service Avai...Bangalore Call Girl Just Call♥️ 8084732287 ♥️Top Class Call Girl Service Avai...
Bangalore Call Girl Just Call♥️ 8084732287 ♥️Top Class Call Girl Service Avai...
 
Cannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 UpdatedCannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 Updated
 
KOTA 💋 Call Girl 9827461493 Call Girls in Escort service book now
KOTA 💋 Call Girl 9827461493 Call Girls in  Escort service book nowKOTA 💋 Call Girl 9827461493 Call Girls in  Escort service book now
KOTA 💋 Call Girl 9827461493 Call Girls in Escort service book now
 
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
 
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGParadip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentation
 
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
 
Buy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail AccountsBuy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail Accounts
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
 
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
 
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in PakistanChallenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
 
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
 
Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investors
 
Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024
 
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
 
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service AvailableBerhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
 
PHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation FinalPHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation Final
 
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAIGetting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
 

Simple Odoo ERP auto scaling on AWS

  • 1. Simple Odoo ERP auto scaling on AWS The Solution Architecture Summary Odoo is an open sourcebusiness solution softwarethat 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 purposeof this paper is to demonstratethat it is possibleto havean Odoo deployment that costs less than $100/month for 50 concurrentusers. Moreover, this systemwill 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 becausemy 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. What is the use of Odoo? Odoo (formerly known as OpenERP and beforethat, TinyERP) is a suite of enterprise management applications. Targeting companies of all sizes, the application suite includes billing, accounting, manufacturing, purchasing, warehousemanagement, and project management. (ref: https://en.wikipedia.org /wiki/Odoo ). We are going to use the Odoo version 10 community edition for this demo. Audience for this document This is documentis meant for: - Students - Small businesses. - Solution Architect - Odoo implementers
  • 2. About the architecture principle use in this document This document is meant to be simplistic, for this reason we decided to only show few architecturalviewpoints. And we also skip some steps that are out of the scoop of this document. Especially the VPCand the general networking configuration that arenecessary beforeyou can deploy such system. This document also skipped the provisioning of the RDS systembecausethere are plenty of literature available for the Postgres SQL deployment on AWS. Solution Architecture design pattern: Auto Scaling viewpoint We design a solution architecture to be simple and readable. And to achieve that, we show a solution architecture design pattern into several viewports. The diagrambelow shows the Auto scaling viewpoint diagram. This viewpointneither requires us to show the virtual privatecloud network viewpoint diagramnor the security viewpoint diagram. A good solution architecture design pattern should be simple and concise in its scope. This is whatwe tried to do here by only showing the Auto Scaling viewpoint.
  • 3. What makes this system highly scalable, fault tolerant and cost- efficient? This systemis highly scalable because weare using the AWS auto scaling capabilities to allow this systemto scale out (increasethe number of instances (nodes)) or to scale in (remove the number of nodes) very rapidly. The systemis fault tolerant becausethe auto scaling configuration comes with health check features that allow your Odoo infrastructureto be resilient. Itis cost-efficient becauseprovisioning your systemwith “t2.micro” instances is very cheap and moreover they scale gracefully. Deployment workflow For the scopeof 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 moreabout this here https://aws.amazon.com/iam/ - AWS VPC: read more here https://aws.amazon.com/vpc/ AWS • Create AWS account • Setting up billing IAM • create user and roles • set up AWS S3 and AWS EC2 policies VPC • set up VPC • set up route and internet gateway • set up subnets into at least 2 availabity zone Postgres RDS • Install Postgres RDS on Multiple AZ • Create the Odoo user Odoo AMI • Install Odoo • Configure Odoo • Install AWS CLI • Remove Postgres SQL • Install Ngnix • Configure Odoo port rewrite on Nginx Auto Scaling • Create an auto scaling configuration • Create an auto scaling group ELB • set up Elastics Load balancing service Route 53 • Register a domain • Link the ELB to the Route 53 domain
  • 4. - 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 whatis not available out there. Create an Odoo AMI What is an AMI? According to Wikipedia, “An AmazonMachine Image (AMI) is a special type of virtual appliance that is used to create a virtualmachine within the Amazon Elastic Compute Cloud ("EC2").” (ref: https://en.wikipedia.org/wiki/Amazon_Machine_Image). InstallAWS Command Line interface apt install awscli -y InstallOdoo wget-O - https://nightly.odoo.com/odoo.key| apt-key add - echo "deb https://nightly.odoo.com/10.0/nightly/deb/./" >> /etc/apt/sources.list.d/odoo.list apt-getup1date && apt-getinstall odoo -y service Odoo stop ConfigureOdoo You can usethe odoo configuration file below , justcopy& paste the commands below but replace db_host with the Postgres SQL RDS endopoint : [options] ; This is the password thatallows database operations: ; admin_passwd = admin db_host= your.aws.rds.endpoint.url ; db_port: the database portis 5432 db_port= 5432 db_user = odoo
  • 5. db_password =$your.odoo.rds.user.password$ addons_path =/usr/lib/python2.7/dist-packages/odoo/addons Remove Postgres SQL Now that we have configured Odoo, wewill removethe Postgres sqldatabase that comes with the Odoo nightly package. apt-getautoremove postgresql -y service postgresqlstop apt-getupdate -y InstallNginx What is Nginx? NGINX is an open sourcesoftwarefor web serving, reverse proxying, caching, load balancing, media streaming, and more. Itstarted out as a web server designed for maximum performanceand stability. In addition to its HTTP server capabilities, NGINX can also function as a proxy server for email (IMAP, POP3, and SMTP) and a reverseproxy and load balancer for HTTP, TCP, and UDP servers. (Ref: https://www.nginx.com/resources/glossary/nginx/ ) To install Nginx, you can usethe following script: apt-getinstall nginx -y ConfigureOdoo port rewrite with Nginx When you install Odoo, it runs on port8069 by default. That can be a little bit annoying especially because few people are awarethat you can add a port number after you type a weblink. Moreover, it is more convenient. Let’s configureOdoo port rewrite. To do this, weshould go to the sites-available using the following path and command: But before this let’s stop Nginx service nginx stop and now let’s go to the “sites-available” directory cd /etc/nginx/sites-available/
  • 6. Here, wewill create a new file called Odoo and later we’ll link this file to the site- enabled directory using the commands below Create the Odoo file sudo nano odoo now copy and paste the code below. You don’t need to change anything because Nginx is really looking at the original portthat is port8069 and the redirect port or listening port that is port 80 server { listen 80; server_name example.com; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:8069; } } Then hit the following command to savethe file and return to the CLI or command line interface. Ctrl + o and enter then Ctrl + x ln -s /etc/nginx/sites-available/odoo /etc/nginx/sites-enabled/odoo The “sites-available” directory contains a file called “default”. We need to delete it now. rm default rm /etc/nginx/sites-enabled/default After this, wewill update our Ubuntu server using our apt-get update command apt-getupdate -y
  • 7. We can now start Odoo and Nginx service odoo start service nginx start This marks the end of the initial setup. Odoo Initial deployment In the previous section, we have setup the Odoo server. In this section, we will do the initial deployment of the Odoo application. We will access the Odoo application through the browser. Let’s go back to the consoleand copy the DNS address of our ec2 instance and then paste it into our web browser. If everything goes well, you will see the screen below.
  • 8. At this stage justenter the name of the firstdatabase. For this demo, we will use the name “demo” and deploy Odoo with the demo data.
  • 9. If everything goes well, you will see the screen below:
  • 10. Create an AMI images With the steps taken above, we can now create our Odoo AMI. This machine image will allow us to create new Odoo instances. To create a machine, go to the EC2 dashboard > Select your newly created Odoo instance . Then go to Action >Image>Create Image as shown below We will usethe auto scaling group and the newly created AMI to launch a second instance in the other Availability Zone.
  • 11. 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 useAuto Scaling to help ensurethat 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 performanceand 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>> Autoscaling >> launch configuration Click on the “Create AutoScaling group” button Next, click on the “create launchconfiguration” button to create a launch configuration group. In the next screen, select the tab called “My AMIs”.
  • 12. Here, wewill select the Odoo AMI that we have previously taken the snapshotof. On At the instance type selection step, we will select an instancetype t2.micro because our main goal is to save costand take advantage of the highly available and highly scalable AWS infrastructures. Let’s click on the “Next: Configuration details” to continue
  • 13. Now we will name our launch configuration and select an AWS IAMrole 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 port80, the. clicked on the “Create launchconfiguration” button.
  • 14. The final step is to create an Auto Scaling group and configurethe auto scaling policies. There are other steps, in this section, such as configurethe notification and then configurethe tags before we can review everything. But wewill skip these steps as they are not necessary for this simple demo.
  • 15. The Auto scaling policies are instructions given to the Auto Scaling group to launch or kills instances based on certain criteria. Here we havedecided to increase the number of instance by 1 one whenever the average CPUusage reaches 60% and decreases by 1 when that averageis below 60%of theCPU usage.
  • 16.
  • 17. 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. This is the mark the end of the auto scaling configuration Thank you Julien LECADOU lecadou@gmail.com