Tried 3-4 heroku deployment tutorials but stuck on each one.

226 views
Skip to first unread message

Kyle Pennell

unread,
Mar 25, 2014, 2:36:26 PM3/25/14
to mezzani...@googlegroups.com
Hey all,
Would love to get some help here if you could.  Hit the wall on what I can do/try.

I'm just trying to deploy a basic mezzanine setup on Heroku.  I've tried Josh's tutorial, Ben's Tutorial, searched Stackoverflow, here, etc.  Going on 10 hours trying.  Hit unique and interesting bugs on each one.

So I'm trying Steven Elliot's tutorial.  I reasoned that it was the newest (15 days ago) and might work better.  He's been extremely helpful on Twitter.

Hit this roadblock here:

(mezzenv)kpennell@vm-0:~/mezz-site$ python manage.py collectstatic                                                                                                                   
/home/kpennell/mezz-site/mezzenv/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/kpennell/mezz-site/mezzenv/local/lib/python2.7/site-packages/mezzanine/utils/conf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Etc/UTC
  warn("TIME_ZONE setting is not set, using closest match: %s" % tz)
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/home/kpennell/mezz-site/mezzenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/home/kpennell/mezz-site/mezzenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/kpennell/mezz-site/mezzenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
    commands = get_commands()
  File "/home/kpennell/mezz-site/mezzenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 107, in get_commands
    apps = settings.INSTALLED_APPS
  File "/home/kpennell/mezz-site/mezzenv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
    self._setup(name)
  File "/home/kpennell/mezz-site/mezzenv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/kpennell/mezz-site/mezzenv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 128, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/home/kpennell/mezz-site/mezzenv/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/home/kpennell/mezz-site/settings.py", line 442, in <module>
    set_dynamic_settings(globals())
  File "/home/kpennell/mezz-site/mezzenv/local/lib/python2.7/site-packages/mezzanine/utils/conf.py", line 184, in set_dynamic_settings
    shortname = db["ENGINE"].split(".")[-1]
KeyError: u'ENGINE'

So something with collect static doesn't work.  Something to do with set_dynamic_settings.  I copied his tut verbatim and cloned the project he gave me and both hit the snag there.

I can post the code here if you want but thought pushing to github would be easier:




Any ideas?


Josh Cartmell

unread,
Mar 25, 2014, 6:35:56 PM3/25/14
to mezzani...@googlegroups.com
Hey Kyle, I've never used Heroku, are you set on using it?

The fabfile that comes bundled with Mezzanine will deploy to a vanilla ubuntu VPS and is basically completely automated.

I also have had good success hosting Mezzanine on Webfaction and can deploy there fairly easily.


--
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, 7:04:20 PM3/25/14
to mezzani...@googlegroups.com
Hey Josh,
Was hoping to stick to Heroku because it's free and I didn't want to scatter my apps around too much.  But I'm open to other ideas.

Danny

unread,
Mar 25, 2014, 7:10:07 PM3/25/14
to mezzani...@googlegroups.com
Biggest problem I had with Heroku is that it doesn't have any
permanent storage - each time you redeploy, you're creating your
project/app/static from scratch. It doesn't work so well with
Mezzanine's ability to upload media files. There is a way of hooking
things in with Amazon S3 but I never managed to get it to work with
any Django project, so I ended up giving up on Heroku.

(Also the, SSL add-on pack is quite expensive!)
--
mol...@gmail.com

Kyle Pennell

unread,
Mar 25, 2014, 8:19:29 PM3/25/14
to mezzani...@googlegroups.com
Is Google App Engine the better solution?

Kyle Pennell

unread,
Mar 25, 2014, 8:28:05 PM3/25/14
to mezzani...@googlegroups.com
What else do you recommend?


On Tuesday, March 25, 2014 4:35:56 PM UTC-6, Josh Cartmell wrote:

Kyle Pennell

unread,
Mar 25, 2014, 8:28:21 PM3/25/14
to mezzani...@googlegroups.com
Pardon...any other good free options?


On Tuesday, March 25, 2014 4:35:56 PM UTC-6, Josh Cartmell wrote:

Kyle Pennell

unread,
Mar 25, 2014, 10:48:51 PM3/25/14
to mezzani...@googlegroups.com
Decided to just go Digital Ocean.  It was an absolute waste of time trying to get Heroku to work.

Ben Havilland

unread,
Mar 30, 2014, 3:32:30 PM3/30/14
to mezzani...@googlegroups.com
Hi all,
I just joined the group.  Kyle, it appears you have moved on but if anybody else is needs the current working Mezzanine/Heroku setup I've updated my tutorial and it addresses/fixes KeyError: u'ENGINE' the error you were getting.

I just ran through it from scratch with the latest packages with success:

There was a problem in the settings.py with the placement of the local settings and dynamic settings sections in the tutorial code.

Ben

Kyle Pennell

unread,
Apr 1, 2014, 12:39:42 PM4/1/14
to mezzani...@googlegroups.com
Nice of you to come post here, Ben. Thanks.

I've been trying with Digital Ocean now but am stuck in new and different interesting ways.

Never thought deploying Mezzanine would take me 25+ hours.  This is probably more my fault than the tutorials I've been using.  But wow.  Ouch.

Josh Cartmell

unread,
Apr 1, 2014, 1:40:42 PM4/1/14
to mezzani...@googlegroups.com
Hey Kyle, I was also struggling getting things going on Digital Ocean earlier in the week.  I just wrote up a blog post on deploying to it:
http://bitofpixels.com/blog/deploying-mezzanine-to-digital-ocean-using-the-included-fabfile/

Following those steps works for me, hopefully it helps!


Guillermo Valle

unread,
Oct 2, 2014, 6:47:41 AM10/2/14
to mezzani...@googlegroups.com
I am also getting this same error. And Ben's tutorial hasn't solved it for me (I haven't followed it fully because I'm serving statics with Heroku not S3, but have followed everything that I thought would apply). The location of LOCAL and DYNAMIC SETTINGS doesn't seem to fix it for me :( Any other ideas?

Kyle Pennell

unread,
Oct 2, 2014, 12:30:21 PM10/2/14
to mezzani...@googlegroups.com
I sadly couldn't figure it out and asked too many questions which understandably frustrated people.  So I switched to Angular and Javascript in general (better suited for my task anyway).

I highly recommend reading the docs as much as possible.

--
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/Xzq2s0JtTW8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mezzanine-use...@googlegroups.com.

Ben Havilland

unread,
Oct 9, 2014, 10:48:29 AM10/9/14
to mezzani...@googlegroups.com

Do you have some code to take a look at?  Are you able to run the project locally?  Have you done a mezzanine deployment w/o heroku before or is this a first attempt all together?  Cheers

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

Ben Havilland

unread,
Oct 9, 2014, 1:54:53 PM10/9/14
to mezzani...@googlegroups.com
I made some code public and added this post today:
http://www.oceanatech.com/blog/running-mezzanine-django-on-heroku-and-locally-example-code/

Hope it helps.

If you post your code and provide specific errors I'd be happy to help more.


Reply all
Reply to author
Forward
0 new messages