Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kamel run that can auto discover/guess what to include and run #1409

Closed
davsclaus opened this issue Apr 17, 2020 · 5 comments
Closed

kamel run that can auto discover/guess what to include and run #1409

davsclaus opened this issue Apr 17, 2020 · 5 comments
Labels
area/ux Improves user experience kind/feature New feature or request status/stale

Comments

@davsclaus
Copy link
Contributor

I wonder if we could make the kamel CLI somewhat smart for development purposes and allow to to try to auto discover/guess what you have to make it run.

Then it can output on the CLI what it have discovered and what the arguments on the CLI would be if typed manually.

Inspired by nicolas little demo, see screenshot

So it will look in the current folder the files and look inside to see what they are
*.java are java source code and included
*.jar are JAR as dependencies and included
.properties are properties files and included
openapi
.yaml are openapi contracts and enables this trait
*.xml are looked inside to see if they are camel routes / rests

This can really help new users to get going. Just add a source java, and drop your extra JARs to include, and set some configuration in the properties file.

@davsclaus
Copy link
Contributor Author

Screenshot 2020-04-17 at 14 44 58

@davsclaus davsclaus added kind/feature New feature or request area/ux Improves user experience labels Apr 17, 2020
@nicolaferraro
Copy link
Member

That would work for the API scenario, but there are cases where it will make bad assumptions. E.g. in https://github.com/openshift-integration/camel-k-example-event-streaming you have multiple Java files, but most of them are to be run independently.

I think that after Luca fixes #1400, we have a good format for the kamel-config.yaml file and we can sponsor its usage more than we do today.

That way the workflow would be:

kamel init API.java
kamel run API.java --open-api openapi.yaml --property-file application.properties --save
# Then from now on
kamel run API.java

But I'm also ok with e.g. a --auto flag, like:

kamel init API.java
kamel run API.java --auto --save
# And it recognizes what you've indicated, prints it to the console, and the --save flag will also save the options to the config

@lburgazzoli
Copy link
Contributor

#1400 should be working now, please retest :)

@nicolaferraro
Copy link
Member

#1400 should be working now, please retest :)

You said that also yesterday ;)

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ux Improves user experience kind/feature New feature or request status/stale
Projects
None yet
Development

No branches or pull requests

3 participants