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.
Related
Is Vagrant a good solutions for creating a Rails environment in windows?
I have a powerful Windows 8 64bit desktop. I recently did a project with RoR and fell in love with it. As I found out, installing RoR on windows is just bleh; so I created a dual boot to ubuntu. As a creative developer, I find it rather difficult to get any of the "creative" done in ubuntu because of the lack of my typical creative tools.
I read a bit about a tool called Vagrant; however, I'm still unsure if it meets my requirements: adobe suite, sublime text, git, rails, rails friendly OS(mac?/ubuntu)
Typical duties: edit an image in photoshop(windows), drop it to project assets in VM?
Typical duties: push/pull to git; ssh to VPS server?
Also, I hear you can install mac os in the VM do you think thats a good option? (because I want to try their new OS)
Installing osx in Vagrant is probably possible but it would likely be quite hard, and its not really what vagrant is designed for.
As for your other questions vagrant sounds like the perfect fit.
With Vagrant you could start up an ubuntu vm and get your rails setup going. Then you could just forward a port on your local machine to the vm and load the rails site as if it were running locally on your windows PC. A quick google gets this vagrant box that looks like it might work for you - https://github.com/amaia/rails-starter-box
To work with the site you can just share a folder between the vm and your local machine which will allow you to edit images and code with your windows apps (Photoshop, sublime) so you don't actually need to install these in the ubuntu vm at all, and can pretty much work as normal.
Git is much the same... I prefer to SSH into the vagrant box and use git on the command line in ubuntu but you can just as easily use gitbash or tortoisegit from windows in the repo folder... works just as well.
A good alternative is, https://github.com/fgrehm/ventriloquist
"Ventriloquist combines Vagrant and Docker to give developers the ability to configure portable and disposable development VMs with ease. It lowers the entry barrier of building a sane working environment without the need to learn tools like Puppet or Chef."
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 looking to run Redmine, a Ruby on Rails app, on a VPS windows box. The only thing I can really think of is running a virtual Linux machine and hosting it from there. If that is my only option, am I going to run into problems running a virtual machine inside of a virtual machine?
Also, this will be an internal app, so performance isn't my number once concern.
Windows is not the usual place to deploy production Rails apps, but there are people who do it. Mongrel was originally written to give better deployment options for Windows. As it turned out the UNIX deployment options weren't that good either. :)
Start with the Ruby One Click installer so you have a sane installation of ruby and rubygems.
From there, you install the rails gem and the gem for your database like you normally would. Most if not all of the databases have Windows gems.
Make sure to install mongrel_service to be able to control each mongrel like a normal windows service. See mongrel_rails service::install -h for details.
Once you have your mongrels set up, it's similar to a UNIX deployment. You set up a reverse proxy, such as Apache2 and you're set.
You might run into some gems (such as BackgroundRB) that will not work under Windows because they have C code that either rely on UNIX libraries or expect a UNIX-like build system at installation time. However, all of the really important Rails gems, such as Mongrel and the database adapters, have gems with pre-built binaries available, so you'll be fine.
Just grab the Bitnami RedMine stack.
Or the Bitnami Ruby on Rails stack.
Redmine ran fine on our Windows build server from the command line, sans IDE, using Mongrel and SQLite. Granted, ours isn't a VPS, but at any rate Linux isn't required for this app.
The BitNami Redmine Stack is a free, up to date Windows installer package for Redmine on Windows, Linux, OS X... give it a try. You can also download a VMWare Virtual Machine as well
I had good luck in the past with InstantRails, but I'm not sure how up-to-date it is now, as the project has changed hands several times.
You might also try ruby stack or flash rails, though I've not used either personally.
You can install SQLite and a Rails server like Mongrel on a Windows machine. I used Aptana to run a development environment, but I'm sure that there are better alternatives that don't require the IDE to be open to run. But this proves it is possible.
Try using a Rails distribution like: http://instantrails.rubyforge.org/wiki/wiki.pl
One download install for rails+ruby+mysql on Windows.
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.
I'm looking to run Redmine, a Ruby on Rails app, on a VPS windows box. The only thing I can really think of is running a virtual Linux machine and hosting it from there. If that is my only option, am I going to run into problems running a virtual machine inside of a virtual machine?
Also, this will be an internal app, so performance isn't my number once concern.
Windows is not the usual place to deploy production Rails apps, but there are people who do it. Mongrel was originally written to give better deployment options for Windows. As it turned out the UNIX deployment options weren't that good either. :)
Start with the Ruby One Click installer so you have a sane installation of ruby and rubygems.
From there, you install the rails gem and the gem for your database like you normally would. Most if not all of the databases have Windows gems.
Make sure to install mongrel_service to be able to control each mongrel like a normal windows service. See mongrel_rails service::install -h for details.
Once you have your mongrels set up, it's similar to a UNIX deployment. You set up a reverse proxy, such as Apache2 and you're set.
You might run into some gems (such as BackgroundRB) that will not work under Windows because they have C code that either rely on UNIX libraries or expect a UNIX-like build system at installation time. However, all of the really important Rails gems, such as Mongrel and the database adapters, have gems with pre-built binaries available, so you'll be fine.
Just grab the Bitnami RedMine stack.
Or the Bitnami Ruby on Rails stack.
Redmine ran fine on our Windows build server from the command line, sans IDE, using Mongrel and SQLite. Granted, ours isn't a VPS, but at any rate Linux isn't required for this app.
The BitNami Redmine Stack is a free, up to date Windows installer package for Redmine on Windows, Linux, OS X... give it a try. You can also download a VMWare Virtual Machine as well
I had good luck in the past with InstantRails, but I'm not sure how up-to-date it is now, as the project has changed hands several times.
You might also try ruby stack or flash rails, though I've not used either personally.
You can install SQLite and a Rails server like Mongrel on a Windows machine. I used Aptana to run a development environment, but I'm sure that there are better alternatives that don't require the IDE to be open to run. But this proves it is possible.
Try using a Rails distribution like: http://instantrails.rubyforge.org/wiki/wiki.pl
One download install for rails+ruby+mysql on Windows.