使用 Magento 时处理开发环境的好方法是什么?
我正在致力于多站点 Magento 实施,我需要建议。
我正在使用 3GB 内存的双核 1.8ghz 机器工作,发现在我的个人开发环境中使用 MAMP 时速度非常慢,因此我使用 CentOS 设置了一个虚拟机来模拟实际的登台和生产服务器。
问题是我必须进行更改,将它们提交到 SVN,然后更新我的虚拟服务器上的存储库,该虚拟服务器占用了大量的生产时间。这个 Magento 实现是一个多站点/商店,因此它使用大量 RAM,我需要一个稳定且速度快的文件系统。
我在 Windows XP Pro 机器上通常使用 WAMP,但正如我所说,我发现速度很慢。有什么方法可以在我的机器上开发它而不减慢其他所有进程的速度吗?
我打开了 IDE (Aptana),大多数时候打开 Thunderbird 以及 MySQL Workbench,因此我运行了很多程序,并且虚拟机专用了这些资源,但就像我说的那样,持续更新存储库很乏味。
Magento 或专家开发人员可以参与进来吗?当我获得更多这样的项目时,我真的很想提前计划,并且我很想听听你们中的其他开发人员做了什么。
谢谢, 达伦
I am working on a multi-site Magento implementation and I need suggestions.
I am working on a dual core 1.8ghz machine at work with 3GB ram and have found it to be very slow when using MAMP for my personal development environment, so I have set up a virtual machine using CentOS that mimics the actual staging and production server.
The problem is I have to do my changes, commit them to SVN and then update the repository on my virtual server which is using a crap load of production time. This Magento implementation is a multi site/store so it uses a lot of RAM and I need a stable file system with speed.
I am on a Windows XP Pro machine using WAMP normally but like I said I have found that to be slow. Is there any way I could develop it on my machine without it slowing down every other process?
I have my IDE (Aptana) open and most the time Thunderbird open as well as MySQL Workbench so I have a lot of programs running and the Virtual Machine dedicates those resources, but like I said it it tedious to continuously update the repository.
Can any Magento or expert developers weigh in? I really want to plan ahead for when I get more projects like this, and I would love to hear what some of you other developers do.
Thanks,
Darren
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您没有指定虚拟机是远程的,但我将在这里做出这样的假设(因为根据定义,本地主机上的虚拟机将比托管它的计算机慢)。
我建议远程连接到更高规格的计算机以处理文件并在该环境上进行测试。基本上,将其用作开发实例并远程进行更改。然后,根据需要签入这些更改。
我是一名 Linux 开发人员,所以你的工具链有点超出了我的专业知识,但你应该能够将远程驱动器安装为本地网络驱动器,或者你的 IDE 甚至可能支持通过 SSH 安装它(这可能是一个快一点)。
希望有帮助!
谢谢,
乔
编辑:我应该说,如果您的虚拟实例不是远程,那会稍微改变我的答案。租一台具有合理统计数据的虚拟专用机,将其设置为 Magento,然后执行上述操作。与您可能购买的任何硬件技术升级相比,虚拟专用机的每月成本相当低,并且它为您提供了一个安全的地方来破坏东西。此工作流程的缺点是您必须在线才能完成任何事情。
You don't specify that the virtual box is remote, but I'm going to make that assumption here (since a virtual box on your local host would by definition be slower than the machine it is hosted on).
I would suggest connecting to your higher-spec machine remotely to work with the files and testing on that environment. Basically, use it as a development instance and make changes remotely. Then, check in those changes as necessary.
I am very much a Linux developer so your toolchain is a bit outside of my expertise, but you should be able to mount the remote drive as a local network drive, or your IDE may even support mounting it over SSH (which would probably be a bit faster).
Hope that helps!
Thanks,
Joe
EDIT: I should say that, if your virtual instance is not remote, that changes my answer a little bit. Go rent a virtual dedicated machine with some reasonable stats, set it up for Magento, and then do go the above. The monthly cost of a virtual dedicated machine is quite low compared to any hardware technology upgrades you might buy, and it gives you a safe place to break things. The downside to this workflow is that you must be online to accomplish anything.
我使用 MAMP(以及过去的 Zend Server)在 Mac 上进行本地开发。我选择的 IDE 是 Netbeans。我强烈建议您查看(无双关语)Git 来进行开发工作。
我有一台用于生产和登台的服务器。制作和舞台有两个不同的数据库。 Git 中央存储库也驻留在该服务器上。
本质上,我在 Mac 上本地完成模块和开发工作。我尝试升级等,然后使用 Git 提交它们并将它们推送到服务器上的中央存储库。到达那里后,我将更改合并到临时服务器中并进行测试、测试、测试。如果一切顺利,我就会将更改拉(合并)到生产中。
这很好地满足了我的目的,并且我没有遇到过拙劣的升级或其他任何事情……如果出现问题,您只需回滚 Git 中的更改即可。在升级之前,您确实对数据库进行了转储,正确:)
随着您变得更加复杂,您可以开始使用 phing 来自动转出您的代码,但那是另一个故事了。
祝你好运!
I develop locally on a Mac using MAMP (and in the past Zend Server). The IDE of my choice is Netbeans. I highly suggest you checkout (no pun intended) Git for doing development work.
I have a server that I use for production and staging. The production and staging have two different databases. A Git central repo also resides on this server.
Essentially, I do my modules and dev work locally on my Mac. I try upgrades and such, then use Git to commit them and push them to the central repo on the server. Once there, I merge the changes into the staging server and test, test, test. If everything is cool, I then pull (merge) the changes into production.
This has served my purposes quite well and I have not had a botched upgrade or anything... if something goes wrong you just rollback the changes in Git. You did make a dump of the DB before upgrading correct :)
As you get more sophisticated you can start using phing to do some automated roll out of your code, but that is another story all together.
Best of luck!