OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.15k stars 591 forks source link

Core application stack for Open Liberty (4Q20 tech preview) #9343

Closed yeekangc closed 3 years ago

yeekangc commented 5 years ago

Enhance and develop application stacks/templates for Open Liberty, MicroProfile and Jakarta EE

An application stack is a stack that can be defined and built with a tool like Appsody that enables developers to create and build applications fast and easily with containers.

yeekangc commented 5 years ago

Dev mode support for Appsody is tracked by OpenLiberty/ci.maven#659.

gcharters commented 5 years ago

I'd like us to prioritize getting Dev Mode integrated into the existing stack, keeping the current separation of responsibilities and default template. This will make it much more usable / demoable and the other items can follow.

yeekangc commented 5 years ago

We are looking at Dev Mode integration as priority starting with the issues that were encountered. @ericglau

yeekangc commented 4 years ago

FYI, @NottyCode. It wasn't in the backlog project but I have added it in now.

scottkurz commented 4 years ago

Now that we have released the new java-openliberty stack with dev mode support: https://github.com/appsody/stacks/releases/tag/java-openliberty-v0.1.0

let me update this with some priorities for the next quarter or so:

atosak commented 4 years ago

DELETING release checklist, since this is a Non-Release epic.

yeekangc commented 4 years ago

Appsody is evolving. This feature now covers the work required to deliver a stack based on dev files and odo.

scottkurz commented 4 years ago

Work will be tracked in https://github.com/OpenLiberty/application-stack/issues/2

scottkurz commented 4 years ago

UFO design doc: https://ibm.box.com/s/0rnnsg6sh6lv6edq4f6hzkhrakc3sgu1

Emily-Jiang commented 4 years ago

UFO review action items:

  1. slide 9: Odo CLI - demonstrate non OpenShift usage

  2. Slide 16: oc login should not be necessary for k8s

  3. slide 20: odo create component java-openliberty => odo create java-openliberty component it should also mention only deployment files were generated while the existing source files are unchanged and no source files were generated.

  4. Slide 27: Starter set: should explicitly call out CDI

  5. Slide 29: On the server.xml, it is better to mention cdi-2.0 and jaxrs-2.1 to make them more visible instead of assuming everyone knows mpHealth brings in CDI. Also it is unclear which version of CDI was brought in. Hence adding the CDI and JAX-RS explicitely makes more sense.

  6. Document json-logging

  7. slide 29: Document configDropins/defaults/quick-start-security.xml will be dev env only and when packing in a container, the file will not be packaged.

Emily-Jiang commented 4 years ago

UFO review Part 2 comments: slide 28: Health Check -> MicroProfile Health slide 30: type="javax.sql.XADataSource" is not needed. user and password are not best practices. StarterReadinessCheck.java should demonstrate the database connection usage.

JDBCLib1 ->JDBCDriverLib1 Delete PersonService.java and Person.java from the generated code. Move them to tck if needed.

slide 31: StarterApplication.java should be removed. Move it to TCK to demonstrate the usage if needed.

Emily-Jiang commented 4 years ago

UFO review part 3 comments: slide 58: Control Dockerfile and cater for mpHealth and mpMetrics

donbourne commented 4 years ago

UFO review part 4 - no comments/actions.

scottkurz commented 4 years ago

Addressed all three rounds of comments.

Note that there was a broad comment that the starters should strictly include code unlikely to be deleted, and anything "extra" should be left for our sample repo: https://github.com/OpenLiberty/application-stack-samples.

We will certainly work towards that and update the UFO as necessary, but I don't think the point was to pin down, upfront, EXACTLY what is vs. isn't in the starters in the UFO design, so I'm not worried for now that we haven't pinned that down completely. We will review with @yeekangc , @gcharters as needed.

scottkurz commented 4 years ago

CHANGE HISTORY

scottkurz commented 4 years ago

TODO

1. Java 8

Especially in light of our modernization stack feature, we may want to include a Java 8 stack (stack image and Dockerfile). And maybe this is useful enough for general migration-to-stack cases that we'd want to do this even without considering that feature Perhaps this might be an extension of the mainline Java 11 stack.

2. Open Liberty Starter

We should consider aligning with a couple aspects of the Open Liberty starter feature: https://github.com/OpenLiberty/openliberty.io/issues/1424 design:

  1. Dockerfile - The 1424 feature builds from src/main/liberty/config whereas we'd thought we'd build from target to allow incorporation of the Maven property -> config artifact translation to occur, and also copyDependencies (when JDBC drivers etc. are supported), and potentially even other config gen later on.
  2. If the OL starter includes any deploy YAML for k8s, it seems it should align with the stack outer loop deploy YAML. (Or should the user just be using the stack in the first place?)
  3. Align with OL starter REST app which is simply:
    
    package com.demo.rest;
    import javax.ws.rs.ApplicationPath;
    import javax.ws.rs.core.Application;

@ApplicationPath("/api") public class RestApplicationextends Application {}

4.  The stack should probably add a couple elements of server config from the design:
```xml
<!--Automatically expand WAR files and EAR files -->
<applicationManager autoExpand="true"/>

<!--Default SSL configuration enables trust for default certificates from the Java runtime -->
<sslid="defaultSSLConfig" trustDefaultCerts="true" />
scottkurz commented 3 years ago

Closing this as complete. Next related feature is #14892

scottkurz commented 3 years ago

We can summarize the 4Q work as:

yeekangc commented 3 years ago

odo/devfile-based stack is available at https://github.com/OpenLiberty/application-stack.