You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/11/08 18:47:00 UTC

[GitHub] [camel-k] elainhelen opened a new issue #2737: How to package integration to deploy it into a private k8s cluster without internet connection

elainhelen opened a new issue #2737:
URL: https://github.com/apache/camel-k/issues/2737


   Newbie here
   Is it possible to package Camel K integration as a self-sufficient container image?
   If not, what is the package strategy for Camel K integration?
   
   Given that the k8s cluster is private, what do we need to pre-package on the private k8s cluster for running the integration?
   thank you


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] elainhelen commented on issue #2737: How to package integration to deploy it into a private k8s cluster without internet connection

Posted by GitBox <gi...@apache.org>.
elainhelen commented on issue #2737:
URL: https://github.com/apache/camel-k/issues/2737#issuecomment-963757032


   I got a bit ahead, but have more questions on `kamel local`
   I used `kamel local build basic.java --image xxxx/basic-image`
   which creates an image xxxx/basic-image on my local development machine.
   Then move the image to the private k8s cluster and run `kamel local run --image xxxx/basic-image`
   and it executed: `docker run --network=host -t xxxx/basic-image:latest` and started to output logs
   ```
   {"timestamp":"2021-11-08T23:44:44.255Z","sequence":95,"loggerClassName":"org.slf4j.impl.Slf4jLogger","loggerName":"org.apache.camel.k.Runtime","level":"INFO","message":"Apache Camel K Runtime 1.9.1","threadName":"main","threadId":1,"mdc":{},"ndc":"","hostName":"docker-desktop","processName":"io.quarkus.bootstrap.runner.QuarkusEntryPoint","processId":9}
   {"timestamp":"2021-11-08T23:44:44.281Z","sequence":96,"loggerClassName":"org.jboss.logging.Logger","loggerName":"org.apache.camel.quarkus.core.CamelBootstrapRecorder","level":"INFO","message":"Bootstrap runtime: org.apache.camel.quarkus.main.CamelMainRuntime","threadName":"main","threadId":1,"mdc":{},"ndc":"","hostName":"docker-desktop","processName":"io.quarkus.bootstrap.runner.QuarkusEntryPoint","processId":9}
   {"timestamp":"2021-11-08T23:44:44.3Z","sequence":97,"loggerClassName"
   
   ```
   
   Questions:
   What is the usage of the base image (ex. xxxx/integration-base-image) created from
   `kamel local build --base-image --container-registry xxxx` ?
   Can I use this image to run the integration-directory created from `kamel local build basic.java --integration-directory ~/test/int` ?
   
   Tried to run `kamel local run --containerize --image xxxx/integration-base-image --integration-directory ~/test/int`
   Got the following error
   ```
   Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
   Executing: docker run --network=host -t xxxx/integration-base-image:latest
   Exception in thread "main" java.nio.file.NoSuchFileException: /quarkus/quarkus-application.dat
   	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
   	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
   	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
   	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
   	at java.base/java.nio.file.Files.newByteChannel(Files.java:371)
   	at java.base/java.nio.file.Files.newByteChannel(Files.java:422)
   	at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
   	at java.base/java.nio.file.Files.newInputStream(Files.java:156)
   	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:41)
   	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:25)
   integration image did not run successfully: exit status 1
   ```
   
   Is it feasible to pre-package one base image? and use it to run/load different integrations from their own integration-directory


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] elainhelen commented on issue #2737: How to package integration to deploy it into a private k8s cluster without internet connection

Posted by GitBox <gi...@apache.org>.
elainhelen commented on issue #2737:
URL: https://github.com/apache/camel-k/issues/2737#issuecomment-970564238


   @squakez really helpful suggestion.
   I have revised the workflow
   `kamel kit create kit_name -d denpency`
   This created an image without tag 
   `docker_registry/camel-k-kit_name@sha256:3a0cb7ddb5917df8e9a0f16e7ebac746777bd02257c0078e6919db658375f229`
   Is there a way to give a tag when creating the kit?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] squakez commented on issue #2737: How to package integration to deploy it into a private k8s cluster without internet connection

Posted by GitBox <gi...@apache.org>.
squakez commented on issue #2737:
URL: https://github.com/apache/camel-k/issues/2737#issuecomment-975399413


   > @elainhelen if I may join in this thread, I have a question with regards to how you manage to perform `kamel local build xxx.java` as I'm too looking for a solution to a use case similar to yours.
   > 
   > I'm using Camel K Client 1.6.0, and when I did a `kamel local build --integration-directory test Basic.java`, it is returning an error without stack trace.
   > 
   > ```
   > > kamel local build --integration-directory test Basic.java
   > failure while building project: exit status 1
   > ```
   > 
   > Is there anything in particular you have to set up in advance before running the above command?
   
   The `local` is performed on your machine, so you must make sure that you have all the expected tools required by the build process, ie, maven, jdk, quarkus, ... it seems that your error happens when you try to [package the application](https://github.com/apache/camel-k/blob/main/pkg/builder/quarkus.go#L191), so, likely, you don't have all the required configuration needed to run. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] github-actions[bot] closed issue #2737: How to package integration to deploy it into a private k8s cluster without internet connection

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #2737:
URL: https://github.com/apache/camel-k/issues/2737


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] github-actions[bot] commented on issue #2737: How to package integration to deploy it into a private k8s cluster without internet connection

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #2737:
URL: https://github.com/apache/camel-k/issues/2737#issuecomment-1046355370


   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!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] squakez commented on issue #2737: How to package integration to deploy it into a private k8s cluster without internet connection

Posted by GitBox <gi...@apache.org>.
squakez commented on issue #2737:
URL: https://github.com/apache/camel-k/issues/2737#issuecomment-973863920


   A `Kamelet` is essentially a descriptor that will be somehow translated at runtime. In the context of this deployment requirement, I don't think you will need it, once you have your `IntegrationKit` and `Integration` defined.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] zhiminglim commented on issue #2737: How to package integration to deploy it into a private k8s cluster without internet connection

Posted by GitBox <gi...@apache.org>.
zhiminglim commented on issue #2737:
URL: https://github.com/apache/camel-k/issues/2737#issuecomment-975347263


   @elainhelen if I may join in this thread, I have a question with regards to how you manage to perform `kamel local build xxx.java` as I'm too looking for a solution to a use case similar to yours.
   
   I'm using Camel K Client 1.6.0, and when I did a `kamel local build --integration-directory test Basic.java`, it is returning an error without stack trace.
   
   ```
   > kamel local build --integration-directory test Basic.java
   failure while building project: exit status 1
   ```
   
   Is there anything in particular you have to set up in advance before running the above command? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] squakez commented on issue #2737: How to package integration to deploy it into a private k8s cluster without internet connection

Posted by GitBox <gi...@apache.org>.
squakez commented on issue #2737:
URL: https://github.com/apache/camel-k/issues/2737#issuecomment-971385666


   Hi @elainhelen, I don't think we have that option available now. The images created have a unique autogenerated ID instead. I understand that in your situation it may help in order to simplify versioning. I don't know the impact of including any additional property (ie, a tag) when we create the `IntegrationKit`, so, I suggest you to create a new issue describing the feature requested. Of course, feel free to have a look to the code and contribute to the analysis/development as well.
   
   Let me know if there is anything else I can help you with.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] squakez commented on issue #2737: How to package integration to deploy it into a private k8s cluster without internet connection

Posted by GitBox <gi...@apache.org>.
squakez commented on issue #2737:
URL: https://github.com/apache/camel-k/issues/2737#issuecomment-965025785


   Not sure if the `kamel local` is the best strategy to adopt. It involves too many low level details that are coming for free using an operator. I think it would be better if you have a connected environment where installing an operator and leverage the [`IntegrationKit`](https://camel.apache.org/camel-k/next/architecture/cr/integration-kit.html) as a way to package your self-contained resources. Then you can move those kits into the private cluster and be able to reuse there.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] elainhelen commented on issue #2737: How to package integration to deploy it into a private k8s cluster without internet connection

Posted by GitBox <gi...@apache.org>.
elainhelen commented on issue #2737:
URL: https://github.com/apache/camel-k/issues/2737#issuecomment-973597754


   @squakez I haven't done a lot on kamelet.
   With kamelet in the picture, what is the shareable artifact we can build locally and then load into a production env?
   Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org