[jbosstools-dev] Packaging JBoss Tools for Fedora (issue & potential patches)

Dan Allen dallen at redhat.com
Tue Aug 21 13:09:32 EDT 2012


On 08/21/2012 02:42 AM, Max Rydahl Andersen wrote:
>>>>>>> That might be a little old at this stage but basically the same. Since that, there are a few new JBoss Tools modules ready. I'm in
>>>>>>> slow internet hell at the moment, but when I get back to a decent connection I'll upload updated ISOs. That one should give you the
>>>>>>> general gist though!
>>>>>> Got link on where the latest greatest is to try out ?
>>>>>> /max
>>>>> I'll be uploading tomorrow, as that's the deadline for GSOC. I'd
>>>>> upload ISO images more often but I don't have the network
>>>>> resources. Dan Allen has been helping me with it this week, and we've
>>>>> got quite a few new customizations that should be useful,
>>>> such as ? Where is this discussed/done - i'm curious?
>> The customizations that Gerard is referring to in this case are of the Linux environment itself, not specific to JBoss Tools (or even Eclipse). We are setting up the user's home directory so that they can start coding as soon as the boot finishes. This includes things like customizing terminal settings, adding git awareness to the bash prompt, setting the Eclipse workspace directory and default perspective and things of that sort.
> cool - but what needs to change concerning eclipse workspace directory and default perspective?

We pre-selected the workspace directory ($HOME/workspace) so that the 
user is not prompted when running the LiveCD. We've put settings in that 
directory, so if they pick another location they don't get those 
settings, so we want them to get the full experience.

We set the default perspective to the JBoss perspective (instead of 
Resource) to highlight the area with the main features (and the 
configured server).

>
>> We've been shooting ideas back and forth through the Fedora kickstart file hosted at gitorious: https://gitorious.org/fedora-jboss-spin/kickstart/ and I've been posting ideas on Google+. Now that those passing ideas are turning into conversations, I'll be sure to post on a mailinglist. The ideal place for this discussion is probably the Fedora Java mailinglist: https://lists.fedoraproject.org/mailman/listinfo/java-devel
> Overall java sure, but I'm mostly curious in if there are things we could do better in jbosstools or even other places that would make things better/easier not only for a specific Fedora Java spin.

I agree. Both lists are pertinent (java-devel and jbosstools-dev). 
Fedora Java when we are talking about how to enhance the Fedora 
experience, specifically, or deal with packaging concerns. The JBoss 
Tools list when it's regarding a feature in JBoss Tools that applies 
generally. Though we can always cross post if it's not clear.

>
>>>>> including a
>>>>> user instance of JBoss AS managed by JBoss Tools, configured by
>>>>> default! :)
>>>> yikes - I really don't like the sound of having more and more customizations of JBoss Tools in Feodra.
>>>>
>>>> Why not just add this to JBoss Tools already existing autodetecton instead ? i.e. we already have automatic detection of servers
>>>> in JBoss Tools and it makes no sense to only let the Fedora distro be the one that knows how to find
>>>> the Fedora packaged one does it ? (cc'ed Dan Allen to hear more ;)
>>>>
>>> It's not the default for Fedora, and there isn't any modification to
>>> that effect to the JBoss Tools package in Fedora; it's just for the
>>> 'Fedora Java Remix' live distribution. We see it as a way of making it
>>> easier for people to get started. Of course, it should still be
>>> possible to use other servers.
> Maybe i'm just coming from a different world but I would rather see JBoss Tools server adapter be able to detect and setup the JBoss AS Fedora version out-of-the-box independent on you having a Fedora Java Remix installed or where your jboss tools installation came from.

Yes, I agree. We aren't saying this can only happen on the Fedora Java 
Remix. We are just saying that we are taking an extra step of 
per-configuring it there.


I'll expand a little on the requirements for auto-detection.

There are two types of JBoss AS instances that can be setup using the 
Fedora JBoss AS package.

System instance: The first type of JBoss AS instance is the system 
instance. This instance is installed at /usr/share/jboss-as and is owned 
by the user root and can accept deployments from a user in the 
privileged jboss-as group. JBoss Tools auto-discovery properly detects 
this instance and sets it up. However, JBoss Tools does not have the 
permission to start and stop this server. In order for JBoss Tools to 
deploy to this server, a management user must be setup and added to the 
server configuration.

User instance: The second type of JBoss AS instance is the user 
instance. These are created on demand by a regular (unprivileged) user 
using this command:

jboss-as-cp -l $HOME/applications/jboss-as-user-instance

(Btw, we are discussing a better name for this script in this BZ: 
https://bugzilla.redhat.com/show_bug.cgi?id=827584)

  JBoss Tools does not currently auto-detect these instances. However, 
it *could* offer to create and/or auto-discover them.

It's possible to get JBoss Tools to control the user instance, but it 
requires tweaking the startup flags in the server configuration (as we 
have done in the Fedora Java Remix).

>
>> Exactly, the idea is for them to boot Fedora, open Eclipse and be able to deploy right away. We can't use the auto-discover at the moment because JBoss Tools doesn't properly auto-discover the "user instance" of JBoss AS that is prepared by the "jboss-as-cp" script in the JBoss AS package.
> Exactly - this is what i'm curious about - getting server adapter to identify the server.

See above for the requirements. Here's what we modify. In the server 
launch configuration screen we:

1. Uncheck the box "Always update arguments related to the runtime" so 
our changes don't get overwritten
2. Replace the VM arguments that contain "jboss" with:

-Dorg.jboss.boot.log.file=${env_var:HOME}/applications/jboss-as-user-instance/log/boot.log 
-Dlogging.configuration=file:${env_var:HOME}/applications/jboss-as-user-instance/configuration/logging.properties 
-Djboss.home.dir=/usr/share/jboss-as 
-Djboss.server.base.dir=${env_var:HOME}/applications/jboss-as-user-instance

That allows JBoss Tools to use the system instance as the server base 
directory but write all configuration, logging and deployments to the 
user instance (which is basically how the user instance works).

>
>> This script creates a skinny standalone instance of JBoss AS that only has the configuration files and uses JBOSS_BASE_DIR to point to the real installation. This is the proper way (IMO) to properly handle permissions on an operating system that properly handles permissions :)
> Please open JBIDE jiras for stuff we don't handle properly - just fixing it in fedora java remix is not a good long term solution.
Agreed. What we've done so far has been a proof of concept to understand 
the requirements for whatever feature request we would file. I think 
what I wrote above is sufficient for a JIRA report and I will file it as 
such...

Voila! https://issues.jboss.org/browse/JBIDE-12452

>
> Seems like most of this can be solve by having firstclass support for more "base dirs"
>
>> The server configuration that we added is partly necessary because it requires the vm arguments to be customized to isolate the configuration from the base installation. Since that would require hand editing those arguments, it's much easier on the developer if we setup the instance for them. Of course, once JBoss Tools can configure a user instance of JBoss AS (or even autodetect it), then that becomes unnecessary. I'll hold firm on the requirement that when they start Eclipse the first time, they should have a JBoss AS server already ready to go (that's one of the key goals of this spin).
> Yes, please open jiras so we can now what you actually need - adding yet another autosetup is IMO backwards. (fine for this gsoc java respin as a proof of concept, but for me being able to have the autodetect pick up such installation no matter how you got jboss tools is much more interesting)
>
> Could you open a jira and optimally point to the source for whatever configuration you do externally to the existing autodetection and server adapter setup ?

Indeed.

>
>> Btw, you can grab a spin ISO, pop it into a virtual machine (like VirtualBox) and try it out:
>>
>> http://ryan.lt/fedora-java-remix/
> thanks, i'll try it out.

Please do. And please pass it on.

-Dan

-- 
Dan Allen
dallen at redhat.com

Principal Software Engineer
Middleware Engineering
Red Hat, Inc.



More information about the jbosstools-dev mailing list