English 中文(简体)
How to automatically set up a development environment?
原标题:

I have been tasked to set up a Java based development environment across multiple Windows machines. The problem is that I want to the process to be done automatically and easily on each machine so the developers don t have to waste time downloading and installing all the different applications. Ideally, I would like to have the following:

  • Automated and unattended initial installs
  • Some sort of a monitor on those installations that would make sure the settings remain constant between all machines
  • A possibility to push new settings/programs/upgrades when required.

I ve looked into several tools for the job. Currently the most promising one seems to be Puppet . However, Puppet doesn t work as well in Windows... Using a VM image would solve the first requirement, but it is out of the question since the hardware is different across the machines and upgrades won t come easy.

Has anyone had any experience with this sort of task? How would you solve it?

问题回答

I ve been playing with Vagrant for a couple weeks and finding it a fantastic tool for this. It uses Puppet, Chef, or a customer "provisioner" on top of a VirtualBox, and is controlled by a simple command. They have a great tutorial/tour that will show you what it s capable of.

As an example, the direction I ve been heading this week is writing Puppet scripts/modules to setup my production server, and all the dynamic parts are handled by parameterized classes. So my development environment will have the same OS, the same firewall settings, the same daemons, etc--all without affecting my host OS or doing any manual configuration steps.

That being said, I ve not used it on a day-to-day basis so I don t know if there are any blocking issues, but I have used manually managed VirtualBox for the same purpose without trouble, so I don t foresee any problems.

The more interesting functionality is pulling information from the developers machines. The development environment changes, and different developers try out new things/programs/settings at a rate that is difficult to keep up with if it is not automated. Only having one configuration (the centralized model) kills your ability to respond to change. It is important to understand the differences between configurations, though.

One interesting option might be to standardize on the Eclipse IDE plus a set of plugins (SCM, testing, J2EE development etc.) and use the Eclipse update mechanism to deploy an identical configuration to every machine. Dependencies, synchronization and suchlike would be handled automatically by the Eclipse platform.

This might not work for you if you need some specific tools that are not available inthe Eclipse ecosystem, but my personal development environment is 100% Eclipse based so it is certainly possible to make this work.

Java can be installed globally easily. For Windows have your system administrator push out the MSI file embedded in the Java JRE installation executable. For Ubuntu ssh in and have the sun-java6-jdk module installed.

Then Eclipse is just a matter of pushing out an unzipped distribution to the users.

Most developers like to customise their setups, so I m not sure this is going to be popular. You could go bleeding edge and look to provide them with instances on the cloud (once you ve got one set-up correctly you can clone away!).

1) Use a Disk Image.

or

2) Put everything (Eclipse executable etc.) in SVN (or some other source repository). Then they just have to install SVN and checkout.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签