Re: undo heroku deploy

2010-02-23 Thread orlin
Thanks guys.  I guess it was an old topic, with these two links
recycled from earlier posts:

http://jqr.github.com/2009/04/25/deploying-multiple-environments-on-heroku.html
http://suitmymind.com/blog/2009/06/02/deploying-multiple-environments-on-heroku-while-still-hosting-code-on-github/

I would have identical environments down to the RACK_ENV=production
for both.  Rake is the way to go.  Thanks for the gist.  I would still
deploy from a branch instead of a tag.  Here is an example:

$ git push staging deploy:master
$ git push production deploy:master

Tagging only after production has tested ok too.  Also, I like
http://semver.org/ better than tagging with dates.  Versions
incremented, possibly with http://github.com/dazuma/versionomy

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: undo heroku deploy

2010-02-18 Thread Paul Leader
That's good advice.

I would also recommend that you always have a deployment test
application.

I have my main app, graphomatic.net, and a test app, both on heroku.
These are setup as remotes named 'live' and 'test'

I always do a test run of the deployment process with the test app
before pushing it to the live server.  That includes putting the app
in maintenance mode and running any migrations that might be needed,
and confirming that all the necessary gems are installing ok.

You should always practice your deployments on an identical system
before doing them for real.

This process seems like a hassle but it has saved my neck dozens of
times, and it only takes a few more minutes.

Having a test apps also makes it easier to write code that needs to
integrate with other systems, like PayPal, which need to be able to
access your site.

On Feb 18, 8:34 am, Casper Fabricius 
wrote:
> Hi Orlin,
>
> Heroku could definitely use a rollback feature - I hope it's on their list ;)
>
> When I started using Heroku I asked about it on this list, and people advised 
> me to tag my releases and then push the previous tag if I needed to rollback. 
> I implemented that and write a blog about it a few months 
> ago:http://casperfabricius.com/site/2009/09/20/manage-and-rollback-heroku...
>
> Obviously this means that I don't deploy with "git push heroku" but rather 
> with "rake deploy". Since then, I have improved my Heroku deployment script a 
> bit. The current version is here:http://gist.github.com/307479
>
> Hope this helps.
>
> Cheers,
> Casper Fabricius
>
> On 17/02/2010, at 14.06, orlin wrote:
>
> > What is the recommended way to undo a bad heroku deploy?  I push
> > something that causes "App failed to start" error.  Afaik, the fastest
> > way to fix that would be:
>
> > git push heroku mybranch:master --force
>
> > Is there a way for git to push a commit instead of a branch?
> > Otherwise It seems better to deploy from call it a "deploy" branch and
> > then merge changes into master if they deploy cleanly.
>
> > Also, there seems to be a bug with the .gems to bundler transition.
> > The .gems manifest gems were uninstalled after switching to Bundler.
> > But Bundler introduced an error (in my case, require fails for one of
> > the gems)...  Having to rollback to a running app (maintenance mode
> > doesn't fix such errors), I force-push older code.  But, since
> > the .gems manifest is the same, all the gems turn out missing.  Now I
> > have to push a fake commit that modifies the .gems file (so that it
> > gets "detected" & thus the gems get reinstalled).  Perhaps an explicit
> > "heroku gems reinstall" command I haven't spotted?
>
> > On a separate note, why would heroku deploy an app - if every single
> > page produces an "App failed to start" error?
>
> > Luckily, my site is basically unknown at this point, but I would
> > eventually need a solid deployment process...  Any *best practice*
> > pages out there?
>
> > Regards,
>
> > Orlin
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Heroku" group.
> > To post to this group, send email to her...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > heroku+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/heroku?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: undo heroku deploy

2010-02-18 Thread Casper Fabricius
Hi Orlin,

Heroku could definitely use a rollback feature - I hope it's on their list ;)

When I started using Heroku I asked about it on this list, and people advised 
me to tag my releases and then push the previous tag if I needed to rollback. I 
implemented that and write a blog about it a few months ago:
http://casperfabricius.com/site/2009/09/20/manage-and-rollback-heroku-deployments-capistrano-style/

Obviously this means that I don't deploy with "git push heroku" but rather with 
"rake deploy". Since then, I have improved my Heroku deployment script a bit. 
The current version is here:
http://gist.github.com/307479

Hope this helps.

Cheers,
Casper Fabricius


On 17/02/2010, at 14.06, orlin wrote:

> What is the recommended way to undo a bad heroku deploy?  I push
> something that causes "App failed to start" error.  Afaik, the fastest
> way to fix that would be:
> 
> git push heroku mybranch:master --force
> 
> Is there a way for git to push a commit instead of a branch?
> Otherwise It seems better to deploy from call it a "deploy" branch and
> then merge changes into master if they deploy cleanly.
> 
> Also, there seems to be a bug with the .gems to bundler transition.
> The .gems manifest gems were uninstalled after switching to Bundler.
> But Bundler introduced an error (in my case, require fails for one of
> the gems)...  Having to rollback to a running app (maintenance mode
> doesn't fix such errors), I force-push older code.  But, since
> the .gems manifest is the same, all the gems turn out missing.  Now I
> have to push a fake commit that modifies the .gems file (so that it
> gets "detected" & thus the gems get reinstalled).  Perhaps an explicit
> "heroku gems reinstall" command I haven't spotted?
> 
> On a separate note, why would heroku deploy an app - if every single
> page produces an "App failed to start" error?
> 
> Luckily, my site is basically unknown at this point, but I would
> eventually need a solid deployment process...  Any *best practice*
> pages out there?
> 
> Regards,
> 
> Orlin
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Heroku" group.
> To post to this group, send email to her...@googlegroups.com.
> To unsubscribe from this group, send email to 
> heroku+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/heroku?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



undo heroku deploy

2010-02-17 Thread orlin
What is the recommended way to undo a bad heroku deploy?  I push
something that causes "App failed to start" error.  Afaik, the fastest
way to fix that would be:

git push heroku mybranch:master --force

Is there a way for git to push a commit instead of a branch?
Otherwise It seems better to deploy from call it a "deploy" branch and
then merge changes into master if they deploy cleanly.

Also, there seems to be a bug with the .gems to bundler transition.
The .gems manifest gems were uninstalled after switching to Bundler.
But Bundler introduced an error (in my case, require fails for one of
the gems)...  Having to rollback to a running app (maintenance mode
doesn't fix such errors), I force-push older code.  But, since
the .gems manifest is the same, all the gems turn out missing.  Now I
have to push a fake commit that modifies the .gems file (so that it
gets "detected" & thus the gems get reinstalled).  Perhaps an explicit
"heroku gems reinstall" command I haven't spotted?

On a separate note, why would heroku deploy an app - if every single
page produces an "App failed to start" error?

Luckily, my site is basically unknown at this point, but I would
eventually need a solid deployment process...  Any *best practice*
pages out there?

Regards,

Orlin

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.