In which I discuss my first experience with Heroku and my second. And how awesome it is.
It is true. You are. Go try it now. That is an order. I can wait for you to come back and finish reading this post. I could end the post now, but I suppose I’ll go on and tell you a bit about my experience with Heroku yesterday.
Formerly a Toy in the Cloud
Wynn and I were talking yesterday about how, back in the day, Heroku seemed like a toy in the cloud. They had a rich code editor and you could magically create and deploy applications that sometimes worked. It was neat, but nothing you would use for anything serious.
A toy they are no more. So what is Heroku? According to their site, Heroku is “fast, frictionless, and maintenance free.” After giving it another look yesterday, I would have to agree.
I have a tiny note application that my wife and I use. I use it to mark things to read later and save plain text notes. She uses it to keep track of recipes, tagged with ingredients and whether or not she has made the recipe before. It is nothing fancy, but it serves a purpose for both of us.
The app formerly ran on Dreamhost (how to deploy rails on DH) and used MySQL. Since I decided not to attend the Notre Dame game yesterday, I had some free time, so I watched football on TV all day and worked on converting this project from MySQL to MongoDB (which is awesome).
Once I finished the conversion, which didn’t take long, I exported the MySQL database as XML using PHPMyAdmin (shutter) and then wrote an import rake task that reconnected the xml in MongoDB (which is awesome).
I have had a MongoHQ invite for a while now, but hadn’t kicked the tired so I decided now was as good a time as any. Then it occurred to me. Why use Dreamhost when Heroku has a free account and I’m already hosting my database in the sky? Why not go cloud to the max and see how things end up?
I logged in with my old Heroku account and did some reading through their amazing docs.
- I gem installed heroku.
- heroku created my app using the command line tool.
- git pushed to heroku remote.
Boom. In less than a minute my app was created and deployed on Heroku. Impressive. Now that isn’t where the story ended. Hosting on Heroku is a bit different.
The first thing I ran into was some config file issues. I found Heroku’s article on config vars and switched my app to work like that. git push and my app was deployed again.
Now I was missing gems. Back to the docs I went, this time to read about managing gems. I created my .gems manifest and git pushed again. Just like that my app was up and running in the sky.
I made a few more changes to my app over the next few hours and deployed after each one with a simple git push heroku master. Each time, I almost giggled as the normal git messages happened and then out of nowhere, Heroku stepped in and informed me that it was deploying my app and…wait for it…wait for it…that the deploy was finished.
Now that I’ve used it for a tiny app, I’m curious to see what it can do with something larger. I’ll definitely be using Heroku a lot in the future, that much I know for sure. Combined with a hosted MongoDB service, it is absolute glory. MongoDB having their GridFS file store, means that not having write access to a file system on Heroku is no big deal. You don’t even have to setup S3.
I’ll leave you with my tweet from yesterday, summing up my experience.
Created and deployed a MongoDB backed Rails app to Heroku and MongoHQ today. I have witnessed the future.
Anyone else out there using Heroku? What kind of apps have you deployed on it? What have your experiences been? Curious to hear from others.