Giter VIP home page Giter VIP logo

spring-apps-deploy's Issues

Support for Java 17 and Spring Boot 3

I have a Java 17/Spring Boot 3 application that I'm able to deploy to Azure Spring Apps using Azure cli.

I prepared a deployment using Actions and I can specify Java_17 as runtime.

- name: Deploy api-gateway
      uses: azure/spring-apps-deploy@v1
      with:
        azure-subscription: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
        action: deploy
        service-name: ${{ secrets.SPRING_APPS_SERVICE_NAME }}
        app-name: ${{ env.API_GATEWAY }}
        use-staging-deployment: false
        package: ${{ github.workspace }}/${{ env.API_GATEWAY_JAR }}
        jvm-options: -Xms2048m -Xmx2048m
        runtime-version: Java_17
        environment-variables: -SPRING_PROFILES_ACTIVE passwordless

There is no validation issues on the action, but the deployment fails. Here the logs on the application side:

Build in Environment Variables
BUILD_IN_EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=https://fmiguel-spring-petclinic.svc.azuremicroservices.io/eureka/eureka
BUILD_IN_SPRING_CLOUD_CONFIG_URI=https://fmiguel-spring-petclinic.svc.azuremicroservices.io/config
BUILD_IN_SPRING_CLOUD_CONFIG_FAILFAST=true
[Azure Spring Cloud] The following environment variables are loaded: SPRING_PROFILES_ACTIVE
Picked up JAVA_TOOL_OPTIONS:  -Xms2048m -Xmx2048m
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
2023-01-16 10:28:25.157Z INFO  c.m.applicationinsights.agent - Application Insights Java Agent 3.4.4 started successfully (PID 1, JVM running for 9.397 s)
2023-01-16 10:28:25.232Z INFO  c.m.applicationinsights.agent - Java version: 17.0.5, vendor: Microsoft, home: /usr/lib/jvm/msopenjdk-17
10:28:36.658 [main] DEBUG org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter - Application failed to start due to an exception
java.lang.NoSuchMethodError: 'org.springframework.http.HttpStatus org.springframework.http.ResponseEntity.getStatusCode()'
        at com.microsoft.azure.telemetry.TelemetrySender.sendTelemetryData(TelemetrySender.java:58)
        at com.microsoft.azure.telemetry.TelemetrySender.send(TelemetrySender.java:74)
        at com.microsoft.azure.keyvault.spring.KeyVaultEnvironmentPostProcessorHelper.sendTelemetry(KeyVaultEnvironmentPostProcessorHelper.java:219)
        at com.microsoft.azure.keyvault.spring.KeyVaultEnvironmentPostProcessorHelper.<init>(KeyVaultEnvironmentPostProcessorHelper.java:56)
        at com.microsoft.azure.keyvault.spring.KeyVaultEnvironmentPostProcessor.postProcessEnvironment(KeyVaultEnvironmentPostProcessor.java:40)
        at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:109)
        at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:94)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
        at org.springframework.boot.context.event.EventPublishingRunListener.multicastInitialEvent(EventPublishingRunListener.java:136)
        at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:81)
        at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:64)
        at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118)
        at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112)
        at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:63)
        at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:352)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291)
        at org.springframework.samples.petclinic.api.ApiGatewayApplication.main(ApiGatewayApplication.java:50)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:95)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
10:28:36.733 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter -

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    com.microsoft.azure.telemetry.TelemetrySender.sendTelemetryData(TelemetrySender.java:58)

The following method did not exist:

    'org.springframework.http.HttpStatus org.springframework.http.ResponseEntity.getStatusCode()'

The calling method's class, com.microsoft.azure.telemetry.TelemetrySender, was loaded from the following location:

    jar:file:/tmp/668c2a7f-89a0-4710-af05-68fdde4720c9!/BOOT-INF/lib/azure-spring-boot-2.3.0.jar!/com/microsoft/azure/telemetry/TelemetrySender.class

The called method's class, org.springframework.http.ResponseEntity, is available from the following locations:

    jar:file:/tmp/668c2a7f-89a0-4710-af05-68fdde4720c9!/BOOT-INF/lib/spring-web-6.0.3.jar!/org/springframework/http/ResponseEntity.class

The called method's class hierarchy was loaded from the following locations:

    org.springframework.http.ResponseEntity: jar:file:/tmp/668c2a7f-89a0-4710-af05-68fdde4720c9!/BOOT-INF/lib/spring-web-6.0.3.jar!/
    org.springframework.http.HttpEntity: jar:file:/tmp/668c2a7f-89a0-4710-af05-68fdde4720c9!/BOOT-INF/lib/spring-web-6.0.3.jar!/


Action:

Correct the classpath of your application so that it contains compatible versions of the classes com.microsoft.azure.telemetry.TelemetrySender and org.springframework.http.ResponseEntity

Deploying the same application using Azure cli (2.44.0) works.

az spring app deploy  \
  --resource-group ${RESOURCE_GROUP} \
  --service ${SPRING_CLOUD_SERVICE} \
  --name ${API_GATEWAY} \
  --artifact-path ${API_GATEWAY_JAR} \
  --jvm-options='-Xms2048m -Xmx2048m' \
  --runtime-version Java_17 \
  --env SPRING_PROFILES_ACTIVE=passwordless

Is there any library on the Github Action side that needs to be upgraded?

Action failed with error: Service tier not recognizable in service

Using the sample from the readme with following action

        name: deploy to production with artifact
        uses: Azure/spring-apps-deploy@v1
        with:
          azure-subscription: ${{ env.AZURE_SUBSCRIPTION }}
          action: Deploy
          service-name: ${{ env.SERVICE_NAME }}
          app-name: ${{ env.APP_NAME }}
          use-staging-deployment: false
          package: ${{ env.ASC_PACKAGE_PATH }}/**/*.jar

Getting this error: Error: Action failed with error: Service tier not recognizable in service appname app serviceName.
Using Azure spring apps on Standard consumption & dedicated (preview)

Deployment fails for custom container - no error logged

I use the action to deploy a custom container from github container registry:

  deploy:
    runs-on: ubuntu-latest
    name: deploy
    steps:
      - name: Login via Azure CLI
        uses: azure/login@v1
        with:
          creds: ${{ secrets.AZURE_CREDENTIALS }}
      - name: Deploy custom container image
        uses: azure/spring-apps-deploy@v1
        with:
          azure-subscription: ${{ vars.AZURE_SPRING_APPS_SUBSCRIPTION }}
          action: deploy
          service-name: ${{ vars.AZURE_SPRING_APPS_SERVICE_NAME }}
          app-name: ${{ vars.AZURE_SPRING_APPS_APP_NAME }}
          use-staging-deployment: false
          container-registry: ghcr.io
          registry-username: ${{ github.actor }}
          registry-password: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
          container-image: username/repo:v1

The action runs for 16 minutes before failing without error message:

Warning: Deployment failed. Please check the application logs for more details.
Error: Action failed with error:
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Deploy custom container image

I was able to trace it back to this function:

https://github.com/Azure/spring-apps-deploy/blob/main/src/DeploymentProvider/DeploymentHelper.ts#L463-L472

    private static async deployWithLog(client: asa.AppPlatformManagementClient, params: ActionParameters, deploymentResource: asa.DeploymentResource) {
        try {
            const response = await client.deployments.beginCreateOrUpdateAndWait(params.resourceGroupName, params.serviceName, params.appName, params.deploymentName, deploymentResource);
            core.debug('deploy response: ' + JSON.stringify(response));
        } catch (e:any) {
            core.warning("Deployment failed. Please check the application logs for more details.");
            await this.printLatestAppInstanceLog(client, params);
            throw e;
        }
    }

Could we add the err to the warning message. When the error is thrown, it doesn't log error.message in main.ts:

core.setFailed("Action failed with error: " + error.message);

Is there any insight I can have as to why azure isn't deploying the container? I was able to pull the image from ghcr using the same username and personal access token it locally

Deployment fails with Error: Action failed with error: deploymentName cannot be null or undefined.

I have a GH Workflow to deploy my *.jar files to ASA which did run fine so far, since the latest release of the ASA GH Action, it does not work anymore.

Deployment fails with the error below :
Error: Action failed with error: deploymentName cannot be null or undefined.

Whereas all the Runner logs show that the deployment-name param was successfully provided :
deployment-name: blue-vets-service

see https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv/actions/runs/3322102903/jobs/5491343365 :

##[debug]Evaluating condition for step: 'Deploy vets-service'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Deploy vets-service
##[debug]Loading inputs
##[debug]Evaluating: secrets.AZURE_SUBSCRIPTION
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'AZURE_SUBSCRIPTION'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: env.AZURE_SPRING_APPS_SERVICE
##[debug]Evaluating Index:
##[debug]..Evaluating env:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'AZURE_SPRING_APPS_SERVICE'
##[debug]=> 'asa-petcliasa'
##[debug]Result: 'asa-petcliasa'
##[debug]Evaluating: env.VETS_SERVICE
##[debug]Evaluating Index:
##[debug]..Evaluating env:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'VETS_SERVICE'
##[debug]=> 'vets-service'
##[debug]Result: 'vets-service'
##[debug]Evaluating: env.DEPLOYMENT_STAGING
##[debug]Evaluating Index:
##[debug]..Evaluating env:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'DEPLOYMENT_STAGING'
##[debug]=> 'true'
##[debug]Result: 'true'
##[debug]Evaluating: needs.build.outputs.VETS_SERVICE_PACKAGE_PATH
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating needs:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'build'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'outputs'
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'VETS_SERVICE_PACKAGE_PATH'
##[debug]=> '/home/runner/work/azure-spring-apps-petclinic-mic-srv/azure-spring-apps-petclinic-mic-srv/vets-service/asa-spring-petclinic-vets-service-2.6.6.jar'
##[debug]Result: '/home/runner/work/azure-spring-apps-petclinic-mic-srv/azure-spring-apps-petclinic-mic-srv/vets-service/asa-spring-petclinic-vets-service-2.6.6.jar'
##[debug]Evaluating: env.DEPLOYMENT_JVM_OPTIONS
##[debug]Evaluating Index:
##[debug]..Evaluating env:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'DEPLOYMENT_JVM_OPTIONS'
##[debug]=> '-Dspring.cloud.azure.keyvault.secret.endpoint=https://kv-petcliasa21.vault.azure.net -Dspring.cloud.azure.keyvault.secret.property-sources[0].endpoint=https://kv-petcliasa21.vault.azure.net -Dspring.cloud.azure.keyvault.secret.property-sources[1].endpoint=https://kv-petcliasa21.vault.azure.net -Dspring.cloud.azure.keyvault.secret.property-sources[2].endpoint=https://kv-petcliasa21.vault.azure.net -Xms[51](https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv/actions/runs/3322102903/jobs/5491343365#step:5:51)2m -Xmx1024m -Dspring.profiles.active=mysql,key-vault,cloud'
##[debug]Result: '-Dspring.cloud.azure.keyvault.secret.endpoint=https://kv-petcliasa21.vault.azure.net -Dspring.cloud.azure.keyvault.secret.property-sources[0].endpoint=https://kv-petcliasa21.vault.azure.net -Dspring.cloud.azure.keyvault.secret.property-sources[1].endpoint=https://kv-petcliasa21.vault.azure.net -Dspring.cloud.azure.keyvault.secret.property-sources[2].endpoint=https://kv-petcliasa21.vault.azure.net -Xms512m -Xmx1024m -Dspring.profiles.active=mysql,key-vault,cloud'
##[debug]Evaluating: format('-SPRING_CLOUD_AZURE_KEY_VAULT_ENDPOINT ***0*** -VETS_SVC_APP_IDENTITY_CLIENT_ID ***1*** -SPRING_CLOUD_AZURE_TENANT_ID ***2***', env.SPRING_CLOUD_AZURE_KEY_VAULT_ENDPOINT, env.VETS_SVC_APP_IDENTITY_CLIENT_ID, env.SPRING_CLOUD_AZURE_TENANT_ID)
##[debug]Evaluating format:
##[debug]..Evaluating String:
##[debug]..=> '-SPRING_CLOUD_AZURE_KEY_VAULT_ENDPOINT ***0*** -VETS_SVC_APP_IDENTITY_CLIENT_ID ***1*** -SPRING_CLOUD_AZURE_TENANT_ID ***2***'
##[debug]..Evaluating Index:
##[debug]....Evaluating env:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'SPRING_CLOUD_AZURE_KEY_VAULT_ENDPOINT'
##[debug]..=> '***'
##[debug]..Evaluating Index:
##[debug]....Evaluating env:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'VETS_SVC_APP_IDENTITY_CLIENT_ID'
##[debug]..=> '7c4fdc76-698e-4a[53](https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv/actions/runs/3322102903/jobs/5491343365#step:5:53)-aac8-1e594f4e4a[54](https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv/actions/runs/3322102903/jobs/5491343365#step:5:54)'
##[debug]..Evaluating Index:
##[debug]....Evaluating env:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'SPRING_CLOUD_AZURE_TENANT_ID'
##[debug]..=> '***'
##[debug]=> '-SPRING_CLOUD_AZURE_KEY_VAULT_ENDPOINT *** -VETS_SVC_APP_IDENTITY_CLIENT_ID 7c4fdc76-698e-4a53-aac8-1e[59](https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv/actions/runs/3322102903/jobs/5491343365#step:5:59)4f4e4a54 -SPRING_CLOUD_AZURE_TENANT_ID ***'
##[debug]Result: '-SPRING_CLOUD_AZURE_KEY_VAULT_ENDPOINT *** -VETS_SVC_APP_IDENTITY_CLIENT_ID 7c4fdc76-[69](https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv/actions/runs/3322102903/jobs/5491343365#step:5:69)8e-4a53-aac8-1e5[94](https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv/actions/runs/3322102903/jobs/5491343365#step:5:94)f4e4a54 -SPRING_CLOUD_AZURE_TENANT_ID ***'
##[debug]Evaluating: needs.build.outputs.VETS_SERVICE_DEPLOYMENT
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating needs:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'build'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'outputs'
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'VETS_SERVICE_DEPLOYMENT'
##[debug]=> 'blue-vets-service'
##[debug]Result: 'blue-vets-service'
##[debug]Evaluating: env.DEPLOYMENT_CREATE_NEW
##[debug]Evaluating Index:
##[debug]..Evaluating env:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'DEPLOYMENT_CREATE_NEW'
##[debug]=> 'true'
##[debug]Result: 'true'
##[debug]Evaluating: env.DEPLOYMENT_VERSION
##[debug]Evaluating Index:
##[debug]..Evaluating env:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'DEPLOYMENT_VERSION'
##[debug]=> '2.6.6'
##[debug]Result: '2.6.6'
##[debug]Evaluating: env.DEPLOYMENT_RUNTIME_VERSION
##[debug]Evaluating Index:
##[debug]..Evaluating env:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'DEPLOYMENT_RUNTIME_VERSION'
##[debug]=> 'Java_11'
##[debug]Result: 'Java_11'
##[debug]Loading env

Run Azure/[email protected]
  with:
    azure-subscription: ***
    action: deploy
    service-name: asa-petcliasa
    app-name: vets-service
    use-staging-deployment: true
    package: /home/runner/work/azure-spring-apps-petclinic-mic-srv/azure-spring-apps-petclinic-mic-srv/vets-service/asa-spring-petclinic-vets-service-2.6.6.jar
    jvm-options: -Dspring.cloud.azure.keyvault.secret.endpoint=https://kv-petcliasa21.vault.azure.net -Dspring.cloud.azure.keyvault.secret.property-sources[0].endpoint=https://kv-petcliasa21.vault.azure.net -Dspring.cloud.azure.keyvault.secret.property-sources[1].endpoint=https://kv-petcliasa21.vault.azure.net -Dspring.cloud.azure.keyvault.secret.property-sources[2].endpoint=https://kv-petcliasa21.vault.azure.net -Xms512m -Xmx1024m -Dspring.profiles.active=mysql,key-vault,cloud
    environment-variables: -SPRING_CLOUD_AZURE_KEY_VAULT_ENDPOINT *** -VETS_SVC_APP_IDENTITY_CLIENT_ID 7c4fdc76-698e-4a53-aac8-1e594f4e4a54 -SPRING_CLOUD_AZURE_TENANT_ID ***
    deployment-name: blue-vets-service
    create-new-deployment: true
    version: 2.6.6
    runtime-version: Java_11
  env:
    AZ_CLI_VERSION: 2.40.0
    AZURE_SPRING_APPS_SERVICE: asa-petcliasa
    KEYVAULT: kv-petcliasa21
    RG_APP: rg-iac-asa-petclinic-mic-srv
    AZ_STORAGE_NAME: stasapetcliasa
    AZ_BLOB_CONTAINER_NAME: petcliasa-blob
    AZ_BLOB_MAX_CONNECTIONS: 5
StartingUploadOf/home/runner/work/azure-spring-apps-petclinic-mic-srv/azure-spring-apps-petclinic-mic-srv/vets-service/asa-spring-petclinic-vets-service-2.6.6.jar
*** loadedBytes: 4194304 ***
*** loadedBytes: 8388608 ***
*** loadedBytes: 12582912 ***
*** loadedBytes: 16777216 ***
*** loadedBytes: 20971520 ***
*** loadedBytes: 25165824 ***
*** loadedBytes: 29360128 ***
*** loadedBytes: 33554432 ***
*** loadedBytes: 37748736 ***
*** loadedBytes: 41943040 ***
*** loadedBytes: 46137344 ***
*** loadedBytes: 50331648 ***
*** loadedBytes: 54525952 ***
*** loadedBytes: 58720256 ***
*** loadedBytes: 62914560 ***
*** loadedBytes: 67108864 ***
*** loadedBytes: 7[130](https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv/actions/runs/3322102903/jobs/5491343365#step:5:130)3168 ***
*** loadedBytes: 7[209](https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv/actions/runs/3322102903/jobs/5491343365#step:5:210)6613 ***
*** loadedBytes: 76290917 ***
*** loadedBytes: 80485[221](https://github.com/ezYakaEagle442/azure-spring-apps-petclinic-mic-srv/actions/runs/3322102903/jobs/5491343365#step:5:222) ***
*** loadedBytes: 84679525 ***
*** loadedBytes: 88873829 ***
CompletedUploadOf/home/runner/work/azure-spring-apps-petclinic-mic-srv/azure-spring-apps-petclinic-mic-srv/vets-service/asa-spring-petclinic-vets-service-2.6.6.jar
##[debug]list deployments response: []
Error: Action failed with error: deploymentName cannot be null or undefined.
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Deploy vets-service

Is this error related to this snippet ? : https://github.com/Azure/spring-apps-deploy/blob/main/src/operations/ActionParameters.ts#L69

RFE: Probe support

How to define ASA Probe using GH Action for Azure Spring Apps ?

Like in Bicep

// https://learn.microsoft.com/en-us/azure/templates/microsoft.appplatform/2022-09-01-preview/spring/apps/deployments?pivots=deployment-language-bicep
resource customersserviceappdeployment 'Microsoft.AppPlatform/Spring/apps/deployments@2022-09-01-preview' = {
  name: 'aca-${appName}-customers-service-init-v.0.1.0'
  parent: customersserviceapp
  sku: {
    name: azureSpringAppsSkuName
  }
  properties: {
    active: true
    deploymentSettings: {
      addonConfigs: {}
      environmentVariables: {
        XXX: 'foo'
        ZZZ: 'bar'
      }
      containerProbeSettings: {
        disableProbe: false
      }
      livenessProbe: {
        disableProbe: false
        failureThreshold: 5
        initialDelaySeconds: 30
        periodSeconds: 60
        probeAction: {
          type: 'HTTPGetAction'
        }
        successThreshold: 1
        timeoutSeconds: 30

      }
      readinessProbe: {
        disableProbe: false
        failureThreshold: 5
        initialDelaySeconds: 30
        periodSeconds: 60
        probeAction: {
          type: 'HTTPGetAction'
        }
        successThreshold: 1
        timeoutSeconds: 30
      }
      resourceRequests: {
          cpu: any(1)
          memory: any(1)
      }
    }
    
    source: {
      version: '1.0.0'
      
      
      type: 'Jar' // Jar, Container or Source https://learn.microsoft.com/en-us/azure/templates/microsoft.appplatform/2022-09-01-preview/spring/apps/deployments?pivots=deployment-language-bicep#usersourceinfo
      jvmOptions: '-Dazure.keyvault.uri=${kvURL} -Xms512m -Xmx1024m -Dspring.profiles.active=mysql,key-vault,cloud'
      relativePath: 'spring-petclinic-customers-service' // './target/petclinic-customers-service-2.6.6.jar'
      runtimeVersion: 'Java_11'
      
      type: 'Container' 
      customContainer:  {
        containerImage: 'https://acrpetcliasa.azurecr.io/petclinic/petclinic-customers-service:4242' // Container image of the custom container. This should be in the form of {repository}:{tag} without the server name of the registry	
        command: ['java', '-jar petclinic-customers-service-2.6.6.jar', '--server.port=8080', '--spring.profiles.active=docker,mysql'] 
        server: 'acrpetcliasa.azurecr.io' // 	The name of the registry that contains the container image
        imageRegistryCredential: {
          username: 'AcrUserName'
          password: 'AcrPassword'
        }
        languageFramework: 'Java'
        args: '' // Arguments to the entrypoint. The docker image's CMD is used if this is not provided.
      }
      
      type: 'Source' // Jar, Container or Source https://learn.microsoft.com/en-us/azure/templates/microsoft.appplatform/2022-09-01-preview/spring/apps/deployments?pivots=deployment-language-bicep#usersourceinfo
      relativePath: 'spring-petclinic-customers-service'
      runtimeVersion: 'Java_11'
      artifactSelector: 'spring-petclinic-customers-service' // Selector for the artifact to be used for the deployment for multi-module projects. This should be the relative path to the target module/project.
      
    }
  }
}

@RuoyuWang-MS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.