Skip to content

Latest commit

 

History

History

was-liberty-kernel

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

WAS Liberty Kernel experiments

Experiments with WAS Liberty Kernel https://developer.ibm.com/wasdev/downloads/#asset/runtimes-wlp-kernel and wlp/bin/installUtility tool.

Table of Contents

First steps

wget https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/18.0.0.2/wlp-kernel-18.0.0.2.zip
unzip -q wlp-kernel-18.0.0.2.zip
wlp/bin/installUtility install adminCenter-1.0

You will see similar output in the console:

Step 1 of 20: Downloading servlet-3.0 ...
Step 2 of 20: Installing servlet-3.0 ...
Step 3 of 20: Downloading jndi-1.0 ...
Step 4 of 20: Installing jndi-1.0 ...
Step 5 of 20: Downloading ssl-1.0 ...
Step 6 of 20: Installing ssl-1.0 ...
Step 7 of 20: Downloading distributedMap-1.0 ...
Step 8 of 20: Installing distributedMap-1.0 ...
Step 9 of 20: Downloading json-1.0 ...
Step 10 of 20: Installing json-1.0 ...
Step 11 of 20: Downloading jsp-2.2 ...
Step 12 of 20: Installing jsp-2.2 ...
Step 13 of 20: Downloading restConnector-1.0 ...
Step 14 of 20: Installing restConnector-1.0 ...
Step 15 of 20: Downloading adminCenter-1.0 ...
Step 16 of 20: Installing adminCenter-1.0 ...
Step 17 of 20: Downloading jaxrs-1.1 ...
Step 18 of 20: Installing jaxrs-1.1 ...
Step 19 of 20: Validating installed fixes ...
Step 20 of 20: Cleaning up temporary files ...

MicroProfile install experiment

Output of wlp/bin/installUtility find microProfile command:

Establishing a connection to the configured repositories ...
This process might take several minutes to complete.

Successfully connected to all configured repositories.

Searching assets. This process might take several minutes to complete.

feature : microProfile-1.0 : Micro Profile 1.0
feature : microProfile-1.2 : Micro Profile 1.2
feature : microProfile-1.3 : Micro Profile 1.3
feature : mpConfig-1.1 : MicroProfile Config 1.1
feature : mpConfig-1.2 : MicroProfile Config 1.2
feature : mpFaultTolerance-1.0 : MicroProfile Fault Tolerance 1.0
feature : mpHealth-1.0 : MicroProfile Health 1.0
feature : mpMetrics-1.0 : MicroProfile Metrics 1.0
feature : mpMetrics-1.1 : MicroProfile Metrics 1.1
feature : mpOpenAPI-1.0 : MicroProfile OpenAPI 1.0
feature : mpOpenTracing-1.0 : MicroProfile OpenTracing 1.0
feature : mpRestClient-1.0 : MicroProfile Rest Client 1.0

Output of wlp/bin/installUtility install microProfile-1.3 command:

Establishing a connection to the configured repositories ...
This process might take several minutes to complete.

Successfully connected to all configured repositories.

Preparing assets for installation. This process might take several minutes to complete.

...
Select [1] I Agree, or [2] I do not Agree:  1

Step 1 of 40: Downloading servlet-3.1 ...
Step 2 of 40: Installing servlet-3.1 ...
Step 3 of 40: Downloading cdi-1.2 ...
Step 4 of 40: Installing cdi-1.2 ...
Step 5 of 40: Downloading jaxrsClient-2.0 ...
Step 6 of 40: Installing jaxrsClient-2.0 ...
Step 7 of 40: Downloading appSecurity-2.0 ...
Step 8 of 40: Installing appSecurity-2.0 ...
Step 9 of 40: Downloading mpConfig-1.1 ...
Step 10 of 40: Installing mpConfig-1.1 ...
Step 11 of 40: Downloading jaxrs-2.0 ...
Step 12 of 40: Installing jaxrs-2.0 ...
Step 13 of 40: Downloading jsonp-1.0 ...
Step 14 of 40: Installing jsonp-1.0 ...
Step 15 of 40: Downloading mpRestClient-1.0 ...
Step 16 of 40: Installing mpRestClient-1.0 ...
Step 17 of 40: Downloading concurrent-1.0 ...
Step 18 of 40: Installing concurrent-1.0 ...
Step 19 of 40: Downloading mpFaultTolerance-1.0 ...
Step 20 of 40: Installing mpFaultTolerance-1.0 ...
Step 21 of 40: Downloading mpConfig-1.2 ...
Step 22 of 40: Installing mpConfig-1.2 ...
Step 23 of 40: Downloading jwt-1.0 ...
Step 24 of 40: Installing jwt-1.0 ...
Step 25 of 40: Downloading mpJwt-1.0 ...
Step 26 of 40: Installing mpJwt-1.0 ...
Step 27 of 40: Downloading opentracing-1.0 ...
Step 28 of 40: Installing opentracing-1.0 ...
Step 29 of 40: Downloading mpOpenTracing-1.0 ...
Step 30 of 40: Installing mpOpenTracing-1.0 ...
Step 31 of 40: Downloading mpMetrics-1.1 ...
Step 32 of 40: Installing mpMetrics-1.1 ...
Step 33 of 40: Downloading mpOpenAPI-1.0 ...
Step 34 of 40: Installing mpOpenAPI-1.0 ...
Step 35 of 40: Downloading mpHealth-1.0 ...
Step 36 of 40: Installing mpHealth-1.0 ...
Step 37 of 40: Downloading microProfile-1.3 ...
Step 38 of 40: Installing microProfile-1.3 ...
Step 39 of 40: Validating installed fixes ...
Step 40 of 40: Cleaning up temporary files ...

All assets were successfully installed.

Start product validation...
Product validation completed successfully.

First server

wlp/bin/server create myServer
vim wlp/usr/servers/myServer/server.xml
<?xml version="1.0" encoding="UTF-8"?>
<server description="new server">
    <featureManager>
        <feature>adminCenter-1.0</feature>
        <feature>websocket-1.1</feature>
    </featureManager>
   <quickStartSecurity userName="admin" userPassword="admin.password" />
</server>

wlp/bin/server run myServer

Open https://localhost:9443/adminCenter

MP Health minimal server

wlp/bin/server create MP
vim wlp/usr/servers/MP/server.xml
    <featureManager>
        <feature>servlet-3.1</feature>
        <feature>mpHealth-1.0</feature>
    </featureManager>
wlp/bin/server run MP

Server has heap memory footprint 25 MB after 3x GC invoked via jconsole

Server with example application

wlp/bin/installUtility find JPA command output:

Establishing a connection to the configured repositories ...
This process might take several minutes to complete.

Successfully connected to all configured repositories.

Searching assets. This process might take several minutes to complete.

feature : jpa-2.0 : Java Persistence API 2.0
feature : jpa-2.1 : Java Persistence API 2.1
feature : jpa-2.2 : Java Persistence API 2.2
feature : jpaContainer-2.1 : Java Persistence API Container 2.1
feature : jpaContainer-2.2 : Java Persistence API Container 2.2
feature : osgi.jpa-1.0 : OSGi Java Persistence API
sample : OnlinePollingSample : EJB in WAR, CDI and JPA Sample: Online Polling
sample : jpaSample : Java Persistence API (JPA) Sample
opensource : eclipselinkJPASample : Java Persistence API (JPA) EclipseLink Sample
opensource : hibernateJPASample : Java Persistence API (JPA) Hibernate Sample

wlp/bin/installUtility install OnlinePollingSample command output:

Select [1] I Agree, or [2] I do not Agree:  1

One or more samples require open source pre-requisite libraries.

EJB in WAR, CDI and JPA Sample: Online Polling Open Source Dependency Downloads

This sample does not include the open source dependencies it requires to run. The list of open source pre-requisite libraries and where they can be downloaded from is shown below. To simplify obtaining these libraries, accepting this license will instruct the installer to download them on your behalf.

Description: Online Polling Sample Shared Derby Library

http://repo1.maven.org/maven2/org/apache/derby/derby/10.10.1.1/derby-10.10.1.1.jar


Would you like to automatically download these dependencies? Select [1] Yes (default), or [2] No:  1

Step 1 of 14: Downloading jdbc-4.0 ...
Step 2 of 14: Installing jdbc-4.0 ...
Step 3 of 14: Downloading beanValidation-1.0 ...
Step 4 of 14: Installing beanValidation-1.0 ...
Step 5 of 14: Downloading jpa-2.0 ...
Step 6 of 14: Installing jpa-2.0 ...
Step 7 of 14: Downloading cdi-1.0 ...
Step 8 of 14: Installing cdi-1.0 ...
Step 9 of 14: Downloading ejbLite-3.1 ...
Step 10 of 14: Installing ejbLite-3.1 ...
Step 11 of 14: Downloading EJB in WAR, CDI and JPA Sample: Online Polling ...
Step 12 of 14: Installing OnlinePollingSample ...
Step 13 of 14: Validating installed fixes ...
Step 14 of 14: Cleaning up temporary files ...


All assets were successfully installed.

Start product validation...
Product validation completed successfully.

Content of wlp/usr/servers/OnlinePollingSample/server.xml

<server>
   <!-- Enable features -->
   <featureManager>
       <feature>cdi-1.0</feature>
       <feature>ejbLite-3.1</feature>
       <feature>jpa-2.0</feature>
       <feature>jsp-2.2</feature>
   </featureManager>

   <httpEndpoint httpPort="9123" id="defaultHttpEndpoint" />

   <include location="${shared.config.dir}/OnlinePollingSampleDerbyLibs.xml"/>
   <jdbcDriver id="Derby" libraryRef="OnlinePollingSampleDerbyLibs"/>

   <dataSource id="jdbc/DerbyDataSource" jdbcDriverRef="Derby" jndiName="jdbc/DerbyDataSource">
       <properties.derby.embedded createDatabase="create" databaseName="PollingDB"/>
   </dataSource>
   <dataSource id="jdbc/NonTxDerbyDataSource" jdbcDriverRef="Derby" jndiName="jdbc/NonTxDerbyDataSource" transactional="false">
       <properties.derby.embedded createDatabase="create" databaseName="PollingDB"/>
   </dataSource>

</server>
wlp/bin/server run OnlinePollingSample
...
  [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9123/OnlinePollingSampleWeb/

Just open http://localhost:9123/OnlinePollingSampleWeb/