Re: [mezzanine-users] step by step mezzanine deployment

2014-03-07 Thread Federico Bruni
2014-03-06 18:36 GMT+01:00 Federico Bruni fedel...@gmail.com:

 2014-03-06 18:20 GMT+01:00 Federico Bruni fedel...@gmail.com:

 2014-03-03 13:01 GMT+01:00 Federico Bruni fedel...@gmail.com:

 First of all, the DATABASES options are divided in 3 files:

 - local_settings.py: the setting for local development. By default,
 sqlite is used. I wonder what's the best approach if I know that I want to
 deploy on PostgreSQL on the server. Should I work on PostgreSQL locally as
 well?
 - live_settings.py: this also is pretty clear, it contains the server
 settings (I found out that it can be left untouched, as long as settings.
 py is complete)
 - settings.py: IIUC, any settings here will be overridden by the two
 settings above, so I can ignore the DATABASE section. Is it correct?


 Can anyone please reply on the last question above?

 I've managed to sync local and server manually, but I'd like to be able
 to do it with Fabric.
 One problem may be that the owner of the database created by Fabric is
 always %(proj_name)s, no matter what I put in the settings. I've tried to
 write the server user name (string) both in settings and live_settings.py,
 but fabric seems to ignore it.


 The awful workaround is deleting the database created by fabric and then
 doing a manual dump.
 My site is live now, but I'd really like to know what's wrong with my
 configuration.


Or rather, why I don't keep a message in the drafts and send it just the
day after? :-)
I've already been told that Fabric doesn't sync the content of the
database. So the manual operation _is_ required.

Sorry for the noise, I've had few time to spend on Mezzanine lately

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] step by step mezzanine deployment

2014-03-03 Thread Ken Bolton
Fabric does not sync the content of the databases.

Fabric does sync the database schemas!


On Mon, Mar 3, 2014 at 8:03 AM, Federico Bruni fedel...@gmail.com wrote:

 2014-03-03 13:01 GMT+01:00 Federico Bruni fedel...@gmail.com:

 Now I should find out why my real project is failing. Maybe I could start
 it from scratch step by step and see what happens.


 I've just one more test: added a page in my local project and then
 launched 'fab deploy' to send the changes to the server database.
 But nothing happens (I'm sure I've forced the reload of the page).

 So I've managed to reproduce my original problem. Local and deployment
 databases are not synced when I launch 'fab deploy'.
 No error if I manually launch 'python manage.py runserver' from the
 virtualenv in the server (after 'sudo supervisorctl stop all').

  --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [mezzanine-users] step by step mezzanine deployment

2014-03-03 Thread Federico Bruni
Ah! Here's what I was missing!
Now I'm trying to manually sync the databases:

pg_dump -C -h localhost -U localuser dbname | psql -h remotehost -U
remoteuser dbname

But I have problem with the port 5432. I already tried to add ip_private to
listen_addresses in postgresql.conf, as suggested here:
http://stackoverflow.com/questions/19916720/psql-cant-connect-to-postgresql-server-postmaster-on-ip-and-port-5432

But it doesn't help:

psql: could not connect to server: Connection refused
Is the server running on host xx.xx.xx.xx and accepting
TCP/IP connections on port 5432?

pg_dump: [archiver (db)] connection to database xx failed:
fe_sendauth: no password supplied



2014-03-03 16:26 GMT+01:00 Ken Bolton kenbol...@gmail.com:

 Fabric does not sync the content of the databases.

 Fabric does sync the database schemas!


 On Mon, Mar 3, 2014 at 8:03 AM, Federico Bruni fedel...@gmail.com wrote:

 2014-03-03 13:01 GMT+01:00 Federico Bruni fedel...@gmail.com:

 Now I should find out why my real project is failing. Maybe I could start
 it from scratch step by step and see what happens.


 I've just one more test: added a page in my local project and then
 launched 'fab deploy' to send the changes to the server database.
 But nothing happens (I'm sure I've forced the reload of the page).

 So I've managed to reproduce my original problem. Local and deployment
 databases are not synced when I launch 'fab deploy'.
 No error if I manually launch 'python manage.py runserver' from the
 virtualenv in the server (after 'sudo supervisorctl stop all').

  --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.


  --
 You received this message because you are subscribed to a topic in the
 Google Groups Mezzanine Users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/mezzanine-users/FSCD3RAdLww/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.