kabanero-io / docs

Kabanero documentation. This repo will be archived soon.
https://kabanero.io/docs/
Apache License 2.0
7 stars 30 forks source link

Document how to add dependency jars for Java Microprofile stack #181

Open mtamboli opened 4 years ago

mtamboli commented 4 years ago

For Liberty applications which are referencing DB2 jars in server.xml file, there is no easy way to copy those files to container image. There is a way to do this by updating generated application pom file. This can be time consuming to figure out so best to document.

I can certainly see this going into Java MicroProfile guide but not sure if other docs can use it too.

<dependency>
     <groupId>com.microsoft.sqlserver</groupId>
     <artifactId>mssql-jdbc</artifactId>
     <version>6.4.0.jre8</version>
    </dependency>      
...

     <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-dependency-plugin</artifactId>
      <version>3.0.1</version>
      <executions>
          <execution>
              <id>copy-resource</id>
              <phase>package</phase>
              <goals>
                  <goal>copy-dependencies</goal>
              </goals>
              <configuration>
               <stripVersion>true</stripVersion>
               <outputDirectory>/project/user-app/target/liberty/wlp/usr/servers/defaultServer/resources/sqljars/</outputDirectory>
               <includeArtifactIds>mssql-jdbc</includeArtifactIds>
              </configuration>
          </execution>
      </executions>
     </plugin>             
marikaj123 commented 4 years ago

It is related to Service binding worked by Arthur and Kyle.

gecock commented 4 years ago

For this issue we simply wanted to get an example of how to do this kind of thing out there as an example for people who are trying this out.

There is a larger design discussion to be had around making this easier, which should be contained in https://github.com/kabanero-io/collections/issues/160

kilnerm commented 4 years ago

If this is covering how to do this today using maven dependencies then the documentation should be requested from the owner of the java-microprofile Appsody stack.

mtamboli commented 4 years ago

I think this should be assigned to YK Chang.

gecock commented 4 years ago

@yeekangc ^^

kilnerm commented 4 years ago

@marikaj123 This is not a collections issue so I have removed myself as owner. This needs assigning to the team who own the java-microprofile stack, I believe, as was noted in the previous two comments, that YK Chang (@yeekangc) is a good starting point.

yeekangc commented 4 years ago

I see at least 2 parts to this:

  1. Document the how today i.e. what has been done. Perhaps @mtamboli and team can help working with the right Docs person (in a guide or whatever appropriate).

  2. Longer term answer on how all these should fit together from the container image up to the template, the stack and the collection. I can see gaps to close and integration issues to work out and may relate to the Service Binding work mentioned above. Can file an issue under Appsody stack repo for this.

FYI, @scottkurz.

marikaj123 commented 4 years ago

@yeekangc - any idea who need to work on this issue beside an ID person?

yeekangc commented 4 years ago

If this needs to be documented now, my suggestion is to update what is needed based on what @mtamboli has worked out.

Going forward, at least for the Liberty/MicroProfile stack, this shall be part of the answer to https://github.com/appsody/stacks/issues/521. When https://github.com/appsody/stacks/issues/521 is resolved, the stack can have documentation that Kabanero documentation can then reference or source from. If this is to be defined by the stack, the source of information shouldn't be captured within Kabanero but by the stack and be taken from there (under Appsody or the stack itself).

As Greg noted, there are broader questions to be answered like what is noted in https://github.com/kabanero-io/collections/issues/160 or from a Service Binding standpoint that is beyond the scope of a stack too.

Charlotte-Holt commented 4 years ago

@yeekangc @kilnerm Does this need to be updated in the Eclipse MP guide (https://kabanero.io/guides/collection-microprofile/)?

yeekangc commented 4 years ago

I believe so. @mtamboli, do you have an opinion?

mtamboli commented 4 years ago

Yes, It would be helpful to document in the guide on how someone will get their database drivers added to the docker image. @nastacio do you think we can link to your guide from Java - MP guide for further details?

nastacio commented 4 years ago

I think that part of the tutorial needs no be formalized by stack owner first. If that workaround is indeed the design we want, then it would be moved to the guide.

yeekangc commented 4 years ago

I will defer the call to update the documentation/tutorial/guide now or later to the Kabanero team or the respective owner(s). We do have an item in the backlog to look at this for the java-microprofile/openliberty stack and work out the strategic answer. No ETA for that yet but I don't expect it to come tomorrow. The respective team(s) can consider what is appropriate in the mean time. What works today is what there is at the moment.

FYI, @scottkurz.

scottkurz commented 4 years ago

Latest discussion here.

marikaj123 commented 4 years ago

According to Scott: Ann R. was notified via an email to help the team to put in place the "big picture" plan and the request is in her good hands. As the big picture gets clear, then we could make decisions about smaller items like should this feature be updated in the java-microprofile stack, java-openliberty stack, or both.