-
Benachrichtigungen
You must be signed in to change notification settings - Fork 6
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
Regression migrating from Standard to Enterprise Tier: Petclinic build fails #30
Kommentare
rerunning the Job I see : Restoring metadata for "paketo-buildpacks/azure-application-insights:helper" from app image
$BPL_JAVA_NMT_ENABLED true enables Java Native Memory Tracking (NMT)
$BPL_JAVA_NMT_LEVEL summary configure level of NMT, summary or detail
$BPL_JFR_ARGS configure custom Java Flight Recording (JFR) arguments
$BPL_JFR_ENABLED false enables Java Flight Recording (JFR)
$BPL_JMX_ENABLED false enables Java Management Extensions (JMX)
$BPL_JMX_PORT 5000 configure the JMX port
$BPL_JVM_HEAD_ROOM 0 the headroom in memory calculation
$BPL_JVM_LOADED_CLASS_COUNT 35% of classes the number of loaded classes in memory calculation
$BPL_JVM_THREAD_COUNT 250 the number of threads in memory calculation
$JAVA_TOOL_OPTIONS the JVM launch flags
Using Java version 11 extracted from MANIFEST.MF
No valid JRE available, providing matching JDK instead. Using a JDK at runtime has security implications.
Microsoft OpenJDK 11.0.16: Contributing to layer
Reusing cached download from buildpack
Expanding to /layers/paketo-buildpacks_microsoft-openjdk/jdk
Adding 127 container CA certificates to JVM truststore
Writing env.build/JAVA_HOME.default
Writing env.launch/BPI_APPLICATION_PATH.default
Writing env.launch/BPI_JVM_CACERTS.default
Writing env.launch/BPI_JVM_CLASS_COUNT.default
Writing env.launch/BPI_JVM_SECURITY_PROVIDERS.default
Writing env.launch/JAVA_HOME.default
Writing env.launch/JAVA_TOOL_OPTIONS.append
Writing env.launch/JAVA_TOOL_OPTIONS.delim
Writing env.launch/MALLOC_ARENA_MAX.default
Launch Helper: Reusing cached layer
Java Security Properties: Reusing cached layer
Paketo Syft Buildpack 1.10.1
https://github.com/paketo-buildpacks/syft
Reusing cached download from buildpack
Writing env.build/SYFT_CHECK_FOR_APP_UPDATE.default
Paketo Buildpack for Executable JAR 6.5.0
https://github.com/paketo-buildpacks/executable-jar
Class Path: Contributing to layer
Writing env/CLASSPATH.delim
Writing env/CLASSPATH.prepend
Process types:
executable-jar: java org.springframework.boot.loader.JarLauncher (direct)
task: java org.springframework.boot.loader.JarLauncher (direct)
web: java org.springframework.boot.loader.JarLauncher (direct)
Paketo Buildpack for Spring Boot 5.19.0
https://github.com/paketo-buildpacks/spring-boot
Build Configuration:
$BP_SPRING_CLOUD_BINDINGS_DISABLED false whether to contribute Spring Boot cloud bindings support
Launch Configuration:
$BPL_SPRING_CLOUD_BINDINGS_DISABLED false whether to auto-configure Spring Boot environment properties from bindings
$BPL_SPRING_CLOUD_BINDINGS_ENABLED true Deprecated - whether to auto-configure Spring Boot environment properties from bindings
Creating slices from layers index
dependencies (84.8 MB)
spring-boot-loader (282.2 KB)
snapshot-dependencies (0.0 B)
application (105.3 KB)
Launch Helper: Reusing cached layer
Spring Cloud Bindings 1.10.0: Reusing cached layer
Web Application Type: Reusing cached layer
4 application slices
Image labels:
org.opencontainers.image.title
org.opencontainers.image.version
org.springframework.boot.version
Paketo Buildpack for Azure Application Insights 5.8.0
https://github.com/paketo-buildpacks/azure-application-insights
Azure Application Insights Java Agent 3.4.2: Reusing cached layer
Launch Helper: Reusing cached layer
Warning: Will not cache data, no cache flag specified.
2022-12-18 11:04:27.292: No log from server
Reusing layers from image 'acr3da318443a37414d8.azurecr.io/build-service-result-image-119e2834b4524cc1982393c691e5c73f-default-vets-service-blue-vets-service@sha256:e3218f998[411](https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv/actions/runs/3715175103/jobs/6316691637#step:10:412)80b22a9383a35473d491228ade003a403e898994268326a39e87'
Reusing layer 'paketo-buildpacks/ca-certificates:helper'
Reusing layer 'paketo-buildpacks/microsoft-openjdk:helper'
Reusing layer 'paketo-buildpacks/microsoft-openjdk:java-security-properties'
Reusing layer 'paketo-buildpacks/microsoft-openjdk:jdk'
Reusing layer 'paketo-buildpacks/executable-jar:classpath'
Reusing layer 'paketo-buildpacks/spring-boot:helper'
WARNING: [5/5] Updating deployment in app "vets-service" (this operation can take a while to complete)
ERROR: 112404: Failed to wait for deployment instances to be ready. Please check the application log (see https://aka.ms/azure-spring-cloud-doc-log ), and try again later.
Reusing layer 'paketo-buildpacks/spring-boot:spring-cloud-bindings'
Reusing layer 'paketo-buildpacks/spring-boot:web-application-type'
Reusing layer 'paketo-buildpacks/azure-application-insights:azure-application-insights-java'
Reusing layer 'paketo-buildpacks/azure-application-insights:helper'
Adding layer 'launch.sbom'
Reusing 5/5 app layer(s)
Reusing layer 'launcher'
Reusing layer 'config'
Reusing layer 'process-types'
Adding label 'io.buildpacks.lifecycle.metadata'
Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Adding label 'org.opencontainers.image.title'
Adding label 'org.opencontainers.image.version'
Adding label 'org.springframework.boot.version'
Setting default process type 'web'
Saving acr3da318443a37[414](https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv/actions/runs/3715175103/jobs/6316691637#step:10:415)d8.azurecr.io/build-service-result-image-119e2834b4524cc1982393c691e5c73f-default-vets-service-blue-vets-service:result...
*** Images (sha256:7793b8db89a50fea7aa73c1078712d7845301df5492156118ae27453da4611dd):
acr3da318443a37414d8.azurecr.io/build-service-result-image-119e2834b4524cc1982393c691e5c73f-default-vets-service-blue-vets-service:result
acr3da318443a37414d8.azurecr.io/build-service-result-image-119e2834b4524cc1982393c691e5c73f-default-vets-service-blue-vets-service:result-3
Error: Process completed with exit code 1.
|
There are other changes that should be documented , mainly the sizing and BP_JVM_VERSION=11 with Enterprise tiers, NOT Java_11 like in Standard Tier. see also MicrosoftDocs/azure-docs#102826 The base image has some difference between enterprise/standard tier, and the some memories may allocated by buildpacks, which results in setting more memories to App deployments with Enterprise Tier. with with Standard Tier : DEPLOYMENT_JVM_OPTIONS: -Xms512m -Xmx1024m
DEPLOYMENT_RUNTIME_VERSION: Java_11
DEPLOYMENT_CPU: 500m
DEPLOYMENT_MEMORY: 1Gi
DEPLOYMENT_INSTANCE_COUNT: 1
az spring app deploy \
--name ${{ env.VETS_SERVICE }} \
--service ${{ env.AZURE_SPRING_APPS_SERVICE }} -g ${{ env.RG_APP }} \
--artifact-path ${{ env.VETS_SERVICE_PACKAGE_PATH }} \
--deployment $DEPLOYMENT_NAME \
--disable-probe true \
--env SPRING_CLOUD_AZURE_KEY_VAULT_ENDPOINT=${{ env.SPRING_CLOUD_AZURE_KEY_VAULT_ENDPOINT }} VETS_SVC_APP_IDENTITY_CLIENT_ID=${{ env.VETS_SVC_APP_IDENTITY_CLIENT_ID }} SPRING_CLOUD_AZURE_TENANT_ID=${{ env.SPRING_CLOUD_AZURE_TENANT_ID }} \
--jvm-options="${{ env.DEPLOYMENT_JVM_OPTIONS }}" \
--version ${{ env.DEPLOYMENT_VERSION }} \
--runtime-version ${{ env.DEPLOYMENT_RUNTIME_VERSION }}
with Enterprise Tier: DEPLOYMENT_JVM_OPTIONS: -Xms1024m -Xmx2048m
DEPLOYMENT_CPU: 500m
DEPLOYMENT_MEMORY: 2Gi
DEPLOYMENT_INSTANCE_COUNT: 1
BP_JVM_VERSION: 11 # just '11' NOT Java_11
BUILD_ENV: BP_JVM_VERSION=11 # Space-separated environment variables in 'key[=value]' format: <key1=value1>, <key2=value2>
BUILD_CPU: 1 # CPU resource quantity. Should be 500m or number of CPU cores. Default: 1.
BUILD_MEMORY: 2Gi # Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi. Default: 2Gi.
BUILDER: default # default or java-builder
CFG_FILE_PATTERNS: application # Config file patterns separated with ',' to decide which patterns of Application Configuration Service will be used. Use '""' to clear existing configurations.
az spring app deploy \
--name ${{ env.VETS_SERVICE }} \
--service ${{ env.AZURE_SPRING_APPS_SERVICE }} -g ${{ env.RG_APP }} \
--artifact-path ${{ env.VETS_SERVICE_PACKAGE_PATH }} \
--deployment $DEPLOYMENT_NAME \
--disable-probe true \
--env SPRING_CLOUD_AZURE_KEY_VAULT_ENDPOINT=${{ env.SPRING_CLOUD_AZURE_KEY_VAULT_ENDPOINT }} VETS_SVC_APP_IDENTITY_CLIENT_ID=${{ env.VETS_SVC_APP_IDENTITY_CLIENT_ID }} SPRING_CLOUD_AZURE_TENANT_ID=${{ env.SPRING_CLOUD_AZURE_TENANT_ID }} \
--jvm-options="${{ env.DEPLOYMENT_JVM_OPTIONS }}" \
--version ${{ env.DEPLOYMENT_VERSION }} \
--build-env ${{ env.BUILD_ENV }} \
--build-cpu ${{ env.BUILD_CPU }} \
--build-memory ${{ env.BUILD_MEMORY }} \
--builder ${{ env.BUILDER }} \
--config-file-patterns ${{ env.CFG_FILE_PATTERNS }} |
DEPLOYMENT_JVM_OPTIONS: -Xms512m -Xmx1024m results in the deployment failure, as a workaround I now use : DEPLOYMENT_JVM_OPTIONS: -Dspring.profiles.active=mysql,key-vault,cloud
DEPLOYMENT_VERSION: 2.6.13
DEPLOYMENT_CPU: 500m
DEPLOYMENT_MEMORY: 2Gi
DEPLOYMENT_INSTANCE_COUNT: 1 |
@ezYakaEagle442 I see it's a long time ago issue, is it solved? |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Repro steps on my repo at https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv
My Java App uses the default builder, it should build successfully as it does with Standard Tier but it fails with Enterprise Tier
See my Deployment Workflow
see the Workflows logs
Expected behavior
The App should be successfully deployed without any error message
Screenshots
N/A
Additional context
see also #29
The text was updated successfully, but these errors were encountered: