2 Replies Latest reply on Feb 15, 2013 12:59 AM by jaikiran pai

    How to easily imitate production env on dev machines?

    Peter R Newbie



      I'm in the process of porting our Jboss 4.2.3 application to AS 7 and I'm wondering if anyone could provide any high level insight.


      We would definitely like to take advantage of the new Domain Mode for our 20 production app nodes but we're wondering how we can best imitate their configuration on our development boxes as well.  In the past we have kept our jboss instance in an SVN repo and had a local copy of it on each of our dev boxes, this way any updates to our server.xml or deployment process can be easily distributed.  Now with domain mode I'm wondering if theres a better way to handle this.  From what I've read so far, it looks like we want to keep our dev boxes running in Standalone mode, mainly for the file system deployment scanner and having a known full path to our ear.  Most of us use Eclipse so I'm aware of the Jboss Tools plugin and will be doing research on how to take advantage of that in our dev process as well.  Is there an easy way to manage all of our jboss instances?  Having to maintain and keep domain.xml and standalone.xml in sync seems like it could be problematic so I'm wondering if theres a way to possibly combine these (we only use one server profile in domain mode anyways)


      Maybe we should run all of our dev boxes in domain mode each as their own DC but how would we handle easily deploying our app without having to manually redeploy every time we make a change to the app as well as accessing the ear directly in the file system without having to deal with the hash folders?  Right now for development in Jboss 4 we use symlinks to point back to our Eclipse project and just touch META-INF/application.xml every time we need jboss to reload the app (only for back-end code), perhaps we could use something similar in AS 7 domain mode?


      Any comments or critique to my thought process is welcome.





        • 1. Re: How to easily imitate production env on dev machines?
          Wolf-Dieter Fink Master

          Hello Peter,

          welcome to the forum.


          To store the configuration the standaloneIdomain/host xml files will be problematic as the server write the the files during runtime and it might be problematic to keep it in sync.

          I would recommend to use the CLI scripting to adapt the configuration, this will be also check whether a new version can run with that config.

          You might have a look to the ejb-multi-server quickstart, where you find an example how to configure with CLI.


          I don't see a problem run the dev machines with a domain, it will be easy to handle.

          On the other hand you have to deploy the app with CLI (or http management), I'm not familiar with the Eclipse plugin, but I suppose the JBoss tools provide such

          • 2. Re: How to easily imitate production env on dev machines?
            jaikiran pai Master

            I partly agree with Wolf on this one.


            I think I would stick to standalone mode for dev environment. As to keeping the server configurations in sync and version controlling them, I would follow the management operations approach. AS7 can be fully configured via management operations. These management operations can be executed in various different ways. CLI (command line interface) is one such approach. The CLI allows you to run pre-built "scripts" which have the management operations to configure a server.


            So typically, you would come up with the necessary management operations to configure you server and then store them as CLI scripts and version control them via SVN, Git or whichever version control system you use. Each dev can then just install a clean AS7, then checkout these scripts and run them via CLI to get your custom configured AS7 instance.


            Except for a minor change to the command, the domain configurations can then use the same CLI scripts. The domain mode operations require you to specify the profile you want to run those operations against.