如何自动化开发环境的设置? [英] How to automate development environment setup?

查看:254
本文介绍了如何自动化开发环境的设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当一个新的开发者加入团队或开发人员正在使用变化的计算机上,开发人员需要做大量的工作,以建立当地的发展环境,使当前项目工作。作为一个Scrum团队,我们正在努力实现自动化的一切,包括部署和测试,所以我是问:是否有工具或做法,使地方发展环境的设置自动

Every time a new developer joins the team or the computer a developer is using changes, the developer needs to do lots of work to setup the local development environment to make the current project work. As a SCRUM team we are trying to automate everything including deployment and tests so what I am asking is: is there a tool or a practice to make local development environment setup automated?

例如设置我的环境,首先我必须安装Eclipse,然后SVN,阿帕奇,Tomcat的,MySQL和PHP。从那以后,我填充DB和我不得不做的各种配置文件等细微的变化......有没有办法减少这种劳动方式一键?

For example to setup my environment, first I had to install eclipse, then SVN, Apache, Tomcat, MySQL, PHP. After that I populated the DB and I had to do minor changes in the various configuration files etc... Is there a way to reduce this labor to one-click?

推荐答案

有几个选项,有时它们的组合是非常有用的:

There are several options, and sometimes a combination of these is useful:


  • 自动安装

  • 磁盘镜像

  • 虚拟化

  • 源$ C ​​$ C控制

上的各种选项的详细信息:

Details on the various options:


  1. 自动安装自动化工作站的各种服务,工具和配置文件的安装和配置工具:

  1. Automated Installation Tools for automating installation and configuration of a workstation's various services, tools and config files:


  • 木偶有一个学习曲线,但功能强大。您可以定义机类(发展中,网络服务器等),然后它做什么,必须安装,配置,并保持包装盒处于正常状态。你问一个点击,但木偶在默认情况下是零点击,因为它定期检查你的机器,以确保根据需要它仍配置。它将检测当一个文件或模式已经改变,并解决问题。我目前用这个来维持的红帽Linux机器了一把,虽然它能够处理成千上万。 (不支持Windows为2009-05-08)。

  • Cfengine的是另一个。我已经看到了这个成功使用在店铺使用RedHat Linux上70名工程师。它的限制是对木偶的部分原因。

  • SmartFrog 是用于配置主机的另一种工具。它支持Windows。

  • Shell脚本。 RightScale的有如何配置的Amazon EC2实例使用shell脚本的形象。

  • 安装包。在UNIX系统中有可能使用包完全做到这一点,而在Windows MSI可能是一种选择。例如, RubyWorks 为您提供了一个完整的Ruby on Rails的堆栈,所有通过安装一个软件包,这反过来安装通过依赖其他包。

  • Puppet has a learning curve but is powerful. You define classes of machines (development box, web server, etc.) and it then does what is necessary to install, configure, and keep the box in the proper state. You asked for one-click, but Puppet by default is zero-click, as it checks your machine periodically to make sure it is still configured as desired. It will detect when a file or mode has been changed, and fix the problem. I currently use this to maintain a handful of RedHat Linux boxes, though it's capable of handling thousands. (Does not support Windows as of 2009-05-08).
  • Cfengine is another one. I've seen this used successfully at a shop with 70 engineers using RedHat Linux. Its limitations were part of the reason for Puppet.
  • SmartFrog is another tool for configuring hosts. It does support Windows.
  • Shell scripts. RightScale has examples of how to configure an Amazon EC2 image using shell scripts.
  • Install packages. On a Unix box it's possible to do this entirely with packages, and on Windows msi may be an option. For example, RubyWorks provides you with a full Ruby on Rails stack, all by installing one package that in turn installs other packages via dependencies.

磁盘映像,然后当然也有磁盘镜像工具< /一>用于存储使得它能够恢复到另一个主机一配置的主机的图像。随着虚拟化,这是测试盒特别好,因为它很容易的事情恢复到一个干净的石板。持续保持的东西了最新的仍然是一个问题 - 是否值得做出新的图像只是传播的配置文件更改

Disk Images Then of course there are also disk imaging tools for storing an image of a configured host such that it can be restored to another host. As with virtualization, this is especially nice for test boxes, since it's easy to restore things to a clean slate. Keeping things continuously up-to-date is still an issue--is it worth making new images just to propagate a configuration file change?

虚拟化 是另一种选择,例如制作Xen的,虚拟PC,或VMware映像的副本来创建新的主机。这与测试盒特别有用,因为不管测试产生什么乱七八糟的,你可以轻松地恢复到一个干净的,已知的状态。与磁盘映像工具,保持主机最多最新要求比,如果一个自动安装/配置工具使用较多的手动步骤和警惕。

Virtualization is another option, for example making copies of a Xen, VirtualPC, or VMWare image to create new hosts. This is especially useful with test boxes, as no matter what mess a test creates, you can easily restore to a clean, known state. As with disk imaging tools, keeping hosts up-to-date requires more manual steps and vigilance than if an automated install/config tool is used.

来源$ C ​​$ C控制一旦你得到了必要的工具,安装/配置,然后做构建应该检查出什么是从一个源$ C ​​$ C需要的问题库和建立它。

Source Code Control Once you've got the necessary tools installed/configured, then doing builds should be a matter of checking out what's needed from a source code repository and building it.

目前我使用上述的组合来自动执行此过程如下:

Currently I use a combination of the above to automate the process as follows:


  • 与准系统操作系统启动安装在VMware来宾

  • 运行shell脚本来安装木偶和检索源$ C ​​$ C控制其CONFIGS

  • 木偶安装工具/组件/ CONFIGS

  • 从源头code控制检出文件来构建和部署我们的Web应用程序

这篇关于如何自动化开发环境的设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆