Last active
April 16, 2024 09:36
-
-
Save bjsion/5f40f8e7990890b3b1b6cc0e010da77e to your computer and use it in GitHub Desktop.
Installing Odoo ERP on AWS using RDS and EC2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing Odoo on AWS | |
These are the steps I ran to get Odoo up and running on AWS using the free tiers (for now). | |
## Setup servers | |
### Create DB | |
Create an Postgres DB on Amazon RDS: | |
https://us-east-2.console.aws.amazon.com/rds/home?region=us-east-2#launch-dbinstance:ct=dbinstances: | |
### Create Server | |
Create a EC2 Instance: | |
https://us-east-2.console.aws.amazon.com/ec2/v2/home?region=us-east-2#LaunchInstanceWizard: | |
## Install Odoo | |
Once those are created, ssh into your EC2 instance. | |
### Install Pre-requisites | |
> wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
> tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
> cd wkhtmltox/bin/ | |
> sudo mv wkhtmltopdf /usr/bin/wkhtmltopdf | |
> sudo mv wkhtmltoimage /usr/bin/wkhtmltoimage | |
> sudo chmod a+x /usr/bin/wkhtmltopdf | |
> sudo chmod a+x /usr/bin/wkhtmltoimage | |
> cd | |
> sudo apt-get install libxrender1 | |
> sudo apt-get install libfontconfig1 | |
### Install Odoo Binaries | |
> sudo wget -O - https://nightly.odoo.com/odoo.key | sudo apt-key add - | |
> sudo -s | |
Once in as root | |
> echo "deb http://nightly.odoo.com/11.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list | |
> exit | |
> sudo apt-get update && sudo apt-get install odoo | |
> whereis odoo | |
odoo: /usr/bin/odoo /etc/odoo | |
### Configure server | |
> cd /etc/odoo/ | |
> sudo cp odoo.conf odoo.conf.orig | |
then add the following content: | |
db_host=<rds_db_instance>.rds.amazonaws.com | |
db_port=5432 | |
db_name=odoo | |
db_user=<db_user_name> | |
db_password=<db_user_pw> | |
db_sslmode=prefer | |
email_from=<sender_address> | |
### Start the server | |
#### Service Start | |
> /etc/init.d/odoo stop | |
> /etc/init.d/odoo start | |
#### Manual Start | |
> sudo -H -u odoo odoo -c /etc/odoo/odoo.conf -u all | |
After so much of troubleshooting, I got the server start, but it stops with the following error.
Honestly I have not looked at this for a few years and have stopped using Odoo. A lot has probably changed. I posted this hoping it would be of help to the broader community, but I'm not the maintainer of Odoo. Have you tried contacting the developers?
Hey @bjsion, what are using now?
Hi @gerardboufaysal I stopped using it altogether as the project shut. For other products I have developed my own applications rather than something off the shelf.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After so much of troubleshooting, I got the server start, but it stops with the following error.
`Error when compiling AST
ValueError: Name node can't be used with 'None' constant
Template: 162
Path: /templates/t/t/form/div[4]/button
Node: Log in
2021-05-06 23:13:06,171 19729 INFO postgres werkzeug: 101.100.130.111 - - [06/May/2021 23:13:06] "GET /web/login HTTP/1.1" 500 -
2021-05-06 23:13:06,179 19729 ERROR postgres werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 84, in lookup
r = d[key]
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 68, in wrapper
return func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/tools/lru.py", line 44, in getitem
a = self.d[obj].me
KeyError: ('ir.qweb', <function IrQWeb.compile at 0x7f077d944550>, 162, ('en_US', None, None, None, None, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 330, in compile
unsafe_eval(compile(astmod, '', 'exec'), ns)
ValueError: Name node can't be used with 'None' constant
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 306, in run_wsgi
execute(self.server.app)
File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 294, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 348, in app
return self.app(e, s)
File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 180, in application
return application_unproxied(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 154, in application_unproxied
result = handler(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1321, in call
return self.dispatch(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1295, in call
return self.app(environ, start_wrapped)
File "/usr/lib/python3/dist-packages/werkzeug/middleware/shared_data.py", line 220, in call
return self.app(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1493, in dispatch
result = ir_http._dispatch()
File "/usr/lib/python3/dist-packages/odoo/addons/web_editor/models/ir_http.py", line 22, in _dispatch
return super(IrHttp, cls)._dispatch()
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_http.py", line 212, in _dispatch
return cls._handle_exception(e)
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_http.py", line 182, in _handle_exception
return request._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 773, in _handle_exception
return super(HttpRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_http.py", line 208, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 832, in dispatch
r = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 340, in checked_call
result.flatten()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1272, in flatten
self.response.append(self.render())
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1265, in render
return env["ir.ui.view"].render_template(self.template, self.qcontext)
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_ui_view.py", line 1230, in render_template
return self.browse(self.get_view_id(template)).render(values, engine)
File "/usr/lib/python3/dist-packages/odoo/addons/web_editor/models/ir_ui_view.py", line 27, in render
return super(IrUiView, self).render(values=values, engine=engine)
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_ui_view.py", line 1239, in render
return self.env[engine].render(self.id, qcontext)
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/ir_qweb.py", line 57, in render
return super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 275, in render
self.compile(template, options)(self, body.append, values or {})
File "", line 2, in compile
File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 89, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/ir_qweb.py", line 77, in compile
return super(IrQWeb, self).compile(id_or_xml_id, options=options)
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 337, in compile
raise QWebException("Error when compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name)
odoo.addons.base.ir.ir_qweb.qweb.QWebException: Name node can't be used with 'None' constant
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 84, in lookup
r = d[key]
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 68, in wrapper
return func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/tools/lru.py", line 44, in getitem
a = self.d[obj].me
KeyError: ('ir.qweb', <function IrQWeb.compile at 0x7f077d944550>, 162, ('en_US', None, None, None, None, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_qweb/qweb.py", line 330, in compile
unsafe_eval(compile(astmod, '', 'exec'), ns)
ValueError: Name node can't be used with 'None' constant
Error when compiling AST
ValueError: Name node can't be used with 'None' constant
Template: 162
Path: /templates/t/t/form/div[4]/button
Node: Log in
2021-05-06 23:13:06,402 19729 INFO postgres werkzeug: 101.100.130.111 - - [06/May/2021 23:13:06] "GET /favicon.ico HTTP/1.1" 404 -
2021-05-06 23:13:31,025 19729 INFO postgres odoo.addons.base.ir.ir_cron: Starting job
Base: Auto-vacuum internal data
.2021-05-06 23:13:31,095 19729 INFO postgres odoo.addons.base.ir.ir_attachment: filestore gc 337 checked, 0 removed
2021-05-06 23:13:31,141 19729 INFO postgres odoo.addons.base.ir.ir_autovacuum: GC'd 0 user log entries
2021-05-06 23:13:31,145 19729 INFO postgres odoo.addons.base.ir.ir_cron: Job
Base: Auto-vacuum internal data
done.`