Today this space is largely filled by solutions like Puppet, Chef, and a handful of other tools that tackle server administration automation generically - usually following a concept of cookbooks and repeatable dependency management for the platform. While they do support the various Java environments (Tomcat, ActiveMQ, etc), the lack of pure Java integration in the automation stack means you cannot exploit Java's capabilities directly without jumping through an interop layer. Here are some example ideas on what it would be nice to do:
- Have a configuration management automation system that integrated with JMX, feeding information back to a management console
- Share or re-use Java assets in the automation workflow - e.g. using your Spring Batch beans as part of automating the setup of your database
- Leverage Java APIs in the automation system to distribute capabilities - e.g. start tomcat, start activeMQ, generate test JMS messages to validate connectivity, or perhaps use JMX to interrogate server status to validate sanity
- Build configuration artifacts shared directly into integration and production server environments (e.g. properties files, Spring bean files, etc)
- Provide a platform for next-generation Java platforms (OSGi, Cloud, etc)
The more I think about this, the more it makes sense to introduce some Gradle plugins that expand current task models into the continuous deployment and configuration management space. Here is a sample list of tasks that could be executed in a Gradle build
- Compile, test, package
- Jetty/tomcat integration tests, bootstrapping their configuration
- Deploy to Tomcat cluster, update local config - updating the software artifacts with local software config (e.g. hostname) as necessary
- Validate tomcat cluster sanity
- Initialize database - not with bash scripts running SQL commands, but Groovy SQL, your data access layer jar being invoked, etc
Steps 1 and 2 are what you do today with Gradle in your own dev environment. When you think about steps 3-5 in the various environments out there - from your home grown environments, to larger app servers, to virtual machines, a task framework around server management within Gradle looks more and more attractive.