Skip to content

Commit c59d326

Browse files
authored
Merge pull request #591 from WASdev/vNext
Merge vNext commits into main
2 parents f46542f + 4234eba commit c59d326

84 files changed

Lines changed: 274 additions & 86 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ before_install:
1010
env:
1111
- RELEASE=../ga/23.0.0.9
1212
- RELEASE=../ga/23.0.0.12
13-
- RELEASE=../ga/24.0.0.1
13+
- RELEASE=../ga/24.0.0.2
1414
- RELEASE=../ga/latest
1515

1616
script:

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ This feature can be controlled via the following variables:
135135
* `SCC_SIZE` (environment variable)
136136
* Description: The size of the application-specific SCC layer in the image. This value is only used if `TRIM_SCC` is set to `"false"`.
137137
* Default: `"80m"`.
138+
* `WARM_ENDPOINT` (environment variable)
139+
* Description: If `"true"`, curl will be used to access the WARM_ENDPOINT_URL (see below) during the population of the SCC. This will increase the amount of information in the SCC and improve first request time in subsequent starts of the image.
140+
* Default: `"true"`.
141+
* `WARM_ENDPOINT_URL` (enviornment variable)
142+
* Description: The URL to access during SCC population if WARM_ENDPOINT is true.
143+
* Default: `"localhost:9080/"`.
138144

139145
## Logging
140146

ga/23.0.0.12/kernel/helpers/build/configure.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ function main() {
179179
if [ ! "$SCC_SIZE" = "" ]; then
180180
cmd+=" -s $SCC_SIZE"
181181
fi
182+
if [ "$WARM_ENDPOINT" = "false" ]; then
183+
cmd+=" -c"
184+
fi
185+
if [ ! "$WARM_ENDPOINT_URL" = "" ]; then
186+
cmd+=" -u $WARM_ENDPOINT_URL"
187+
fi
182188
eval $cmd
183189
fi
184190
}

ga/23.0.0.12/kernel/helpers/build/populate_scc.sh

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# (C) Copyright IBM Corporation 2020.
2+
# (C) Copyright IBM Corporation 2020, 2024
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -24,6 +24,8 @@ set -Eeox pipefail
2424
SCC_SIZE="80m" # Default size of the SCC layer.
2525
ITERATIONS=2 # Number of iterations to run to populate it.
2626
TRIM_SCC=yes # Trim the SCC to eliminate any wasted space.
27+
WARM_ENDPOINT=true
28+
WARM_ENDPOINT_URL=localhost:9080/
2729

2830
# If this directory exists and has at least ug=rwx permissions, assume the base image includes an SCC called 'openj9_system_scc' and build on it.
2931
# If not, build on our own SCC.
@@ -48,7 +50,7 @@ CREATE_LAYER="$OPENJ9_JAVA_OPTIONS,createLayer,groupAccess"
4850
DESTROY_LAYER="$OPENJ9_JAVA_OPTIONS,destroy"
4951
PRINT_LAYER_STATS="$OPENJ9_JAVA_OPTIONS,printTopLayerStats"
5052

51-
while getopts ":i:s:tdh" OPT
53+
while getopts ":i:s:u:tdhwc" OPT
5254
do
5355
case "$OPT" in
5456
i)
@@ -64,13 +66,24 @@ do
6466
d)
6567
TRIM_SCC=no
6668
;;
69+
w)
70+
WARM_ENDPOINT=true
71+
;;
72+
c)
73+
WARM_ENDPOINT=false
74+
;;
75+
u)
76+
WARM_ENDPOINT_URL="${OPTARG}"
77+
;;
6778
h)
6879
echo \
69-
"Usage: $0 [-i iterations] [-s size] [-t] [-d]
80+
"Usage: $0 [-i iterations] [-s size] [-t] [-d] [-w] [-u url]
7081
-i <iterations> Number of iterations to run to populate the SCC. (Default: $ITERATIONS)
7182
-s <size> Size of the SCC in megabytes (m suffix required). (Default: $SCC_SIZE)
7283
-t Trim the SCC to eliminate most of the free space, if any.
7384
-d Don't trim the SCC.
85+
-w Use curl to warm an endpoint during SCC creation. (Default: $WARM_ENDPOINT)
86+
-u The URL endpoint to warm during SCC creation. (Default: $WARM_ENDPOINT_URL)
7487
7588
Trimming enabled=$TRIM_SCC"
7689
exit 1
@@ -98,7 +111,14 @@ then
98111
echo "Calculating SCC layer upper bound, starting with initial size $SCC_SIZE."
99112
# Populate the newly created class cache layer.
100113
/opt/ibm/wlp/bin/server start
114+
115+
if [ ${WARM_ENDPOINT} == true ]
116+
then
117+
curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing"
118+
fi
119+
101120
/opt/ibm/wlp/bin/server stop
121+
102122
# Find out how full it is.
103123
FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'`
104124
echo "SCC layer is $FULL% full. Destroying layer."
@@ -122,6 +142,12 @@ fi
122142
for ((i=0; i<$ITERATIONS; i++))
123143
do
124144
/opt/ibm/wlp/bin/server start
145+
146+
if [ ${WARM_ENDPOINT} == true ]
147+
then
148+
curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing"
149+
fi
150+
125151
/opt/ibm/wlp/bin/server stop
126152
done
127153

@@ -135,6 +161,7 @@ then
135161
chmod -R g+rwx /output/resources
136162
fi
137163

164+
138165
# Tell the user how full the final layer is.
139166
FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'`
140167
echo "SCC layer is $FULL% full."

ga/23.0.0.9/kernel/helpers/build/configure.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ function main() {
176176
if [ ! "$SCC_SIZE" = "" ]; then
177177
cmd+=" -s $SCC_SIZE"
178178
fi
179+
if [ "$WARM_ENDPOINT" = "false" ]; then
180+
cmd+=" -c"
181+
fi
182+
if [ ! "$WARM_ENDPOINT_URL" = "" ]; then
183+
cmd+=" -u $WARM_ENDPOINT_URL"
184+
fi
179185
eval $cmd
180186
fi
181187
}

ga/23.0.0.9/kernel/helpers/build/populate_scc.sh

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# (C) Copyright IBM Corporation 2020.
2+
# (C) Copyright IBM Corporation 2020, 2024
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -24,6 +24,8 @@ set -Eeox pipefail
2424
SCC_SIZE="80m" # Default size of the SCC layer.
2525
ITERATIONS=2 # Number of iterations to run to populate it.
2626
TRIM_SCC=yes # Trim the SCC to eliminate any wasted space.
27+
WARM_ENDPOINT=true
28+
WARM_ENDPOINT_URL=localhost:9080/
2729

2830
# If this directory exists and has at least ug=rwx permissions, assume the base image includes an SCC called 'openj9_system_scc' and build on it.
2931
# If not, build on our own SCC.
@@ -48,7 +50,7 @@ CREATE_LAYER="$OPENJ9_JAVA_OPTIONS,createLayer,groupAccess"
4850
DESTROY_LAYER="$OPENJ9_JAVA_OPTIONS,destroy"
4951
PRINT_LAYER_STATS="$OPENJ9_JAVA_OPTIONS,printTopLayerStats"
5052

51-
while getopts ":i:s:tdh" OPT
53+
while getopts ":i:s:u:tdhwc" OPT
5254
do
5355
case "$OPT" in
5456
i)
@@ -64,13 +66,24 @@ do
6466
d)
6567
TRIM_SCC=no
6668
;;
69+
w)
70+
WARM_ENDPOINT=true
71+
;;
72+
c)
73+
WARM_ENDPOINT=false
74+
;;
75+
u)
76+
WARM_ENDPOINT_URL="${OPTARG}"
77+
;;
6778
h)
6879
echo \
69-
"Usage: $0 [-i iterations] [-s size] [-t] [-d]
80+
"Usage: $0 [-i iterations] [-s size] [-t] [-d] [-w] [-u url]
7081
-i <iterations> Number of iterations to run to populate the SCC. (Default: $ITERATIONS)
7182
-s <size> Size of the SCC in megabytes (m suffix required). (Default: $SCC_SIZE)
7283
-t Trim the SCC to eliminate most of the free space, if any.
7384
-d Don't trim the SCC.
85+
-w Use curl to warm an endpoint during SCC creation. (Default: $WARM_ENDPOINT)
86+
-u The URL endpoint to warm during SCC creation. (Default: $WARM_ENDPOINT_URL)
7487
7588
Trimming enabled=$TRIM_SCC"
7689
exit 1
@@ -98,7 +111,14 @@ then
98111
echo "Calculating SCC layer upper bound, starting with initial size $SCC_SIZE."
99112
# Populate the newly created class cache layer.
100113
/opt/ibm/wlp/bin/server start
114+
115+
if [ ${WARM_ENDPOINT} == true ]
116+
then
117+
curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing"
118+
fi
119+
101120
/opt/ibm/wlp/bin/server stop
121+
102122
# Find out how full it is.
103123
FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'`
104124
echo "SCC layer is $FULL% full. Destroying layer."
@@ -122,6 +142,12 @@ fi
122142
for ((i=0; i<$ITERATIONS; i++))
123143
do
124144
/opt/ibm/wlp/bin/server start
145+
146+
if [ ${WARM_ENDPOINT} == true ]
147+
then
148+
curl --silent --output /dev/null --show-error --fail --max-time 5 ${WARM_ENDPOINT_URL} 2>&1 || echo "WARM_ENDPOINT call failed, continuing"
149+
fi
150+
125151
/opt/ibm/wlp/bin/server stop
126152
done
127153

@@ -135,6 +161,7 @@ then
135161
chmod -R g+rwx /output/resources
136162
fi
137163

164+
138165
# Tell the user how full the final layer is.
139166
FULL=`( java $PRINT_LAYER_STATS || true ) 2>&1 | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'`
140167
echo "SCC layer is $FULL% full."

ga/24.0.0.1/images.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG PARENT_IMAGE=icr.io/appcafe/websphere-liberty:24.0.0.1-kernel-java8-ibmjava-ubi
15+
ARG PARENT_IMAGE=icr.io/appcafe/websphere-liberty:24.0.0.2-kernel-java8-ibmjava-ubi
1616
FROM $PARENT_IMAGE AS installBundle
1717

1818
ARG VERBOSE=false
@@ -36,7 +36,7 @@ RUN set -eux; \
3636
rm -rf /output/workarea /output/logs; \
3737
find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw;
3838

39-
ARG PARENT_IMAGE=icr.io/appcafe/websphere-liberty:24.0.0.1-kernel-java8-ibmjava-ubi
39+
ARG PARENT_IMAGE=icr.io/appcafe/websphere-liberty:24.0.0.2-kernel-java8-ibmjava-ubi
4040
FROM $PARENT_IMAGE
4141
ARG VERBOSE=false
4242

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG PARENT_IMAGE=icr.io/appcafe/websphere-liberty:24.0.0.1-kernel-java11-openj9-ubi
15+
ARG PARENT_IMAGE=icr.io/appcafe/websphere-liberty:24.0.0.2-kernel-java11-openj9-ubi
1616
FROM $PARENT_IMAGE AS installBundle
1717

1818
ARG VERBOSE=false
@@ -36,7 +36,7 @@ RUN set -eux; \
3636
rm -rf /output/workarea /output/logs; \
3737
find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw;
3838

39-
ARG PARENT_IMAGE=icr.io/appcafe/websphere-liberty:24.0.0.1-kernel-java11-openj9-ubi
39+
ARG PARENT_IMAGE=icr.io/appcafe/websphere-liberty:24.0.0.2-kernel-java11-openj9-ubi
4040
FROM $PARENT_IMAGE
4141
ARG VERBOSE=false
4242

0 commit comments

Comments
 (0)