1

I have an Azure subscription active and I want to migrate my rails app from Heroku to Azure, but it really overwhelms me and I don't really know how to do it.

What I want is the following:

  • Move my rails app (REST Webservice API + static homepage) from Heroku to Azure.
  • Use postgreSQL database (though I'm open to others, that's the one I was using in Heroku).
  • Use continuous deployment with git. In heroku I can just "git push heroku master" and it automagically stops, updates and restart the server. That's what I want to accomplish in Azure as well.

After getting familiar with Azure portal, a lot of doubts come to mind.

  • Do I need to create a Virtual Machine with Ubuntu Server installed and install there rails, ruby, git etc? (Already done)

  • Do I need to manually pull the newest code from master repository from the server console and relaunch the server every time I want to update the server?

  • Do I need to create virtual networks?

  • Do I need to create a SQL server in Azure or can I just use gem postgresql in the VM as I've always done?

Thank you beforehand, I am really a newbie to Azure. Definitely much more complex than Heroku. I would appreciate if someone could point me in the right direction as to what kind of infrastructure should I use and how to set it up.

Cheers!

1 Answer 1

3

Unfortunately Ruby on Rails is not supported as an Azure Webapp platform but you do have option to create your VM's Heroku is a PAAS Platform while Azure is a PAAS and IAAS platform, but the Azure PAAS doesn't yet support the ruby, the Postgres also is not yet available as a PAAS service.

•Do I need to create a Virtual Machine with Ubuntu Server installed and install there rails, ruby, git etc? (Already done) Answer - That's the right move.

•Do I need to manually pull the newest code from master repository from the server console and relaunch the server every time I want to update the server? Answer - Use any Continuous deployment tool or use Git Hooks - http://do.co/1PTwVwo follow this link to setup git hooks for your VM.

•Do I need to create virtual networks? Ans. Yes you should, infact you will have it out of box if you use the same resource group, same location and everything, it'll be made for you out of box.

•Do I need to create a SQL server in Azure or can I just use gem postgresql in the VM as I've always done? Ans. if you can do with SQL server nothing like it because its available as a PAAS service, but for Postgres you'll have to create your own VM, optionally you can use an ARM template to deploy a full blown postgres master-slave replication https://github.com/Azure/azure-quickstart-templates/tree/master/postgresql-on-ubuntu

Connect with me at twitter to discuss further @brijrajsingh

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much Brij! You were extremely helpful. I will follow you on Twitter and get started with the implementation. I do not fully understand yet how the templates work but I will look into it. Thank you so much!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.