I need to make a Rail 3 app "SaaS"-fied. I know there are different opinions on multi-tenanncy / data-separation etc. Currently I'm going with "total data separation" option where on each sign-up, I launch a new Heroku app. I've a launch page which is at mydomain.com and www.mydomain.com. I also have CNAME entry (in Zerigo) *.mydomain.com pointing to proxy.heroku.com (Heroku Mesh). I've gone through this link as well - Ruby on Rails: how to design a SaaS infrastructure?. My requirement is almost identical to this. I understand that following things should be done when a new user signs-up for the SaaS -
- select app name: app-name.mydomain.com
- username/password/role (optional) and pricing option
- Then deploy code to a new Heroku instance (and may be simplify repetitive Heroku tasks by https://github.com/darkbushido/heroku-rails-saas)
- Add Heroku domain:add .mydomain.com
- Use Heroku config:add to add the choices from step #2
Everything looks fine. But the problem is, can we automate the process? I've seen couple of relevant gems in http://rubydoc.info/gems/s but not sure about them. Any suggestion will be awesome.
Thanks