Skip to Content
Menu
This question has been flagged
4 Replies
21999 Views

I have installed OPENERP into the cloud in EC2, which it was a success. Now I am trying to have my DB in RDS (AMAZON), which it accepts postgres as DB. I have tried modify the config file,

[options]

; This is the password that allows database operations:

; admin_passwd = admin

db_host = 'postgresql.c8be59frvnrc.us-east-1.rds.amazonaws.com'

db_port = 5432

db_user = openerp

db_password = openerp

db_name = openerp

logfile = /var/log/openerp/openerp-server.log

but when i load the openerp-server, it stills shows "database hostname: localhost" and it doesn't even try to connect to the RDS.

Avatar
Discard
Best Answer

I don't think that the db_host parameter should be in quotes.

Also note: I have had problems with Amazon's PostgreSQL RDS versions 9.3.2 to 9.3.5. Make sure the version you are using is 9.3.1 or 9.3.6.

Avatar
Discard
Best Answer

I've configured Odoo/OpenERP to work properly with Amazon RDS.
The steps are:
1. Create your Amazon RDS database. In that process, you will provide a Postgres user name + pass and at the end you will be given: an endpoint (server name + port number, default port is 5432)

2. In the Odoo/OpenERP configuration file, write down the parameters below:

db_host = your_endpoint_name_without_port_number_and_without_any_quotes
db_password = your_postgres_passwd

db_port = 5432
db_user =your_postgres_user_name

3. Restart Odoo to enable these changes.

4. If your Odoo/OpenERP server is an AWS EC2 server, you should note that AWS resolves your db server endpoint with the private IP. Make sure that you add a security rule to your security group that allows the AWS EC2 server to access the RDS server (your db server on Amazon).

That's all! Please upvote this answer if it works for you too. Thanks!

Avatar
Discard
Best Answer

The configuration is very similar to the one when everything in the same server (the EC2). You should point to the RDS dns name (instead IPs) and use the very same user and password you set when you created the RDS instance. In EC2 you can install also the PSQL client to access via command line to your RDS. It's importan to consider the version of the Postgres you installed in the EC2, because RDS it's always updated and it doesn't work if you try to connect with a different version of PSQL client.

I had a problem when backing up the database from the browser (odoo8.0), because previously in EC2 I had PSQL 9.3, while RDS was 9.5, so I had to install postgres 9.5 in the EC2, and also reset the link for pg_dump

 pg_dump -> /usr/lib/postgresql/9.5/bin/pg_dump

This is part of the odoo-USER1-server.conf.

[options]; This is the password that allows database operations:
admin_passwd = ADMINPASS_FOR_ODOO
db_host = EXAMPLERDSDNSNAME.ccebtp93ib46.us-west-2.rds.amazonaws.com
db_port = 5432
db_user = USER1
db_password = PASSUSER1
logfile = /var/log/USER1/odoo-USER1-server.log
addons_path=/opt/MOREADDONS/addons1addons_path=/opt/odoo/addons,/opt/MOREADDONS/addons1,/opt/MOREADDONS/addons2,/opt/MOREADDONS/addons3

You can have also have more than one Odoo instance within the same EC2 and the same RDS by setting different configuration files, like odoo1-server.conf, odoo2-server.conf, odooN-server.conf and using different RDS users in each file. The effect is that each odoo enviroment will only see the databases created with that specific user.

Avatar
Discard
Best Answer

Does anyone work out how to get it sorted? It should be an interesting topic to explore. From the idea of backup in S3, I think there should be some configuration to connect EC2 with DB. For back up in S3, s3cmd is installed. visit here:http://s3tools.org/s3cmd

I searched online and found this: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToPostgreSQLInstance.html

I will try that later.

Avatar
Discard
Related Posts Replies Views Activity
0
Mar 16
5038
3
Jun 21
13938
2
Nov 24
4789
2
Mar 15
8721
1
Apr 17
6569