Video of quickly deploying Mezzanine to Google App Engine with django-deployer

970 views
Skip to first unread message

Nate Aune

unread,
Apr 10, 2013, 5:05:07 PM4/10/13
to mezzani...@googlegroups.com, littl...@gmail.com
I wanted to let folks on this list know about a new deployment tool that I've been working on called django-deployer. http://natea.github.io/django-deployer

Here is a short 5 minute video showing how to deploy Mezzanine to Google App Engine, with instructions on how to set up your Mezzanine-based project on App Engine and Cloud SQL.

django-deployer is essentially a fabric script that automates the creation of all the configuration files necessary to deploy your Django app to any of the PaaS providers. Currently there is support for Dotcloud, Stackato and Google App Engine, but there are plans to add support for Heroku, OpenShift and Gondor as well. 

When you run the script, django-deployer asks you a series of questions about your project and writes the answers out to a deploy.yml file. The hope is that in the future, you could stick a deploy.yml file in your Github repo, and any of the PaaS providers could consume this yaml file and translate it into their specific way of deploying your app. Until then, django-deployer is the babelfish that does that translation for you. :)

While the script works mostly as advertised, it's very much still an alpha quality piece of software, and I consider it a work-in-progress. If you want to try it out, I'd love to get feedback on how it can be improved.

Nate

Stephen McDonald

unread,
Apr 10, 2013, 7:11:46 PM4/10/13
to mezzani...@googlegroups.com
Thanks for sharing this Nate - it looks outstanding.

--
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-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Stephen McDonald
http://jupo.org

Chi-Cheong Weng

unread,
Mar 25, 2014, 8:23:24 AM3/25/14
to mezzani...@googlegroups.com, littl...@gmail.com
Hello Thanks for posting. I followed the instruction to deploy but got this error from running "fab deploy":

....

[localhost] local: sh manage.sh collectstatic --noinput
/home/cweng/workspace/env/local/lib/python2.7/site-packages/mezzanine/utils/conf.py:51: UserWarning: You haven't defined the ALLOWED_HOSTS settings, which Django 1.5 requires. Will fall back to the domains configured as sites.
  warn("You haven't defined the ALLOWED_HOSTS settings, which "
/home/cweng/workspace/env/local/lib/python2.7/site-packages/mezzanine/utils/conf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Asia/Hong_Kong
  warn("TIME_ZONE setting is not set, using closest match: %s" % tz)
ImportError: cannot import name dev_appserver

Fatal error: local() encountered an error (return code 1) while executing 'sh manage.sh collectstatic --noinput'

Aborting.

Running "sh manage.sh cloudsyncdb" also gives me the similar import error: what gives??

(webapp)cweng@autotest-ThinkCentre-Edge92 ~/workspace $ > sh manage.sh cloudsyncdb
/home/cweng/workspace/env/local/lib/python2.7/site-packages/mezzanine/utils/conf.py:51: UserWarning: You haven't defined the ALLOWED_HOSTS settings, which Django 1.5 requires. Will fall back to the domains configured as sites.
  warn("You haven't defined the ALLOWED_HOSTS settings, which "
/home/cweng/workspace/env/local/lib/python2.7/site-packages/mezzanine/utils/conf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Asia/Hong_Kong
  warn("TIME_ZONE setting is not set, using closest match: %s" % tz)
Traceback (most recent call last):
  File "webapp/manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/home/cweng/google_appengine/lib/django-1.4/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/home/cweng/google_appengine/lib/django-1.4/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/cweng/google_appengine/lib/django-1.4/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/cweng/google_appengine/lib/django-1.4/django/core/management/base.py", line 231, in execute
    self.validate()
  File "/home/cweng/google_appengine/lib/django-1.4/django/core/management/base.py", line 266, in validate
    num_errors = get_validation_errors(s, app)
  File "/home/cweng/google_appengine/lib/django-1.4/django/core/management/validation.py", line 30, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/home/cweng/google_appengine/lib/django-1.4/django/db/models/loading.py", line 158, in get_app_errors
    self._populate()
  File "/home/cweng/google_appengine/lib/django-1.4/django/db/models/loading.py", line 64, in _populate
    self.load_app(app_name, True)
  File "/home/cweng/google_appengine/lib/django-1.4/django/db/models/loading.py", line 86, in load_app
    app_module = import_module(app_name)
  File "/home/cweng/google_appengine/lib/django-1.4/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/cweng/workspace/env/local/lib/python2.7/site-packages/mezzanine/conf/__init__.py", line 195, in <module>
    module = import_module(app)
  File "/home/cweng/google_appengine/lib/django-1.4/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/cweng/workspace/env/local/lib/python2.7/site-packages/rocket_engine/__init__.py", line 92, in <module>
    path_appendine_sdk()
  File "/home/cweng/workspace/env/local/lib/python2.7/site-packages/rocket_engine/__init__.py", line 66, in path_appendine_sdk
    from google.appengine.tools import dev_appserver
ImportError: cannot import name dev_appserver



Kyle Pennell

unread,
Mar 25, 2014, 8:27:50 PM3/25/14
to mezzani...@googlegroups.com, littl...@gmail.com
How much harder is it to use Heroku vs. GAE?

Ken Bolton

unread,
Mar 25, 2014, 8:49:11 PM3/25/14
to mezzanine-users
I run Mezzanine on variously sized EC2 instances as well as on a RackSpace, nee Slicehost, VPS. A EC2 micro instance is free for the first year, but generally costs less than $10 per month. Digital Ocean, at $5 per month, also worked well for me the very first time. I have used the included Fabric script to build and deploy to the aforementioned with no modification.

The real cost is not the monthly hosting cost, but the development, deployment, and maintenance costs. If you have spent more than an hour working on your deployment, you have cost yourself several months of hosting expenses.

ken


--
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-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kyle Pennell

unread,
Mar 25, 2014, 9:29:06 PM3/25/14
to mezzani...@googlegroups.com
Ok, yes.  True on the time costs.  I'm a new developer (3-4 months) and I swear (sometimes) I spend 55% deploying and 45% developing.

Christian Seberino

unread,
May 28, 2014, 11:37:13 AM5/28/14
to mezzani...@googlegroups.com
Kenneth
I'm glad to hear you run Mezzanine on several cloud hosting providers.  Was that with or without django-deployer?  Was it any harder
to deploy than a plain old Django app?

Thanks!

Chris 

Ken Bolton

unread,
May 28, 2014, 1:46:10 PM5/28/14
to mezzanine-users
On Wed, May 28, 2014 at 11:37 AM, Christian Seberino <cseb...@gmail.com> wrote:
I'm glad to hear you run Mezzanine on several cloud hosting providers.
 
Fewer and fewer. Just updates, really. I want to slip my current project, which pre-dates my participation with it, on top of Mezzanine, but there are higher priority tasks that come first.
 
 Was that with or without django-deployer?
 
I have not used django-deployer, but have confidence in natea's ability to deliver quality software.


I have also used capistrano to deploy, but that was not my decision and I still used the Mezzanine fabfile to push to a Vagrant to test the build locally.
 
 Was it any harder to deploy than a plain old Django app?
 
Mezzanine is "a plain old Django app". I believe that is Mezzanine's strongest selling points.

Static files on a CDN seem to trip people up. I admit to taking shortcuts with that occasionally for expediency.

Thanks!

Chris 


Chi-Cheong Weng

unread,
May 28, 2014, 9:18:47 PM5/28/14
to mezzani...@googlegroups.com
Itis like deploying django. 
--
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/oSQVspbMBFo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mezzanine-use...@googlegroups.com.

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


--
Sent from Gmail Mobile
Reply all
Reply to author
Forward
0 new messages