Experienced web developers, what's the learning curve like on heroku? [closed] - ruby-on-rails

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I just began switching from spring development to ruby on rails. I wanted to know from those who have used it before, what's the learning curve, if any, on a rails application being deployed for heroku?
Are there any special needs for heroku deployment?
What are the major advantages and disadvantages of heroku?
Thanks in advance :D

Heroku is the easiest possible Rails deployment. It's a fully managed black-box solution for your app with excellent documentation, and they are consistently improving it with an eye to usability. Once you have a working development version of your app, it's a very short hop to being up and running on Heroku. See the Quickstart and Getting Started with Ruby articles for the specifics.
The cost of this ease-of-use is a certain amount of inflexibility. They do a good job of making things open-ended, but a one-size-fits-all approach to hosting architecture inevitably will lead to issues. If you just have a small to medium web app with a standard relational database and common load profile this is not much of a problem. If you need a more custom stack with various additional services (eg. redis, sphinx, rabbitmq, etc) then you'll likely be getting into third-party addons. All of these hosted solutions and Heroku itself charge a premium over the Amazon Web Services that they are built on, which in turn charges a premium over raw hardware / colocation costs of running your own servers. If your site scales very large not only will you be paying a huge premium, but the assumptions that hosted service providers make for the general case will inevitably not fit your particular case as well as a custom-tuned cluster. This is why all truly massive companies like Google, Facebook, Yahoo all run their own data centers, because at that scale having a cadre of dedicated $200k/year systems engineers designing and maintaining your infrastructure pays for itself for many times over simply from the savings of moving away from commodity solutions.
But at small scale, especially during the early rapid iteration of a product, using something like Heroku means you can focus entirely on your application and have a minimum of worry about infrastructure. One exception is if you have a lot of Linux sysadmin chops, then Heroku may not be worth the cost even early, and in that case you might be more comfortable with something like Engine Yard that still provides you with a full Rails stack out of the box, but keeps you closer to the metal.
In any case though, Heroku is a great place to start for a Rails beginner. It's free to get started, and there's no reason you can't do a cost assessment and migrate away later when you have more experience.

The answer by gtd is great, just to add a bit about the problems I have ran into with heroku:
When I started with Ruby on Rails and Heroku about a year ago, the thing that gave me most problems was that by default on my dev machine, Rails used SQLite, and on Heroku the default is postgreSQL.
It usually doesn't give much trouble but certain things such as GROUP BY work differently which led me to lots of frustration when certain things would work on my dev machine and not on Heroku. I would suggest you install a postgreSQL server on your dev machine, for non trivial apps that you are planning to deploy on Heroku.
There are a couple other things that you can't do on Heroku and you can on a VPS, I had problems when working with a payment provider which required me to have a static ip, because Heroku is a cloud service it couldn't be done, and I had to use a proxy to connect with the provider.
Also there are a couple of gems (very few) which you can't install there, and you can't install binaries which some gems depend on, although it's never been a problem for me, bear that in mind.
Other than that couple of gotchas, Heroku is the easiest place to start deploying your apps.

Related

Any recommended Rails Deployment tutorial book? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm confused by Rails Deployment.
I followed this guide(https://github.com/rocodev/guides/wiki/setup-production-development) to setup environment on my server.
I have done all the installation proccess, but it doesn't work!!
When I run 'cap deploy:setup', it asked me to type password, and I typed, but it said permission denied.
I couldn't find out what the problem is, and I can't clearly know some parts of this guide.
Are there any resources(maybe a book) can give me a robust understanding about Rails Deployment?
Thank you.
There are a couple of books on Rails deployment practices:
Deploying Rails: Automate, Deploy, Scale, Maintain, and Sleep at Night published by the PragProgs. Written in 2012, and focusing on Rails 3.x, but should still be mostly up to date (really nothing much has changed in the space in the last 2 years). (Or, the old versions of the tools aren't super broken and still widely used).
Reliably Deploying Rails Applications, published via LeanPub. 80% done as of this writing, and does incorporate the bleeding edge tools.
I haven't read the latter book, but I have read the former book and liked it reasonably well.
I don't think you need to read a book on rails deployment for fixing production issues. Once you complete a book, It's not mean you able to deploy your app seamless manner. Still issue will occur and you will run to Google. We always leant form our mistakes and by fixing them.
I would suggest have a look to small blogs and tutorial.
Deploying to a VPS
HOW TO DEPLOY RAILS APPLICATION TO VPS
Setup A Ubuntu VPS For Hosting Ruby On Rails Applications
Deploying Rails to Dreamhost VPS
Capistrano Tasks
Capistrano Tasks (revised)
If you really want a deep understanding of rails development. Go ahead with below book.
Deploying Rails: Automate, Deploy, Scale, Maintain, and Sleep at Night
I started with these two RailsCasts:
Manual setup of a rails environment on a VPS: http://railscasts.com/episodes/335-deploying-to-a-vps
Automating the above with capistrano: http://railscasts.com/episodes/337-capistrano-recipes
There's a lot of other tools / options, but this is a pretty common (simple) way of managing and deploying servers. I use this basic setup for managing 2 different clustered environments, with 3 servers each (one of them is not rails) + an NFS between them - works well.
BUT, if you can, I'd really look at PaaS (like Heroku) options. I also run a more vanilla rails web app on this platform and it saves me a lot of time in server maintenance, management, and scripting.

Simple CI for Rails [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking for a continuous integration server that:
Allows me to simply add my clients Rails projects as builds, checking out from Github on a new commit. These are NOT public projects.
Allows me to notify results into a campfire room.
Allows me to install services that I might need such as Postgres or Redis, so probably not anything that's hosted and run by someone else.
Is easily hosted
Are there any solutions out there that are suited to this? I've looked at Hudson and Teamcity, but was wondering what else there was out there.
Well, as long as we're spamming our own products, why don't I add mine :)
CircleCI does everything you said and more.
Security, all your databases, github, heroku and campfire+hipchat integration, automatic parallelism, incredibly fast builds, and can be set up in moments.
If you're interested in some of the rationale, check out the StackOverflow podcast where Joel and I talk about it :)
Checkout TestPilot CI
It supports private repos in a high security sandbox environment, automatically connects to Github to trigger builds when code changes, notifies by Campfire or email, and has an open source build environment (which already includes the most common dependencies, like Redis, Mongo, Postgres, Riak, Mysql, Sqlite3, RabbitMQ etc.)
I'm one of the developers behind it and we are constantly developing new features based on customer demand, so we'd love to hear what you think of it.
Take a look at Travis CI
You should definitely check out Tddium. Sign up for a free 14-day trial: there's no need to wait for a beta invitation.
It's fully hosted in sandboxed VM's, supports private Git repositories, and does CI through git hooks. Campfire integration is included.
Tddium currently supports:
Full Heroku integration, including a Heroku-approved addon
RSpec, Cucumber, Spinach, Test::Unit, and Jasmine (via Webkit)
MySQL, Postgres, Mongo
Redis, Memcached, Riak
Solr and ThinkingSphinx
Capybara, Selenium, WebKit, Culerity
Ruby 1.9.3, 1.9.2, 1.8.7, and REE
CouchDB and RabbitMQ

Suggestions for the best Rails collaborative development stack? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Looking for some suggestions from the community for development stacks for collaborative environments. Could you share what you have and what has worked for you or your team?
The following is probably too verbose for some and an expression of just some rambling thoughts I've had about my particular scenario as I'm working with a hatchling dev group. SO, if you read it 1UP for you, otherwise, please just feel free to just share your thoughts re: the first question and what's worked for your team.
I have a situation where myself and a couple other developers are working together and I'd like to set up the "best" dev environment possible for Ruby on Rails development. At the moment I use git and some of the usually accepted best practices for development, however the other guys are new and not terribly familiar with the shell, git, etc. They're more from a php and monolithic environment.
I do have a central linux server that has been used hitherto for LAMP based dev for them. I can retool it to anything I'd like it to be as I'm quite adept and experienced at Unix system and network admin.
Could someone please suggest what may work well in this scenario? Again, ultimately we need to do collaborative development that has the lowest learning curve. I'll be the only one deploying to Heroku until I feel comfortable with their experience.
I would like to put something together that can get us all up to speed quickly in a matter of a day vs a longer learning curve and then allow them to grow into the shell and so forth over the next couple weeks.
What I was thinking was more of a shared SMB (mixed Windows and Mac workstations) and SFTP unified projects folder that has either apache virtual hosts for each project or thin rack. I'd continue to use my methods, but this could provide the flexibility for them to grow into this and be able to restart httpd or thin as per need.
Am I on the proverbial right track or has someone seen a better alternative? A lot of things have crossed my mind such as Gitorious (since we'll have a lot of small projects needing to be tracked and an enormous GitHub account is not feasible), Heroku, OpenShift and a lot of other things, but I have enough uncertainty that I'd like to get some input from the community as to the right mix for great collaborative agile development.
I have an answer but I think you have conflicting requirements: i.e. lowest learning curve vs low/free cost.
You say that GitHub is not feasible but it does offer unparalleled features for novice users. They can see commits on a website instead of on the commandline, can even edit files right in the browser (since yesterday, uses Ace) and gain insight into the branching/merging process.
Another paid option is http://cloud9ide.com/ which is also web-based.
I use my own development server as well but only use it for experienced people who need no hand-holding. If I were to let everyone on there the amount of support would consume my entire day.
It is my opinion that doing Rails development people should adopt the best practices in the field. See it like this: at least you won't burden them with learning Subversion or --eek-- CVS. Just seeing the commits on GitHub and having a discussion right after puzzling pieces of code is worth the money.

Heroku vs DotCloud vs Duostack vs other cloud/PaaS providers (Rails and non-Rails)?

We have a very simple function (We look something up from a third party database and return an answer. It's literally five lines of code.) We would like to offload this task from our main server because we expect a high volume of traffic for this one function and would like to optimize it.
We are thinking about testing the promise of many cloud/PaaS providers, where they handle scaling and performance responsibilities.
We're most interested in Rails environments, but are curious to hear experiences from others about any company in the space.
Here are the PaaS companies we found that supports Rails:
1) Heroku
2) DotCloud
3) Duostack
Questions:
1) Do you know of other Rails-specific companies? Also feel free to list non-Rails companies since we're interested in following other companies in case they eventually provide Rails support.
2) How has your experience been with these companies?
Foreword and disclaimer: I work for DotCloud; so the following might be biased. You've been warned.
DotCloud could be interesting for you if you like the following features:
run something else than Ruby (what about some Django or Pylons code talking with your SQL DB? Or even some PHP blog like WordPress or Drupal, using the same user authentication database?)
experiment with databases like Redis or MongoDB, or background ruby workers, without paying for add-ons
SSH access, crontab access (without requiring an add-on)
cheaper workers (I didn't come up with this one; some of our users coming from the Heroku world told us that workers were insanely expensive there)
Duostack is indeed very nice if you want to mix specifically Rails and Node.js. I've been told that they had awesome auto-configuration facilities.
Finally, if you only plan to do Rails and nothing else, ever, you might as well stick with Heroku since they've been in that business for a while, and are probably more mature than the first two of the batch.
Shameless plug: DotCloud is offering a beta test drive; so if you want to see what it looks like, just subscribe to the beta and you will be quickly enough be able to see for yourself. Heroku has a free tier as well.
You could add EngineYard in the mix - but i'd be inclined to use Heroku as my first choice, Dotcloud second (it's a newish product, and is very good but still in development)
If you want more control over your app/servers or want to run it on any cloud or your own infrastructure without having to download/deploy anything, you can try Cloud 66 (www.cloud66.com)
Disclaimer: I work for Cloud 66
A lot has changed on the scene since this question was asked. We recently looked into these services and settled on Heroku, but even more recently decided to continue managing my own deployments directly on EC2. Here are some points not mentioned in the other answers.
Heroku
Now supports much more than just ruby
Has really great-looking support for PostgreSQL
Uses LXC for process containers, like DotCloud
DotCloud
Is now Docker, and is putting a lot of manpower into developing docker.io
Doesn't have a free tier any more
I'm not sure if DotCloud is using Docker internally or not, since the docs say explicitly it isn't production-ready yet.
Our decision to stick with plain EC2 was motivated by the fact that it's cheaper and affords a lot more flexibility. For example, we use local-only http servers behind our public server to do some of our request processing, which doesn't really fit into the PaaS models out there. We would have had to reimplement all our back-end components as redis workers, and pay for them as additional dynos. The fact that Amazon RDS now supports PostgreSQL was also a compelling factor. Incidentally, Amazon has a full-stack PaaS offering as well, Elastic Beanstalk.
Just stumbled upon the question. There are similar ones around here. The problem is also: The PaaS scene is changing very quickly. New vendors are popping in every week or so.
Nowadays OpenShift from Red Hat might also be mentioned here as a Ruby PaaS.
OFFTOPIC + shameless plug: I have compiled a list of PHP PaaS here: http://blog.fortrabbit.com/comparing-cloud-hosting-platforms/

Is Heroku worth it? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm trying to decide between Heroku and Engineyard.
Heroku seems so much better but they charge for everything and their prices are crazy!
Why one should use Heroku over EY or vice versa?
Heroku makes setup and launching of an app super-simple. You will be dependent to some degree on versions that Heroku supports (for instance, I heard today of a bundler versioning issue).
One thing to take into account with any "managed full-stack" solution like Heroku or EY is cost. You don't have to hire an ops person or have ops expertise, but you're still paying. Storage is where things get really expensive. Crank up your DB to a more than a few GB and watch the price go up.
We have in-house ops (was me doing it while coding, now a dedicated person) and run on Joyent. A big cost savings was having a few master-slave DBs and sharing them among a few dozen applications. We essentially have 100 Facebook apps running on Joyent at the same cost as 10 apps on Heroku. But this doesn't take into account the ops salary/time.
Everyone's needs are different, but the great thing is that its easy to experiment with these cloud deployment tools in quick fashion, and you will find that they each have their own strengths that you can leverage as you need.
What is most valuable to me, and my smaller clients, is to be able to experiment and get end-user feedback quickly. I have startup clients that want to be able to push out new ideas and test them quickly, deploy different combinations of ideas to different markets, get customer feedback, and keep moving forward. Launch a facebook app, a test server for an API integration client, a lightweight 'freemium' version of a product, etc. As traffic picks up, we make changes to scale up, and the increase in cost is never out of bounds (eg. our hosting costs are still well under the increase in value/revenue/marketing juice, etc).
EngineYard lets you play around with 500hrs for free, and you can easily turn it off when you are not using it, to stretch the 500hrs out. You can deploy your app quickly, deploy a CI server (that updates the app on every successful build), create a backup of your app or 'staging' server and see how it goes.
Amazon will give you 750hrs per month for free, for a year, if you are a new AWS customer. You can use this for a super fast CI server, hard-core image processing, batch reporting, whatever.
Personally I happen to use Heroku the most, as it just seems to work the best for my needs. I can put together a new application with full monitoring, backup, analytics, email, etc really fast, and feel confident in how to manage my setup (and confident that I can bring another person on board, and their learning curve will be pretty easy). As a freelancer, my use of Heroku has brought my setup time down to almost nothing, so I'm able to focus my time on understanding the business, and developing a great product. I'm not saying that can't be done on other platforms, I'm just saying heroku is working great for me in that way.
I do have one app that processes Voip data over UDP, so I'll need to figure out if I prefer amazon or engineyard for that (heroku won't let you open a UDP port, as far as I know).
I recently put together a presentation on these tools, and how I use them. (it was for newer developers, so it may be too basic for this audience, but there is a list of pros/cons that others may find useful)
Also, I think this conversation does belong here, and not necessarily on a webmasters forum, because the choice of hosting platform will influence your development capabilities and architecture, and the people making the decision are developers, not 'webmasters' or systems people.
I'd vote to use EngineYard over Heroku. Although you can probably deploy a large scale application on Heroku, there's a lot of lock-in you'll have to endure and the pricing can become crippling at higher levels of use.
EngineYard does provide application-level support, too, which is a fair bit better than what Heroku does.
If you're making a quick hobby application or simple demo site, Heroku is great for launching small, simple instances. If you're building a real application where it will need to scale, use EngineYard.
We have been running our platform on Heroku for about 9 months, and I am very satisfied.
I think the biggest complaint that most people have is that it gets "expensive" when your site gets large or high traffic. Personally, I think it is much more effective to focus on growing your business or improving your value proposition than maintaining servers or figuring how to get Rails working. (It is no easy task unless you want to spend a lot of time figuring it out). I would much rather pay Heroku to manage the servers for me than hire someone.
Here's what's great about Heroku:
Pretty easy to use. I didn't know anything about Rails when I got started, and Heroku was simple to get working.
Good documentation for most things.
OK tech support.
Extremely cost effective when you are small.
Heroku is pretty smart, and I am sure they are going to read this, so here's what can be improved:
Tech support: Typically you ask a question and they respond, and that begs a new obvious question. The tech support person should answer the next question I am going to ask. For example, I might ask how to do something, and then they tell me a certain way of doing it. Now I need information about it. Supply all the information in the first response, so I don't have to ask, "How do I use it?"
Documentation: Everyone has the same questions. The documentation could be greatly improved by adding all the questions and answers that I have asked, let alone the tens of thousands of other customers.
Logs: The free logging options are useless, and $100/month for real logs is silly. Our solution has been http://papertrailapp.com which has been outstanding. Use it.
I might as well throw my opinion in here since I have "tried" to use EngineYard and "successfully" use Heroku. While I think both are potentially good choices, I found deploying to Heroku much easier. The ala-carte pricing for Heroku add-ons may add expense, but it also gives you the opportunity to add functionality immediately to your app. The largest expense for our app is the actual web dynos, followed by the database. Heroku has a great selection of add-ons, many of which are free or low cost.
EngineYard also seems like a great company but I think they "hold your hand" a little less than Heroku. For my company, the benefits of Heroku outweighed the cost issue. The read-only filesystem which is a platform feature of Heroku also forces you to learn some new tricks.
I now have several apps (small to medium) on Heroku and happily have my assets served up from s3.
In the end, I would encourage you to try them both. EngineYard offers a 500 hour trial (though that is computing hours, not necessarily real-time hours) and Heroku let's you get started right away for pretty much free.
PS: When selecting add-ons consider your choice carefully, just like when you choose gems for your project. I have experienced an add-on that I was using, simply flaming out and had to scramble to replace that functionality. What was it? Progstr-Filer, which I was using for file uploads. That was a lesson learned.
It depends of the condition. On some case, it's highly expensive
Here we can get a 24 GB o RAM dedicated server for 99 euros.
I can have it set up an running my rail app in less than half an hour, with a mongodb database, as many runner that I want, etc...
Additionally, I can add "small" other project (the ones that costs between 15$ and 35$ monthly at Heroku)
If your business require huge amount of data and processing power, my advice is to use a dedicated hosting and spend the time in managing and monitoring your app.

Resources