Heres the problem. I use around three different machines for development. My partner is using two. We have to go through the same freaking set up procedure on all five machines to get to work.
继承人这个问题。我使用大约三台不同的机器进行开发。我的伙伴正在使用两个。我们必须在所有五台机器上进行相同的设置程序才能开始工作。
Working with a php project here, so: Install and configure, PDT, a php debugger, and some version of XAMPP. Then possible install an svn client, and any other tools.
在这里使用php项目,所以:安装和配置,PDT,php调试器和某些版本的XAMPP。然后可以安装一个svn客户端,以及任何其他工具。
Again, to each of the five machines.
再次,对五台机器中的每台机器。
What if, instead, we did all of this once, in a virtual machine that is set up with the same stack, same versions, as the production server. Then each of us could grab a copy of the VM image, run that image on each of the five machines and do all of our development in that VM. Put Eclipse, apache, mysql, the works, all in that vm.
相反,如果我们在使用相同堆栈,相同版本和生产服务器设置的虚拟机中完成所有这一切,那该怎么办呢?然后我们每个人都可以获取VM映像的副本,在五台计算机中的每台计算机上运行该映像,并在该VM中完成所有开发。把Eclipse,apache,mysql,作品,都放在那个vm中。
The only negative of this approach, and please correct me on the only part, is performance. Is it really that big of an issue though? The slowest machine out of the five is a Samsung NC10 powered by an Intel Atom 1.6 ghz processor.
这种方法的唯一不利之处,请在唯一的部分纠正我,就是表现。这真的是一个大问题吗?五台中最慢的机器是由Intel Atom 1.6 ghz处理器驱动的三星NC10。
Do you think this is possible and practically usable? Or am I crazy?
你认为这是可行的和实际可用的吗?还是我疯了?
8 个解决方案
#1
I use a VM for development (running on my laptop) and have never had performance problems. Another approach that you could take would be to image the drive in the state that you want. Use Acronis or Ghost to re-image each machine when you need to. Only takes about 5-10 minutes to restore an image on any modern PC.
我使用VM进行开发(在我的笔记本电脑上运行)并且从未遇到过性能问题。您可以采取的另一种方法是将驱动器映像到您想要的状态。使用Acronis或Ghost在需要时重新映像每台计算机。在任何现代PC上恢复图像只需要大约5-10分钟。
#2
I use a VM for all my "work" as it keeps it away from my "play". This set up allows me to use the office VPN without exposing my whole machine to the office environment (which I trust about as much as the internets. ;-) Also I don't have to worry about messing up my development environment by trying games or other software. My work VM is currently running inside VirtualBox but I have used VMWare in the past. I have only noticed performance issues when using graphic intensive programs like Webex or the Terminal Server Client.
我使用VM来完成我的所有“工作”,因为它使它远离我的“游戏”。这个设置允许我使用办公室VPN,而不会将我的整个机器暴露在办公室环境中(我信任它和互联网一样多。;-)而且我不必担心通过尝试游戏搞乱我的开发环境或其他软件。我的工作VM当前在VirtualBox中运行,但我过去使用过VMWare。在使用Webex或终端服务器客户端等图形密集型程序时,我只注意到性能问题。
#3
It can certainly be done. What turns me off is the size of the VM image, which would normally be several GBs. Having it on a network share means it can take longer to transfer then your current setup process takes. I guess an external hard drive would be the easiest way to move it around.
当然可以做到。让我失望的是VM映像的大小,通常为几GB。将它放在网络共享上意味着它可能需要更长的时间来传输然后您当前的设置过程需要。我猜外部硬盘驱动器是移动它的最简单方法。
Performance wouldn't be an issue with any web development.
任何Web开发都不会出现性能问题。
I have to ask why your current machines need to be "re-imaged" each time you sit down for work?
我不得不问为什么每次坐下来工作时你的当前机器都需要“重新成像”?
#4
If you're using Windows you'll probably want to use SYSPREP on the master image so that the 'mini-setup' runs when you boot up the virtual machines for the first time.
如果您使用的是Windows,则可能需要在主映像上使用SYSPREP,以便在首次启动虚拟机时运行“迷你设置”。
Otherwise in terms of Windows' point of view, the machines have the exact same SID, hostname and other things - running multiple machines with the same SID on the same network can cause tons of headaches. Even more if you want them to communicate with each other.
否则,从Windows的角度来看,这些机器具有完全相同的SID,主机名和其他东西 - 在同一网络上运行具有相同SID的多台机器可能会导致大量的麻烦。如果您希望他们彼此沟通,甚至更多。
#5
I've run websphere for zSeries on a vmware virtual machine with no problem and websphere is more resource intensive then any PHP stack. I find that having a multi core machine or at least hyper threading makes it run a lot faster.
我在vmware虚拟机上运行websphere for zSeries没有问题,而且websphere比任何PHP堆栈都更加耗费资源。我发现拥有一台多核机器或至少具有超线程功能可以让它运行得更快。
#6
With vmware, disk operations are slower. For PHP development I doubt it would be a problem, but you'd definitely notice it if you are compiling a large C++ project. There is also Sun's VirtualBox which is free, and the latest version is rather nice (but I haven't looked at how slow disk operations are yet).
使用vmware,磁盘操作速度较慢。对于PHP开发我怀疑它会是一个问题,但如果你正在编译一个大的C ++项目,你肯定会注意到它。 Sun的VirtualBox也是免费的,最新版本相当不错(但我还没看过磁盘操作速度有多慢)。
#7
I am using that idea in practice. Virtual machines are generally great for development.
我在实践中使用这个想法。虚拟机通常非常适合开发。
- To run on multiple operating systems and multiple separate development environments.
- Preserver older development environments for later support.
- Can be easily backed up, when hard drive crashes no need to start from beginning.
- Can be copied from developer to another, so everyone don't have to do tedious installations and configurations.
在多个操作系统和多个单独的开发环境中运行。
保留旧的开发环境以供以后支持。
可以轻松备份,当硬盘崩溃时无需从头开始。
可以从开发人员复制到另一个,因此每个人都不必进行繁琐的安装和配置。
Down sides are:
下方是:
- Virtual machines are slower, you need more powerful computers than you would need otherwise. I would recommend having at least 4 G of ram, but preferably more like 16, fast multi core processors and fast hard drives.
- Copying Windows OS virtual machines, each used copy of virtual machine should have it's own product key. When you make a copy, it needs to be registered with new product key.
虚拟机速度较慢,您需要比其他方式更强大的计算机。我建议至少有4 G的ram,但最好更像16,快速多核处理器和快速硬盘。
复制Windows操作系统虚拟机,每个使用过的虚拟机副本都应该拥有自己的产品密钥。制作副本时,需要使用新的产品密钥进行注册。
#8
Did you think about a software configuration manager like ansible, chef or puppet? With such software automation of such tasks is very easy! It can even create fresh vm and then configure it.
您是否考虑过像ansible,chef或puppet这样的软件配置管理器?有了这样的软件,这类任务的自动化非常容易!它甚至可以创建新的虚拟机然后配置它。
#1
I use a VM for development (running on my laptop) and have never had performance problems. Another approach that you could take would be to image the drive in the state that you want. Use Acronis or Ghost to re-image each machine when you need to. Only takes about 5-10 minutes to restore an image on any modern PC.
我使用VM进行开发(在我的笔记本电脑上运行)并且从未遇到过性能问题。您可以采取的另一种方法是将驱动器映像到您想要的状态。使用Acronis或Ghost在需要时重新映像每台计算机。在任何现代PC上恢复图像只需要大约5-10分钟。
#2
I use a VM for all my "work" as it keeps it away from my "play". This set up allows me to use the office VPN without exposing my whole machine to the office environment (which I trust about as much as the internets. ;-) Also I don't have to worry about messing up my development environment by trying games or other software. My work VM is currently running inside VirtualBox but I have used VMWare in the past. I have only noticed performance issues when using graphic intensive programs like Webex or the Terminal Server Client.
我使用VM来完成我的所有“工作”,因为它使它远离我的“游戏”。这个设置允许我使用办公室VPN,而不会将我的整个机器暴露在办公室环境中(我信任它和互联网一样多。;-)而且我不必担心通过尝试游戏搞乱我的开发环境或其他软件。我的工作VM当前在VirtualBox中运行,但我过去使用过VMWare。在使用Webex或终端服务器客户端等图形密集型程序时,我只注意到性能问题。
#3
It can certainly be done. What turns me off is the size of the VM image, which would normally be several GBs. Having it on a network share means it can take longer to transfer then your current setup process takes. I guess an external hard drive would be the easiest way to move it around.
当然可以做到。让我失望的是VM映像的大小,通常为几GB。将它放在网络共享上意味着它可能需要更长的时间来传输然后您当前的设置过程需要。我猜外部硬盘驱动器是移动它的最简单方法。
Performance wouldn't be an issue with any web development.
任何Web开发都不会出现性能问题。
I have to ask why your current machines need to be "re-imaged" each time you sit down for work?
我不得不问为什么每次坐下来工作时你的当前机器都需要“重新成像”?
#4
If you're using Windows you'll probably want to use SYSPREP on the master image so that the 'mini-setup' runs when you boot up the virtual machines for the first time.
如果您使用的是Windows,则可能需要在主映像上使用SYSPREP,以便在首次启动虚拟机时运行“迷你设置”。
Otherwise in terms of Windows' point of view, the machines have the exact same SID, hostname and other things - running multiple machines with the same SID on the same network can cause tons of headaches. Even more if you want them to communicate with each other.
否则,从Windows的角度来看,这些机器具有完全相同的SID,主机名和其他东西 - 在同一网络上运行具有相同SID的多台机器可能会导致大量的麻烦。如果您希望他们彼此沟通,甚至更多。
#5
I've run websphere for zSeries on a vmware virtual machine with no problem and websphere is more resource intensive then any PHP stack. I find that having a multi core machine or at least hyper threading makes it run a lot faster.
我在vmware虚拟机上运行websphere for zSeries没有问题,而且websphere比任何PHP堆栈都更加耗费资源。我发现拥有一台多核机器或至少具有超线程功能可以让它运行得更快。
#6
With vmware, disk operations are slower. For PHP development I doubt it would be a problem, but you'd definitely notice it if you are compiling a large C++ project. There is also Sun's VirtualBox which is free, and the latest version is rather nice (but I haven't looked at how slow disk operations are yet).
使用vmware,磁盘操作速度较慢。对于PHP开发我怀疑它会是一个问题,但如果你正在编译一个大的C ++项目,你肯定会注意到它。 Sun的VirtualBox也是免费的,最新版本相当不错(但我还没看过磁盘操作速度有多慢)。
#7
I am using that idea in practice. Virtual machines are generally great for development.
我在实践中使用这个想法。虚拟机通常非常适合开发。
- To run on multiple operating systems and multiple separate development environments.
- Preserver older development environments for later support.
- Can be easily backed up, when hard drive crashes no need to start from beginning.
- Can be copied from developer to another, so everyone don't have to do tedious installations and configurations.
在多个操作系统和多个单独的开发环境中运行。
保留旧的开发环境以供以后支持。
可以轻松备份,当硬盘崩溃时无需从头开始。
可以从开发人员复制到另一个,因此每个人都不必进行繁琐的安装和配置。
Down sides are:
下方是:
- Virtual machines are slower, you need more powerful computers than you would need otherwise. I would recommend having at least 4 G of ram, but preferably more like 16, fast multi core processors and fast hard drives.
- Copying Windows OS virtual machines, each used copy of virtual machine should have it's own product key. When you make a copy, it needs to be registered with new product key.
虚拟机速度较慢,您需要比其他方式更强大的计算机。我建议至少有4 G的ram,但最好更像16,快速多核处理器和快速硬盘。
复制Windows操作系统虚拟机,每个使用过的虚拟机副本都应该拥有自己的产品密钥。制作副本时,需要使用新的产品密钥进行注册。
#8
Did you think about a software configuration manager like ansible, chef or puppet? With such software automation of such tasks is very easy! It can even create fresh vm and then configure it.
您是否考虑过像ansible,chef或puppet这样的软件配置管理器?有了这样的软件,这类任务的自动化非常容易!它甚至可以创建新的虚拟机然后配置它。