开发者

python virtual environment on source control

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 productio开发者_如何学Gon 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?


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.


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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜