views:

160

answers:

3

I have created a python web virtual environment contains all django, pylons related packages. I use the host ubuntu desktop PC at home and I have ubuntu virtual machine running on windows PC laptop.

Both the operating systems are linux only. I will be using the same environment for production that will be ubuntu server.

Is it possible to store the my python virtual environment to the version control and use the same files for ubuntu desktop, laptop ubuntu desktop VM and ubuntu server in production?

A: 

You can but you don't really need 'version' control for that. You need to setup your environment. It's a one time job to setup your environment. After that you'll just use it. Why version control it?

Noufal Ibrahim
the team is setting up the same environment all the time. we have mix of laptop, desktop, staging server, production servers. So I am curios to know to setup a single environment and people will simply do a version control update than installing the packages
Gopalakrishnan Subramani
Ahd. Daniel Roseman's suggestion looks right for you then. Also, buildout is used for recreating environments like this. You might want to take a look at that.
Noufal Ibrahim
+1  A: 

You might want to look into virtualenv. This will allow you to set up your working environment, 'freeze' the list of packages that are needed to replicate it, and store that list of requirements in version control so that others can check it out and rebuild the environment with a single step.

Daniel Roseman
+1  A: 

If you already have a VM set up, you can export it so that others can copy it and start their own instance with everything installed. VirtualBox and VMWare both support VMDK images, and Xen has its own type of VM images.

That is probably not a solution for setting up servers. I like using Turnkey Linux's appliances for development/staging/deployment servers. They are solid Ubuntu servers preconfigured for a particular application: Django, Rails, LAMP, etc. They come as Ubuntu LiveCD ISO files (for installation) or as virtual machine VMDK packages, and can be deployed to Amazon EC2. You might still have to customize that environment further prior to deploying and testing your code, but it can get you further along than a bare Linux server.

stw_dev
thanks for suggestion. this will suite us to create alike configuration.
Gopalakrishnan Subramani