Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have a few different servers setup to handle our flagship product. We have a development server, a demo/staging server, and a production server. All of these run on some variant of Debian or Ubuntu.

In order to manage the creation of new clients, compress backups, list statistical data, and whatnot; I created a new Git repository (hosted on GitHub) that contains a bunch of Rake tasks. I then used rvm to install Ruby and bundler to install the necessary gems, and I use rvmsudo rake my_task to execute the tasks.

This worked really well until I had a new developer join the project. He's having to download rvm, install ruby, and install all of the proper gems to get it to work, and it's been a pain for him to figure out whether to use sudo or rvmsudo because it's setup slightly differently on each machine.

So, I'm wanting to kinda start fresh and re-install everything on every server. Ideally, I want my developers to clone the Git repo to their home directory (in case they are modifying the rake tasks themselves) and execute rake tasks using sudo OR rvmsudo. I want to standardize it so that they don't have to guess which one it is.

I remember having some trouble getting the latest versions of Ruby, Rails and Rake installed with the default apt-get package manager which is why I switched to using rvm, but it looks like that might have been a poor choice.

So, does anyone know of a great guide or have any pointers on how to setup Ruby/Rails/Rake on a server so that all developers with sudo access can execute the commands and not have to worry about installing anything?

Thanks so much!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It sounds like you are taking the big first step in standardizing your environment. Congratulations - You are in for a brief period of agony, followed by sysadmin Nirvana.
Seriously, take a month, build what you want your systems to look like for the foreseeable future, and start working on a plan to deploy that everywhere using some kind of deployment tool (puppet or chef are the most common these days).


Deployment tools and standardization solve your main problem: Everything will work the same way on every machine.

In terms of getting software onto the template machine and picking how things will work, my suggestion on a Debian-based system is to install everything using apt if you can, but if you're using deployment tools it isn't quite as critical: Your systems will be deployed, patched and maintained by the tools, so you shouldn't EVER be doing one-off patches on a live server. (Yeah, it happens sometimes, but remember that your deployment tools will stomp on those changes, so be sure that you make them the right way at some point.)

Be sure to give your developers a chance to play with the new environment (a VMWare lab is VERY nice to have) before you roll it out...

share|improve this answer
    
+1/Accepted - Thanks voretaq7. I'm currently looking into chef, and it seems to be doing what I need. I appreciate the help and pointing me in the proper direction instead of giving me a solution that would lead me down a more painful path later :-) –  Topher Fangio Aug 12 '11 at 19:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.