Re: [mezzanine-users] first steps with fabric deployment

2014-03-03 Thread ourycl
Did you try to run python manage.py runserver directly in your virtual 
env directory? And is there an error? I the port is in use you can try to 
stop the server by running supervisorctl stop all.

++ 

On Friday, February 28, 2014 1:08:44 AM UTC+1, Federico Bruni wrote:

 2014-02-26 13:18 GMT+01:00 our...@gmail.com javascript::

 Yes, I think fab create has to restart from the beginning. One more 
 advice, be sure that all Fabric settings in settings.py are completed 
 (or as much as you can). I tried to leave the field REPO_URL empty and fab 
 deploy didn't work until I set a real git repository.


 Yes, I see that each time you run 'fab deploy' the git repository is 
 checked and pulled to get the updates.
 I've followed your advice, added as many settings as possible and solved 
 an issue with the gunicorn file, see:
 https://github.com/stephenmcd/mezzanine/issues/870

 Now the server is serving the contents, but... the database is still 
 wrong. All the static and theme files are correct (favicon, homepage), but 
 all the rest (other pages and access to admin) is wrong.
 Something went wrong with manage.py migrate. How can I find the problem? 
 In the output I see many Nothing to migrate.



-- 
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] first steps with fabric deployment

2014-03-03 Thread Federico Bruni
no error found


2014-03-03 13:22 GMT+01:00 our...@gmail.com:

 Did you try to run python manage.py runserver directly in your virtual
 env directory? And is there an error? I the port is in use you can try to
 stop the server by running supervisorctl stop all.

 ++

 On Friday, February 28, 2014 1:08:44 AM UTC+1, Federico Bruni wrote:

 2014-02-26 13:18 GMT+01:00 our...@gmail.com:

 Yes, I think fab create has to restart from the beginning. One more
 advice, be sure that all Fabric settings in settings.py are completed
 (or as much as you can). I tried to leave the field REPO_URL empty and fab
 deploy didn't work until I set a real git repository.


 Yes, I see that each time you run 'fab deploy' the git repository is
 checked and pulled to get the updates.
 I've followed your advice, added as many settings as possible and solved
 an issue with the gunicorn file, see:
 https://github.com/stephenmcd/mezzanine/issues/870

 Now the server is serving the contents, but... the database is still
 wrong. All the static and theme files are correct (favicon, homepage), but
 all the rest (other pages and access to admin) is wrong.
 Something went wrong with manage.py migrate. How can I find the problem?
 In the output I see many Nothing to migrate.

  --
 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/KFgqkys6rUM/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.


Re: [mezzanine-users] first steps with fabric deployment

2014-02-27 Thread Federico Bruni
2014-02-26 13:18 GMT+01:00 our...@gmail.com:

 Yes, I think fab create has to restart from the beginning. One more
 advice, be sure that all Fabric settings in settings.py are completed (or
 as much as you can). I tried to leave the field REPO_URL empty and fab
 deploy didn't work until I set a real git repository.


Yes, I see that each time you run 'fab deploy' the git repository is
checked and pulled to get the updates.
I've followed your advice, added as many settings as possible and solved an
issue with the gunicorn file, see:
https://github.com/stephenmcd/mezzanine/issues/870

Now the server is serving the contents, but... the database is still wrong.
All the static and theme files are correct (favicon, homepage), but all the
rest (other pages and access to admin) is wrong.
Something went wrong with manage.py migrate. How can I find the problem? In
the output I see many Nothing to migrate.

-- 
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] first steps with fabric deployment

2014-02-23 Thread Ken Bolton
Federico,

Have you reviewed the tutorial at
http://bscientific.org/blog/mezzanine-fabric-git-vagrant-joy/? It may be a
bit dated, but should work.

best,
ken


On Sun, Feb 23, 2014 at 11:46 AM, Federico Bruni fedel...@gmail.com wrote:

 Hi

 I'm trying Fabric for the first time and after several tries I have to ask
 for help.
 Do you know a simple step by step tutorial? There are many detailed
 tutorials but I need the big picture.

 IIUC, 'fab all' should care for everything needed, if I set up correctly
 the variables in settings.py.
 I managed to install the dependencies on my server and start the
 virtualenv. I had just an issue with the authentication to my private git
 repository. Not solved yet.

 Then I had problem with the nginx configuration file in sites-enabled
 (created by fab), because it had two lines pointing to not existing files
 (conf/project.crt or something like that).
 I uncommented those lines and managed to restart nginx. Then the conf file
 disappeared (!).

 Now when I run 'fab all' I'm having issues with the PostgreSQL database.
 SHould I create it by myself or let fabric do it for me?

 Fabric seems a very nice tool but I need an easy tutorial to get started.
 Can you help me?

 Many thanks
 Federico

 --
 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] first steps with fabric deployment

2014-02-23 Thread Federico Bruni
Il giorno domenica 23 febbraio 2014 18:37:14 UTC+1, Federico Bruni ha 
scritto:


 Let's start with the nginx error:

 Starting nginx: nginx: [emerg] 
 SSL_CTX_use_certificate_chain_file(/etc/nginx/conf/project.crt) failed 
 (SSL: error:02001002:system library:fopen:No such file or directory 
 error:20074002:BIO routines:FILE_CTRL:system lib error:140DC002:SSL 
 routines:SSL_CTX_use_certificate_chain_file:system lib)
 nginx: configuration file /etc/nginx/nginx.conf test failed
  
 This is because /etc/nginx/sites-enabled/project.conf contains these two 
 lines:

 ssl_certificate  conf/project.crt;
 ssl_certificate_key  conf/project.key;

 This time I've deleted (instead of commenting) these lines, restarted 
 nginx and everything seems Ok.
 But I'd like to fix it, because if I have to re-run 'fab all' the nginx 
 conf file will probably be overwritten.


Ok, I should have looked up deploy/nginx.conf and deploy/live_settings.py 
in my project.
How can I transfer the sqlite database of development to postgresql in 
production? Do you know a specific tutorial on this?

-- 
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] first steps with fabric deployment

2014-02-23 Thread Federico Bruni
2014-02-23 18:45 GMT+01:00 Federico Bruni fedel...@gmail.com:

 Ok, I should have looked up deploy/nginx.conf and deploy/live_settings.py
 in my project.
 How can I transfer the sqlite database of development to postgresql in
 production? Do you know a specific tutorial on this?


I've tried starting with sqlite3 and modified deploy/live_settings
accordingly, but still no luck. fab tries to set up the postgres database.
No idea where this is configured:

$ grep postgres deploy/*
deploy/live_settings.py:# Ends with postgresql_psycopg2, mysql,
sqlite3 or oracle.
deploy/live_settings.py:#ENGINE:
django.db.backends.postgresql_psycopg2,

This is the database section in my deploy/live_settings.py:

DATABASES = {
default: {
# Ends with postgresql_psycopg2, mysql, sqlite3 or oracle.
#ENGINE: django.db.backends.postgresql_psycopg2,
ENGINE: sqlite3,
# DB name or path to database file if using sqlite3.
#NAME: %(proj_name)s,
NAME: dev.db,
# Not used with sqlite3.
#USER: %(proj_name)s,
# Not used with sqlite3.
#PASSWORD: %(db_pass)s,
# Set to empty string for localhost. Not used with sqlite3.
#HOST: 127.0.0.1,
# Set to empty string for default. Not used with sqlite3.
#PORT: ,
}
}

I guess that there's some problem with the path of dev.db or how it should
be synced to the server. But again I can't find any information about it.
(Mezzanine documentation is very clear, full of good links and probably
relatively easy to maintain.. but it's quite hard for a newbie).
Any help is much appreciated.

Thanks!
Federico

-- 
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.