[jboss-as7-dev] Overriding Deployment Descriptors

Max Rydahl Andersen max.andersen at redhat.com
Wed Apr 4 09:24:01 EDT 2012


Hi brian,

> Max, any thoughts on this subject? I think a tooling perspective is critical here.

I'm trying to decipher the real question but seems i'm missing some context ;)

Care to give a summary/hint ?

/max

> 
> On 3/29/12 6:50 AM, Emanuel Muckenhuber wrote:
>> On 03/29/2012 05:12 AM, Stuart Douglas wrote:
>>> 
>>> On 28/03/2012, at 5:48 AM, Emanuel Muckenhuber wrote:
>>>> The part i am trying to figure out is that we basically would have 2
>>>> things doing the same. Another issue people are complaining about is
>>>> that we don't support symlinks in .war deployments. One of the easiest
>>>> ways to solve this would be to just mount a local file system path.
>>>> Where i am not sure if moving this to the dd-overrides makes more sense.
>>>> Hopefully i do remember correctly that we support VFS in our web
>>>> integration :)
>>>> 
>>>> I think the dd-override sounds like less work in the beginning, but if
>>>> you include invalidation of overrides i am not sure if that is also true
>>>> for all the tooling. The deployment-scanner seems to be an edge case in
>>>> general, so perhaps we it can just adapt (be smarter) once we have some
>>>> other workflows.
>>>> 
>>> 
>>> I don't know if invalidation of the overrides is really that much of a problem. If you have to specify the overrides at deployment time then you need to make sure your environment is setup so that you will always provide that override file whenever you deploy, which means that for developers they would need tooling support, and for production they would need to have their deployment scripts setup to make sure that the override is always deployed with the deployment. Both of these use cases will still work with dd-override (i.e. you can just have tools or scripts to modify it every time before deployment).
>>> 
>> 
>> Hmm, redeploying works through the :replace operation, which should
>> allow you to replace a single content-item, but preserve exiting ones.
>> So you would also have to provide it only once.
>> 
>> But yeah, once you call :remove it would also invalidate all the
>> overrides. However the lifecycle seems more straightforward and there is
>> the option that you just disable the deployment as well.
>> 
>> I do see that this does not work that well for the deployment-scanner,
>> but then there is no deployment-scanner in the domain. So for me that is
>> more an issue of the scanner and should perhaps better be solved there.
>> 
>> Emanuel
>> 
>>> If on the other hand these descriptors only change infrequent, then dd-override has a major advantage, in that it can just be setup once and then left alone.
>>> 
>>> Stuart
>>> 
>>> 
>>>> On 03/27/2012 08:04 PM, Brian Stansberry wrote:
>>>>> It's not immediately critical. But a little voice inside my ear tells me
>>>>> we'll be *strongly* pressured to support it at some point. People love
>>>>> the deployment scanner. And I think once people get used to being able
>>>>> to have override descriptors they will love that as well.
>>>>> 
>>>>> Override descriptors are very nice for keeping a base deployment but
>>>>> adapting it for different environments. I'd thought of it as more of a
>>>>> production thing (a workaround to a corporate policy that says a jar
>>>>> can't be cracked open and change) but David convinced me it's more of a
>>>>> developer or staging thing (override the production settings with
>>>>> dev-workstation-specific settings). And once you are talking developers,
>>>>> you are also talking deployment scanner.
>>>>> 
>>>>> A big question I'd like to see talked through on this thread is how best
>>>>> to do tooling around this (including CLI and web console.) What's
>>>>> easiest for the user, in common workflows?
>>>>> 
>>>>> In option 1, the dd-override is a separate resource from the deployment.
>>>>> That means it can be independently controlled. Good and bad there. Good,
>>>>> it can be added once and then left alone while the war, whatever is
>>>>> tweaked and redeployed many times. Bad, it's a separate thing.
>>>>> 
>>>>> Conversely, with 2, the content items are part of a list attribute of
>>>>> the deployment resource. The good and bad points are the opposite of 1.
>>>>> 
>>>>> On 3/27/12 12:47 PM, Emanuel Muckenhuber wrote:
>>>>>> 
>>>>>> Hmm, so we really have to support the deployment-scanner use case? I
>>>>>> mean beside some API/address differences - the (not implemented)
>>>>>> deployment content thing is basically doing the same. Just wondering if
>>>>>> i missed something obvious?
>>>>>> 
>>>>>> 
>>>>>> On 03/27/2012 03:55 PM, Brian Stansberry wrote:
>>>>>>> On 3/27/12 12:34 AM, Stuart Douglas wrote:
>>>>>>>> We have had a few requests for the ability to override deployment descriptors without having to open up a deployment archive and manually change the descriptor. I think there are two different approach that we can use to accomplish this, and I am was wondering what other people thought.
>>>>>>>> 
>>>>>>>> 1) Allow the user to specify alternate deployment descriptors as part of the deployment process
>>>>>>>> 
>>>>>>>> At deployment time the user would be able to select specific deployment descriptors to override. I don't really like this approach, as it means that this information must also be provided on every re-deployment. It is also not really compatible with the deployment scanner, and would require changes to every client that does deployment to properly support it.
>>>>>>>> 
>>>>>>>> 2) Allow the user to specify deployment descriptor overrides before a deployment takes places. These descriptors would be stored in the content repository, and the corresponding information in the model. When a deployment is performed that matches the deployment name in the model the deployment descriptors from the content repository are merged into the deployment.
>>>>>>>> 
>>>>>>>> e.g.   to add the descriptor you would do something like:
>>>>>>>> 
>>>>>>>> /dd-override:my-deployment-descriptor:add(deployment="test.ear", file="test.jar/META-INF/ejb-jar.xml", content=…)
>>>>>>>> 
>>>>>>>> or for domain mode
>>>>>>>> 
>>>>>>>> /server-group=foo/dd-override:my-deployment-descriptor:add(deployment="test.ear", file="test.jar/META-INF/ejb-jar.xml", content=…)
>>>>>>>> 
>>>>>>> 
>>>>>>> For domain mode, this should be basically a parallel to the existing
>>>>>>> deployment=* handling:
>>>>>>> 
>>>>>>> a) The override is a top level resource, adding an item to the
>>>>>>> "pallette" that is usable in any server-group:
>>>>>>> 
>>>>>>> /dd-override=my-deployment-descriptor:add(deployment="test.ear",
>>>>>>> file="test.jar/META-INF/ejb-jar.xml", content=…)
>>>>>>> 
>>>>>>> b) The server-group part is just a mapping that says "use this from the
>>>>>>> pallette:
>>>>>>> 
>>>>>>> /server-group=foo/dd-override=my-deployment-descriptor:add
>>>>>>> 
>>>>>>> Actually, this last bit is probably unnecessary, since the HC can figure
>>>>>>> out what dd-overrides are required from the deployment="test.ear"
>>>>>>> attribute on the dd-override=my-deployment-descriptor resource.
>>>>>>> 
>>>>>>>> Then when test.ear is deployed the contents if the overridden deployment descriptor will be override test.jar/META-INF/ejb-jar.xml.
>>>>>>>> 
>>>>>>>> 2) is the approach that I prefer, as I think it gives the most flexibility.
>>>>>>>> 
>>>>>>>> What does everyone think?
>>>>>>>> 
>>>>>>>> Stuart
>>>>>>>> _______________________________________________
>>>>>>>> jboss-as7-dev mailing list
>>>>>>>> jboss-as7-dev at lists.jboss.org
>>>>>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>>>>> 
>>>>>>> 
>>>>>> _______________________________________________
>>>>>> jboss-as7-dev mailing list
>>>>>> jboss-as7-dev at lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>>> 
>>>>> 
>>>> _______________________________________________
>>>> jboss-as7-dev mailing list
>>>> jboss-as7-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>> 
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> 
> 
> -- 
> Brian Stansberry
> Principal Software Engineer
> JBoss by Red Hat




More information about the jboss-as7-dev mailing list