Re: Automating deployments
I've got SaltStack setup to deploy Ubuntu+Nginx+uWSGI+Postgresql+memcache pretty easily. Pulls Django projects from Git, pip installs from requirements file. It is a lot less complicated than Puppet/Chef in my opinion. Just my $.03 cents On Friday, February 1, 2013 4:28:45 PM UTC-8, Marc Aymerich wrote: > > Hi, > I'm thinking about the best way to provide automatic deployment for > the Django project I'm working on. Its a pretty big one and has lots > of dependencies, lots of SO packages, Celeryd and other daemons, SO > tweaks... and also several people will need to have installed it on > their servers (they are sysadmins, not Django developers), Therefore I > want to automate as much as possible the installation and updating > processes, to minimize their pain and also because of having > homogeneity. > > As I've been a sysadmin myself for many years I've already written > some bash scripts that automates all the deployment. But in order to > make it more 'natural' I'm planning to integrate those scripts within > the Django project as management commands. > > To illustrate my ultimate goal this is how I imagine the workflow: > > sudo pip install django-my_project > my_project-admin.sh clone project_name path > > sudo python manage.py installrequirements > sudo python manage.py setuppostgres > python manage.py syncdb > python manage.py migrate > python manage.py createsuperuser > > sudo python manage.py setupapache > python manage.py collectstatic > sudo python manage.py setupceleryd > sudo python manage.py createtincserver > python manage.py updatetincd > sudo python manage.py setupfirmware > python manage.py loaddata firmwareconfig > > sudo python manage.py restartservices > > > Any thought on this? How do you automate your deployments? I heard > about fabric lots of times but never used it. Will fabric be helpful > in my case? Does it has any advantage for writing my own scripts? Or > maybe there are already some existing tools for automating deployment > of most common services like Apache, celeryd ..,? > > Many thanks! > br > -- > Marc > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Automating deployments
Hi this is example the fabfile.py the projects is mezzanine is CMS. this is a complete example to deploys automatically django projects use nginx,gunicorn,supervisord https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py cheers On Sun, Feb 3, 2013 at 3:31 AM, Sanjay Bhangar wrote: > On Sun, Feb 3, 2013 at 1:32 PM, Ashwin Kumar wrote: > > thats so kind of you, i struggled a lot for 1 month to setup a server > > (ubuntu+nginx+uWSGI+mysql+pil+virtualenv+emperor). > > still i didn't succeed running emepror on system restart, i removed > > virtualenv as i got python-mysqldb error. > > > > for the python-mysqldb error, here is what I generally do: > install python-mysqldb from apt-get, so 'sudo apt-get install > python-mysqldb' > and then when creating the virtualenv, make sure to tell it to use > system packages where available with: > virtualenv --system-site-packages . > > Then it should use mysqldb from the one installed by apt, which should > generally work better with the version, etc. on your machine than the > one installed from pip. > > Hope that helps, > Sanjay > > > > let me know if you finish it. > > > > With Best > > -Ashwin. > > +91-9959166266 > > > > > > On Sat, Feb 2, 2013 at 6:23 AM, Brian Schott wrote: > >> > >> We are using ansible. > >> http://ansible.cc/ > >> > >> Other popular choices are puppet and chef. The real benefit. Is that > >> these tools let you version control your configurations. > >> > >> Sent from my iPhone > >> > >> On Feb 1, 2013, at 7:46 PM, Carlos Aguilar > wrote: > >> > >> Bash scripts really??? > >> > >> If you are a Python developer you can use fabric to deployed and pip for > >> dependencies. > >> > >> Best Regards > >> > >> El viernes, 1 de febrero de 2013, Marc Aymerich escribió: > >>> > >>> Hi, > >>> I'm thinking about the best way to provide automatic deployment for > >>> the Django project I'm working on. Its a pretty big one and has lots > >>> of dependencies, lots of SO packages, Celeryd and other daemons, SO > >>> tweaks... and also several people will need to have installed it on > >>> their servers (they are sysadmins, not Django developers), Therefore I > >>> want to automate as much as possible the installation and updating > >>> processes, to minimize their pain and also because of having > >>> homogeneity. > >>> > >>> As I've been a sysadmin myself for many years I've already written > >>> some bash scripts that automates all the deployment. But in order to > >>> make it more 'natural' I'm planning to integrate those scripts within > >>> the Django project as management commands. > >>> > >>> To illustrate my ultimate goal this is how I imagine the workflow: > >>> > >>> sudo pip install django-my_project > >>> my_project-admin.sh clone project_name path > >>> > >>> sudo python manage.py installrequirements > >>> sudo python manage.py setuppostgres > >>> python manage.py syncdb > >>> python manage.py migrate > >>> python manage.py createsuperuser > >>> > >>> sudo python manage.py setupapache > >>> python manage.py collectstatic > >>> sudo python manage.py setupceleryd > >>> sudo python manage.py createtincserver > >>> python manage.py updatetincd > >>> sudo python manage.py setupfirmware > >>> python manage.py loaddata firmwareconfig > >>> > >>> sudo python manage.py restartservices > >>> > >>> > >>> Any thought on this? How do you automate your deployments? I heard > >>> about fabric lots of times but never used it. Will fabric be helpful > >>> in my case? Does it has any advantage for writing my own scripts? Or > >>> maybe there are already some existing tools for automating deployment > >>> of most common services like Apache, celeryd ..,? > >>> > >>> Many thanks! > >>> br > >>> -- > >>> Marc > >>> > >>> -- > >>> You received this message because you are subscribed to the Google > Groups > >>> "Django users" group. > >>> To unsubscribe from this group and stop receiving emails from it, send > an > >>> email to django-users+unsubscr...@googlegroups.com. > >>> To post to this group, send email to django-users@googlegroups.com. > >>> Visit this group at http://groups.google.com/group/django-users?hl=en. > >>> For more options, visit https://groups.google.com/groups/opt_out. > >>> > >>> > >> > >> > >> -- > >> Carlos Aguilar > >> Consultor Hardware y Software > >> DWD&Solutions > >> http://www.dwdandsolutions.com > >> http://www.houseofsysadmin.com > >> Cel: +50378735118 > >> USA: (301) 337-8541 > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Django users" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an > >> email to django-users+unsubscr...@googlegroups.com. > >> To post to this group, send email to django-users@googlegroups.com. > >> Visit this group at http://groups.google.com/group/django-users?hl=en. > >> For more options, visit https://groups.google.com/groups/opt_out. > >> > >> > >> > >> -- > >> You received this mess
Re: Automating deployments
On Sun, Feb 3, 2013 at 1:32 PM, Ashwin Kumar wrote: > thats so kind of you, i struggled a lot for 1 month to setup a server > (ubuntu+nginx+uWSGI+mysql+pil+virtualenv+emperor). > still i didn't succeed running emepror on system restart, i removed > virtualenv as i got python-mysqldb error. > for the python-mysqldb error, here is what I generally do: install python-mysqldb from apt-get, so 'sudo apt-get install python-mysqldb' and then when creating the virtualenv, make sure to tell it to use system packages where available with: virtualenv --system-site-packages . Then it should use mysqldb from the one installed by apt, which should generally work better with the version, etc. on your machine than the one installed from pip. Hope that helps, Sanjay > let me know if you finish it. > > With Best > -Ashwin. > +91-9959166266 > > > On Sat, Feb 2, 2013 at 6:23 AM, Brian Schott wrote: >> >> We are using ansible. >> http://ansible.cc/ >> >> Other popular choices are puppet and chef. The real benefit. Is that >> these tools let you version control your configurations. >> >> Sent from my iPhone >> >> On Feb 1, 2013, at 7:46 PM, Carlos Aguilar wrote: >> >> Bash scripts really??? >> >> If you are a Python developer you can use fabric to deployed and pip for >> dependencies. >> >> Best Regards >> >> El viernes, 1 de febrero de 2013, Marc Aymerich escribió: >>> >>> Hi, >>> I'm thinking about the best way to provide automatic deployment for >>> the Django project I'm working on. Its a pretty big one and has lots >>> of dependencies, lots of SO packages, Celeryd and other daemons, SO >>> tweaks... and also several people will need to have installed it on >>> their servers (they are sysadmins, not Django developers), Therefore I >>> want to automate as much as possible the installation and updating >>> processes, to minimize their pain and also because of having >>> homogeneity. >>> >>> As I've been a sysadmin myself for many years I've already written >>> some bash scripts that automates all the deployment. But in order to >>> make it more 'natural' I'm planning to integrate those scripts within >>> the Django project as management commands. >>> >>> To illustrate my ultimate goal this is how I imagine the workflow: >>> >>> sudo pip install django-my_project >>> my_project-admin.sh clone project_name path >>> >>> sudo python manage.py installrequirements >>> sudo python manage.py setuppostgres >>> python manage.py syncdb >>> python manage.py migrate >>> python manage.py createsuperuser >>> >>> sudo python manage.py setupapache >>> python manage.py collectstatic >>> sudo python manage.py setupceleryd >>> sudo python manage.py createtincserver >>> python manage.py updatetincd >>> sudo python manage.py setupfirmware >>> python manage.py loaddata firmwareconfig >>> >>> sudo python manage.py restartservices >>> >>> >>> Any thought on this? How do you automate your deployments? I heard >>> about fabric lots of times but never used it. Will fabric be helpful >>> in my case? Does it has any advantage for writing my own scripts? Or >>> maybe there are already some existing tools for automating deployment >>> of most common services like Apache, celeryd ..,? >>> >>> Many thanks! >>> br >>> -- >>> Marc >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to django-users+unsubscr...@googlegroups.com. >>> To post to this group, send email to django-users@googlegroups.com. >>> Visit this group at http://groups.google.com/group/django-users?hl=en. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >> >> >> -- >> Carlos Aguilar >> Consultor Hardware y Software >> DWD&Solutions >> http://www.dwdandsolutions.com >> http://www.houseofsysadmin.com >> Cel: +50378735118 >> USA: (301) 337-8541 >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To post to this group, send email to django-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/django-users?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To post to this group, send email to django-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/django-users?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving em
Re: Automating deployments
thats so kind of you, i struggled a lot for 1 month to setup a server (ubuntu+nginx+uWSGI+mysql+pil+virtualenv+emperor). still i didn't succeed running emepror on system restart, i removed virtualenv as i got python-mysqldb error. let me know if you finish it. With Best -Ashwin. +91-9959166266 On Sat, Feb 2, 2013 at 6:23 AM, Brian Schott wrote: > We are using ansible. > http://ansible.cc/ > > Other popular choices are puppet and chef. The real benefit. Is that > these tools let you version control your configurations. > > Sent from my iPhone > > On Feb 1, 2013, at 7:46 PM, Carlos Aguilar wrote: > > Bash scripts really??? > > If you are a Python developer you can use fabric to deployed and pip for > dependencies. > > Best Regards > > El viernes, 1 de febrero de 2013, Marc Aymerich escribió: > >> Hi, >> I'm thinking about the best way to provide automatic deployment for >> the Django project I'm working on. Its a pretty big one and has lots >> of dependencies, lots of SO packages, Celeryd and other daemons, SO >> tweaks... and also several people will need to have installed it on >> their servers (they are sysadmins, not Django developers), Therefore I >> want to automate as much as possible the installation and updating >> processes, to minimize their pain and also because of having >> homogeneity. >> >> As I've been a sysadmin myself for many years I've already written >> some bash scripts that automates all the deployment. But in order to >> make it more 'natural' I'm planning to integrate those scripts within >> the Django project as management commands. >> >> To illustrate my ultimate goal this is how I imagine the workflow: >> >> sudo pip install django-my_project >> my_project-admin.sh clone project_name path >> >> sudo python manage.py installrequirements >> sudo python manage.py setuppostgres >> python manage.py syncdb >> python manage.py migrate >> python manage.py createsuperuser >> >> sudo python manage.py setupapache >> python manage.py collectstatic >> sudo python manage.py setupceleryd >> sudo python manage.py createtincserver >> python manage.py updatetincd >> sudo python manage.py setupfirmware >> python manage.py loaddata firmwareconfig >> >> sudo python manage.py restartservices >> >> >> Any thought on this? How do you automate your deployments? I heard >> about fabric lots of times but never used it. Will fabric be helpful >> in my case? Does it has any advantage for writing my own scripts? Or >> maybe there are already some existing tools for automating deployment >> of most common services like Apache, celeryd ..,? >> >> Many thanks! >> br >> -- >> Marc >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To post to this group, send email to django-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/django-users?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > Carlos Aguilar > Consultor Hardware y Software > DWD&Solutions > http://www.dwdandsolutions.com > http://www.houseofsysadmin.com > Cel: +50378735118 > USA: (301) 337-8541 > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Automating deployments
We are using ansible. http://ansible.cc/ Other popular choices are puppet and chef. The real benefit. Is that these tools let you version control your configurations. Sent from my iPhone On Feb 1, 2013, at 7:46 PM, Carlos Aguilar wrote: Bash scripts really??? If you are a Python developer you can use fabric to deployed and pip for dependencies. Best Regards El viernes, 1 de febrero de 2013, Marc Aymerich escribió: > Hi, > I'm thinking about the best way to provide automatic deployment for > the Django project I'm working on. Its a pretty big one and has lots > of dependencies, lots of SO packages, Celeryd and other daemons, SO > tweaks... and also several people will need to have installed it on > their servers (they are sysadmins, not Django developers), Therefore I > want to automate as much as possible the installation and updating > processes, to minimize their pain and also because of having > homogeneity. > > As I've been a sysadmin myself for many years I've already written > some bash scripts that automates all the deployment. But in order to > make it more 'natural' I'm planning to integrate those scripts within > the Django project as management commands. > > To illustrate my ultimate goal this is how I imagine the workflow: > > sudo pip install django-my_project > my_project-admin.sh clone project_name path > > sudo python manage.py installrequirements > sudo python manage.py setuppostgres > python manage.py syncdb > python manage.py migrate > python manage.py createsuperuser > > sudo python manage.py setupapache > python manage.py collectstatic > sudo python manage.py setupceleryd > sudo python manage.py createtincserver > python manage.py updatetincd > sudo python manage.py setupfirmware > python manage.py loaddata firmwareconfig > > sudo python manage.py restartservices > > > Any thought on this? How do you automate your deployments? I heard > about fabric lots of times but never used it. Will fabric be helpful > in my case? Does it has any advantage for writing my own scripts? Or > maybe there are already some existing tools for automating deployment > of most common services like Apache, celeryd ..,? > > Many thanks! > br > -- > Marc > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com . > To post to this group, send email to > django-users@googlegroups.com > . > Visit this group at http://groups.google.com/group/django-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Carlos Aguilar Consultor Hardware y Software DWD&Solutions http://www.dwdandsolutions.com http://www.houseofsysadmin.com Cel: +50378735118 USA: (301) 337-8541 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Automating deployments
Hi, I'm thinking about the best way to provide automatic deployment for the Django project I'm working on. Its a pretty big one and has lots of dependencies, lots of SO packages, Celeryd and other daemons, SO tweaks... and also several people will need to have installed it on their servers (they are sysadmins, not Django developers), Therefore I want to automate as much as possible the installation and updating processes, to minimize their pain and also because of having homogeneity. As I've been a sysadmin myself for many years I've already written some bash scripts that automates all the deployment. But in order to make it more 'natural' I'm planning to integrate those scripts within the Django project as management commands. To illustrate my ultimate goal this is how I imagine the workflow: sudo pip install django-my_project my_project-admin.sh clone project_name path sudo python manage.py installrequirements sudo python manage.py setuppostgres python manage.py syncdb python manage.py migrate python manage.py createsuperuser sudo python manage.py setupapache python manage.py collectstatic sudo python manage.py setupceleryd sudo python manage.py createtincserver python manage.py updatetincd sudo python manage.py setupfirmware python manage.py loaddata firmwareconfig sudo python manage.py restartservices Any thought on this? How do you automate your deployments? I heard about fabric lots of times but never used it. Will fabric be helpful in my case? Does it has any advantage for writing my own scripts? Or maybe there are already some existing tools for automating deployment of most common services like Apache, celeryd ..,? Many thanks! br -- Marc -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.