Is it worth it to setup chef with vagrant to develop rails apps in windows (interrested in jruby) and then deploy it to cloud? I am trying to figure out how to setup a nice development environment for windows (windows 7 64 bit) but I am a bit lost.
Vagrant is a good tool to replicate production environments on your local machine. It lets you configure one or many VMs to simulate load balancers, web servers, and production data storage systems all on your computer.
Some people find it simpler to install Vagrant as a development environment as well. You get a shared folder that allows you to code on your host OS and then "deploy" immediately to a simulated production environment and test on your machine. However, it's not 100% necessary and some developers dislike having to fire up a VM to start coding.
I use a combination of both. I develop locally and test changes locally, and then I use Vagrant to fire up VMs and test my code in a simulated environment.
Related
I have been learning about AWS to deploy my rails application. It seems AWS Beanstalk is the easiest one I can use for my deployment. It even provides CLI tool so that I may be able to deploy easily as I do in Heroku.
But what I haven't still figured out is whether my development server's configuration should be the same with the production server which is a AWS Beanstalk stack.
For example, is it possible to use a different OS between the development server and production server? Ruby, MySQL, Web server and all other stuffs should be the same?
Using identical configuration (especially operating systems and software) isn't a hard requirement, it is a recommendation.
It might often happen that some code doesn't run on your production environment but works perfectly on your development machine because of some underlying incompatibility in your code or your libraries with your production stack. This could be avoided if you used the same software on your dev machine.
As for your question, it is possible to use different OSes or software versions on your dev/prod servers, but this is highly unrecommended.
I am working on an open source project and there is an issue where an upload error only seems to occur on the production side that is running apache and unicorn.
Due to privacy issues and risks, I am unable to mess around in the actual production side (such as creating a temp id for myself with various privileges.
Is there anyway that I can quickly create a VM with such setup in my own computer that would mirror the live site?
The site is running in RoR 4, latest unicorn, and latest stable version of apache.
There are a couple of ways you can be able to accomplish this. You can use vagrant and also with the rising popularity of Docker containers, you can easily model production environment on your computer. Since you indicated a faster way to get the VM up and running, I would recommend using railsbox.io. Its amazing and it saves you a lot of time. According to their webiste -
Fast and easy Ruby on Rails virtual machines. Streamline your
development workflow in no time by creating production-like virtual
machine with your development environment. Try this extremely simple
to use VM configuration tool to create new Ruby on Rails server using
vagrant and ansible.
The app helps you setup a VM with ease.
From the beginning, I am a Windows master. I started with MS-DOS. I put up Windows 2.1 and every Windows since. I have 10 different Windows boxes running in my house right now, from Windows 7 Ultimate to varied flavors of Windows Servers. I haven't done Windows 8 and don't want to go there.
I have UNIX experience with both servers and varied software, but it hasn't been my preferred environment. However, I guess I am converting. I've tried to pretend to run UNIX under Windows using Cygwin and MSYS. My purpose is to build a development environment. Both have failed me. I have spent more time trying to fix a series of technical issues than I have developing. That is unacceptable.
My Ruby on Rails development environment is by far my highest current priority. I have websites to build, right now.
At this point, I have two options. One is to find a UNIX development environment in a cloud. The other is to convert one of my many machines to a true UNIX system. So, I need advice. I don't really want to build and babysit a system. The idea of a cloud-based development environment is very interesting, with the caveat that I don't chase it down another rat hole like I have with Cygwin and MSYS.
Here are the questions. Is there a solid cloud-based Ruby on Rails friendly development environment out there? Failing that, should I put up an Ubuntu-based system. If I go there, do I convert a workstation or a server?
Thanks...
I highly recommend Vagrant. I use this to do development on my Windows systems.
As you found out, Windows is terrible for RoR development. Your best option would be to use a VM like VirtualBox to run a Linux/Unix instance. There are other VM options, but VirtualBox is free.
Failing that, just convert once of your boxes to Linux/Unix. For development it does not matter one bit if it is a workstation or a server.
Mac OSX
The unofficial standard for RoR production is Linux, but for development it is Mac OSX. There has been a big migration of developers to the Apple platform that has been going on for many years now.
It gives you the best of both worlds: it is Unix underneath but it's also a commercial platform, a polished UI, and an available software ecosystem.
Yes, it's expensive, but people should ask themselves, why are people willing to pay so much? If you can afford 10 boxes for Windows, how about finding $ for one Mac? Then, you will have not just a workable RoR environment, but the best.
Or go VM
But if you don't take that advice, you may want to install a Hypervisor like Xen or XenServer for free, and then you can run both Windows and Linux on the same machine. This is slightly different than running a VM under Windows.
Externally, I have received a recommendation for EngineYard.com as an outstanding RoR environment and will ultimately consider it as my primary development/migration/production environment.
I have a working Debian system now and am building it out as a local RoR environment. It just seems to be right for a serious RoR development environment. I will go there as soon as it is fully built out because RoR is just meant for UNIX.
However, at least temporarily, I have found that RubyStack is a seriously usable Windows RoR development environment. It is 100% usable as a standalone system that doesn't require UNIX-style environments shoehorned onto Windows. Trying to run UNIX on Windows was a constant source of frustration, so this meets my immediate needs.
I am studying ruby on rails, but I am stopped in the chapter of deploying with capistrano,
I would like to know if I can do practice with capistrano on only my pc with windows 7?
I dont know well what is deploying, seems to be things about to use multiple servers on diferent places, so, can I practice on only a pc?(my pc with windows 7)
I would like if you have any tutorial or idea about this?
You can get micro instance on amazon for free for 1 year, and then you can practice not with only deploying, but also testing your applications in productions environment.
Also you can install other system into virtualpc(or similar) make proper routing to inside, and then after you configure environment, you could try to deploy. However that will not be easy
Is only my pc with windows 7 going to be valid if you have a Linux on a virtual machine?
If yes - You can set up Virtual machine with Vagrant described in Virtual Machines with Vagrant railscast. Install one of many operating systems available and start deploying to your new "virtual server" with capistrano.
I'm a .NET developer and I've set up a git repository and teamcity on a windows server machine. I'm also starting to use/learn ruby and I'll be wanting to setup some CI for ruby on rails as well.
I was wondering what the best setup for this would be. I've only one machine I can use as a server.
Everything on Windows Server - I expect this will make things difficult for the ruby CI. I'm developing ruby on an Ubuntu VM inside windows 7.
Everything on Ubuntu (or other Linux) server - Big problems for .Net as I mono isn't up to date with some of the newest .net tech I use.
A windows server hosting a virtual Ubuntu server. Git and Ruby CI on the Ubuntu server and teamcity on the windows server.
The last choice is my favourite at the moment. But before investing lots of time in setting it all up I was wondering what others may have done in this situation.
I'd also like to start with some continuous deployment as well.
TeamCity will run rake tasks just fine. In fact, we use a rake task to package up our .net solution and deploy it. If the deployment is not too complex, sticking with a rake task on a your Windows server is probably fine.
For a more complex scenario you'd probably want a *nix based machine using Capistrano. From what I've read using Capistrano on a Windows machine is very difficult, but I haven't tried it myself.
I'm running Ubuntu inside a VirtualBox on a Windows7 Host and it works perfectly. You don't need windows server os. I skipped all the .NET-stuff, so I don't have any experience in running VisualStudio and VirtualBox parallel on the same box, but in this scenario you should have at least(!) 4 GB RAM and SSD.