Use Tanzu Build Service
Note
Azure Spring Apps is the new name for the Azure Spring Cloud service. Although the service has a new name, you'll see the old name in some places for a while as we work to update assets such as screenshots, videos, and diagrams.
This article applies to: ❌ Basic/Standard tier ✔️ Enterprise tier
This article describes the extra configuration and functionality included in VMware Tanzu® Build Service™ with Azure Spring Apps Enterprise Tier.
In Azure Spring Apps, the existing Standard tier already supports compiling user source code into OCI images through Kpack. Kpack is a Kubernetes (K8s) implementation of Cloud Native Buildpacks (CNB) provided by VMware. This article provides details about the extra configurations and functionality exposed in the Azure Spring Apps Enterprise tier.
Build Agent Pool
Tanzu Build Service in the Enterprise tier is the entry point to containerize user applications from both source code and artifacts. There's a dedicated build agent pool that reserves compute resources for a given number of concurrent build tasks. The build agent pool prevents resource contention with your running apps. You can configure the number of resources given to the build agent pool during or after creating a new service instance of Azure Spring Apps using the VMware Tanzu settings.
The Build Agent Pool scale set sizes available are:
| Scale Set | CPU/Gi |
|---|---|
| S1 | 2 vCPU, 4 Gi |
| S2 | 3 vCPU, 6 Gi |
| S3 | 4 vCPU, 8 Gi |
| S4 | 5 vCPU, 10 Gi |
| S5 | 6 vCPU, 12 Gi |
The following image shows the resources given to the Tanzu Build Service Agent Pool after you've successfully provisioned the service instance. You can also update the configured agent pool size.
Default Builder and Tanzu Buildpacks
In the Enterprise Tier, a default builder is provided within Tanzu Build Service with a list of commercial VMware Tanzu® Buildpacks.
Tanzu Buildpacks make it easier to integrate with other software like New Relic. They're configured as optional and will only run with proper configuration. For more information, see the Buildpack bindings section.
The following list shows the Tanzu Buildpacks available in Azure Spring Apps Enterprise edition:
- tanzu-buildpacks/java-azure
- tanzu-buildpacks/dotnet-core
- tanzu-buildpacks/go
- tanzu-buildpacks/nodejs
- tanzu-buildpacks/python
For details about Tanzu Buildpacks, see Using the Tanzu Partner Buildpacks.
Build apps using a custom builder
Besides the default builder, you can also create custom builders with the provided buildpacks.
All the builders configured in a Spring Cloud Service instance are listed in the Build Service section under VMware Tanzu components.
Select Add to create a new builder. The image below shows the resources you should use to create the custom builder.
You can also edit a custom builder when the builder isn't used in a deployment. You can update the buildpacks or the OS Stack, but the builder name is read only.
You can delete any custom builder when the builder isn't used in a deployment, but the default builder is read only.
When you deploy an app, you can build the app by specifying a specific builder in the command:
az spring app deploy \
--name <app-name> \
--builder <builder-name> \
--artifact-path <path-to-your-JAR-file>
If the builder isn't specified, the default builder will be used. The builder is a resource that continuously contributes to your deployments. The builder provides the latest runtime images and latest buildpacks, including the latest APM agents and so on. When you use a builder to deploy the app, the builder and the bindings under the builder aren't allowed to edit and delete. To apply changes to a builder, save the configuration as a new builder. To delete a builder, remove the deployments that use the builder first.
You can also configure the build environment and build resources by using the following command:
az spring-cloud app deploy \
--name <app-name> \
--build-env <key1=value1>, <key2=value2> \
--build-cpu <build-cpu-size> \
--build-memory <build-memory-size> \
--builder <builder-name> \
--artifact-path <path-to-your-JAR-file>
If you're using the tanzu-buildpacks/java-azure buildpack, we recommend that you set the BP_JVM_VERSION environment variable in the build-env argument.
When you use a custom builder in an app deployment, the builder can't make edits and deletions. If you want to change the configuration, create a new builder and use the new builder to deploy the app. After you deploy the app with the new builder, the deployment is linked to the new builder. You can then migrate the deployments under the previous builder to the new builder, and make edits and deletions.
Real-time build logs
A build task will be triggered when an app is deployed from an Azure CLI command. Build logs are streamed in real time as part of the CLI command output. For information on using build logs to diagnose problems, see Analyze logs and metrics with diagnostics settings .
Buildpack bindings
You can configure Kpack Images with Service Bindings as described in the Cloud Native Buildpacks Bindings specification. Azure Spring Apps Enterprise tier uses Service Bindings to integrate with Tanzu Partner Buildpacks. For example, we use Binding to integrate Azure Application Insights using the Paketo Azure Application Insights Buildpack.
Currently, buildpack binding only supports binding the buildpacks listed below. Follow the documentation links listed under each type to configure the properties and secrets for buildpack binding.
ApplicationInsights
NewRelic
Dynatrace
AppDynamics
ElasticAPM
Manage buildpack bindings
You can manage buildpack bindings with the Azure portal or the Azure CLI.
Note
You can only manage buildpack bindings when the parent builder isn't used by any app deployments. To create, update, or delete buildpack bindings of an existing builder, create a new builder and configure new buildpack bindings there.
View buildpack bindings using the Azure portal
Follow these steps to view the current buildpack bindings:
- Open the Azure portal.
- Select Build Service.
- Select Edit under the Bindings column to view the bindings configured under a builder.
Unbind a buildpack binding
There are two ways to unbind a buildpack binding. You can either select the Bound hyperlink and then select Unbind binding, or select Edit Binding and then select Unbind.
If you unbind a binding, the bind status will change from Bound to Unbound.
Next steps
Povratne informacije
Pošalјite i prikažite povratne informacije za