adb-atomic-developer-bundle icon indicating copy to clipboard operation
adb-atomic-developer-bundle copied to clipboard

CDK bundle should contain .cdk file for automatic detection by JBDS

Open hferentschik opened this issue 9 years ago • 4 comments

For JBDS and its server-adapter to recognize the Vagrant setup as a "CDK" configuration, it needs a .cdk file.

Currently the Windows installer creates the appropriate .cdk file for the users using the installer. However, users who just download the CDK standalone, this won't work. They won't have automatic integration into JBDS.

The idea is to ship the .cdk file as part of the CDK bundle. See also https://issues.jboss.org/browse/JBIDE-22004

The problem I see is that the CDK is not really an install. It "just" provides a zip file from which a user has to extract a Vagrantfile in order to use the CDK. In this scenario the best one can do is to add .cdk as well and document that the user needs to copy this file as well. This is error prone.

Also in a hopefully not so distant future, there won't be a need to a separately shipped Vagrantfile and one can just use vagrant init to create a start Vagrantfile for the CDK. Where would the .cdk file be in this picture?

Thoughts?

hferentschik avatar Mar 31 '16 12:03 hferentschik

In lieu of a file that a user may or may not be willing to create/keep for us in the long-term, could we have the JDBS setup execute a vagrant command to find out? Perhaps vagrant-service-manager could have a command to id the box - or you could check the box version?

bexelbie avatar Mar 31 '16 17:03 bexelbie

vagrant command to find out?

Not really, since the VM won't be running. One purpose of the JBDS server adapter is to start/stop the VM.

My initial idea was to add a property to the default Vagrantfile which JDBS could grep for. Something which would make clear, this is a CDK Vagrant setup. However, this might be problematic for vagrant init approach where the generated Vagrantfile would be almost empty. I guess one could use the vm.box value (which would exist) one way or another and check whether it contains 'cdk'.

An alternative idea would be to add a function to the default Vagrantfile which generates the .cdk marker file if it does not exist.

hferentschik avatar Apr 01 '16 10:04 hferentschik

Does the JBDS service use the .cdk file to decide whether to even start the box? If so, we need something you can key off of before any vagrant file is run and a function won't work. If it starts the file first and then detects via .cdk we could either use a command to tell the box type or we could have the file created by the plugin function.

Stepping back, how does a JBDS user actually get and start the CDK? Is there strong need to support the vagrant init use case in this situation? If not, could we just document that if users don't follow our suggested method they must manually create the file?

bexelbie avatar Apr 04 '16 11:04 bexelbie

I think .cdk has been added here https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/components/rhel/rhel-ose/.cdk.

Anything more required here @LalatenduMohanty @praveenkumar ?

brgnepal avatar Oct 24 '16 14:10 brgnepal