Showing posts with label Deploy. Show all posts
Showing posts with label Deploy. Show all posts

Tuesday, 29 May 2012

Development Environment Must-Haves: Development and Test

For any serious development environment, creating properly partitioned development and test environments is essential. Let's work backwards from production, and look at our expectations when we deploy to each environment.

Photo credit: gothopotam on Flickr

In production, we expect and demand nothing less than correct operation when we deploy a new version of our application. We expect this environment to be permanently available. If there are any problems, they must be specific to the production environment only. We can reduce the probability of this occurring by using a "regression" or as-live environment.

In regression, we know that our application has been fully tested, but we expect to encounter problems related to configuration changes or perhaps database versioning issues. We expect this environment to be permanently available as production, but accept there may be problems from time to time. By encountering these in regression, we are able to address the issues before our application makes it into production. We make sure that our application is performing as per specification and that there are no defects, by using a system test environment.

In system test, we know that our application works, in that it starts up and functions, however business functionality and overall operation has not been independently tested. We expect this environment to be generally available during testing, but accept that new releases may bring in problems which have to be addressed, and also that the application may fail during testing due to major defects. We expect to encounter these issues as well as some relating to the configuration of the environment and resources it uses, such as databases. However, we can have confidence that our application basically works, by using a development environment.

In development, nothing is guaranteed. The application may or may not work, for reasons which will be investigated by development staff. The development environment is used to ensure that released applications are basically sound, and configuration issues explored. We expect this environment to be generally available, but accept that certain tasks during the development phase may require it to be extensively rebuilt or reconfigured.

Applications (as created by your continuous integration build cycle) should be released to each environment in turn, and where problems are found, be prepared to back track and rework - and start the cascading release process again once the fixes are in place.

If you ever find yourself deploying to production and changing the production database because of a bug or change to requirements, and then back-propagating to development, you have a major problem!

In this short series I'm outlining the tools you really do need for a professional quality software development environment. Many of them will seem like common sense to many of you. Many of them have been inexplicably missing from development environments I've seen over the past few years. The list isn't meant to be "the final solution" - you may have these things, you may have alternatives, you may have nothing at all - in which case you know where to start.

Monday, 9 April 2012

Development Environment Must-Haves: Continuous Integration

Photo credit: MeriaDuck
Use Continuous Integration to automate the quality control process so that you include some quality assurance during development, rather than leave it all to the end. The pre-requisites for this are:
  • Source code control using, for example, Subversion
  • A standard build process using, for example, ant
  • A set of unit tests which exercise the application code as fully as possible
With these in place you can deploy a continuous integration tool such as CruiseControl, Hudson or Jenkins to automate the following tasks:
  • Get the latest code base and build it whenever it changes
  • Run unit tests against the built code
  • Create versions for the release cycle
  • Package all components including code and any support files
In such an environment, it becomes possible to:
  • Fetch the "current" version of the application easily
  • Spot coding problems as soon as they are introduced
  • Ensure that all tests are run whenever your application is changed
In this short series I'm outlining the tools you really do need for a professional quality software development environment. Many of them will seem like common sense to many of you. Many of them have been inexplicably missing from development environments I've seen over the past few years. The list isn't meant to be "the final solution" - you may have these things, you may have alternatives, you may have nothing at all - in which case you know where to start.


Tuesday, 27 March 2012

Development Environment Must-Haves: Standard Build and Deploy

In this short series I'll outline the tools you really do need for a professional quality software development environment. Many of them will seem like common sense to many of you. Many of them have been inexplicably missing from development environments I've seen over the past few years. The list isn't meant to be "the final solution" - you may have these things, you may have alternatives, you may have nothing at all - in which case...

Standard Build and Deploy


Photo credit: nyuhuhuu on Flickr
Some years ago I was lead developer on a Java project and had about 6 software developers working for me. We had a "standard build" which we were developing using ant in order to streamline the development process. Our source code was being managed in VSS. I was often frustrated to find that I would get the latest code base from VSS and that the build didn't work. I would look at the check-in history and ask the programmer about their changes, and the fact that they didn't compile. The programmer would invariably look confused and say "well, it compiled in -" and then name an IDE application they were using on their PC. I think we had some with JBuilder some with Netbeans some with IntelliJ and it was a bit of a free-for-all despite my client trying to standardise.

This was where the drive for the standard build came from, to have something which would be the "de-facto" process, where the components would be built and packaged, and if it didn't build there, it was regarded as a failure.

With time, the IDEs were standardised, but I do remember impressing on my team on more than one occasion that "It doesn't matter if it builds in JBuilder. It doesn't matter if it builds in Netbeans. All that matters is that it builds when I build it using the standard build ant task".

Using a tool like ant, it's only a small step to run tasks to carry out deployments, and having spent some time going back to manual deployments (in a case where there were no tasks implemented) the value of these were underlined even more.

Summary of Gains


  • Consistency of builds
  • Easier management of build artefacts (built code libraries and also support files)
  • Faster deployment of artefacts for testing