Skip to main content
Version: 2.0.0

Install / Deploy

This document provides step-by-step instructions to:

  • Build the CRUD API Docker image
  • Tag the image using the standard tagging convention
  • Push the image to Azure Container Registry (ACR)
  • Deploy the application to SAP BTP Cloud Foundry
  • Verify deployment and application health

Prerequisites

Ensure the following tools are installed and configured:

Required Tools

ToolPurpose
DockerBuild container image
Azure CLILogin to Azure & ACR
CF CLIDeploy to SAP BTP Cloud Foundry
GitSource control
Java 17+Build application
MavenBuild Spring Boot application

Project Structure

Example structure:

crud-api/
├── Dockerfile
├── manifest.yml
├── pom.xml
├── src/
└── target/

Build the Spring Boot Application

Navigate to the project root directory.

Maven Build:

mvn clean install

After a successful build: target/crud-api.jar will be generated.

Docker Image Tagging Strategy

Mandatory Tagging Convention

<container-registry>.azurecr.io/<app-name>:<version>_<project-name>_<commit-id>_<date-of-creation>

Example:

wblnd.azurecr.io/cherrywork-crud-api:v1.0_iwm_a1b2c3_07052026

Tag Components

ComponentDescription
versionApplication version
project-nameCustomer/project/environment
commit-idGit commit ID
date-of-creationDDMMYYYY

Login to Azure

az login

Login to Azure Container Registry (ACR)

az acr login -n wblnd

Build Docker Image

docker build -t wblnd.azurecr.io/cherrywork-crud-api:v1.0_iwm_a1b2c3_07052026 .

Push Docker Image to ACR

docker push wblnd.azurecr.io/cherrywork-crud-api:v1.0_iwm_a1b2c3_07052026

Verify Image in ACR

List images:

az acr repository list --name wblnd --output table

List tags:

az acr repository show-tags --name wblnd --repository cherrywork-crud-api --output table

Cloud Foundry Login

Login to SAP BTP Cloud Foundry:

cf login

Provide:

  • API Endpoint
  • Username
  • Password
  • Org
  • Space

Manifest File Configuration

Example manifest.yml:

applications:
- name: cw-caf-crudapi-dev
memory: 1024M
timeout: 120
random-route: false
docker:
image: wblnd.azurecr.io/cherrywork-crud-api:v1.0_itm_a1b2c3_07052026
username: wblnd
env:
SPRING_APPLICATION_JSON: >
{
"spring.application.name":"crud-api-dev-btp",
"spring.config.import":"optional:configserver:https://cherryworkproducts-config-server.cfapps.eu10-004.hana.ondemand.com",
"spring.profiles.active":"configDB,readYamlFromConfig"
}
services:
- cherrywork-iwm-xsuaa-srv

Application Configuration

The application reads datasource and environment configuration from the Config Server.

Enable Refresh Endpoint:

management.endpoints.web.exposure.include=refresh

Context Path:

server.servlet.context-path=/crud

Connection Pool:

executorPoolSize=8
maximumPoolSize=10
minimumIdle=1

Batch Processing:

batchSize=5000
fetchSize=5000

Deploy Application to Cloud Foundry

cf push
# OR
cf push -f manifest.yml

Verify Deployment

Check Application Status:

cf apps

Expected Status:

  • requested state: started
  • instances: 1/1
Code Change

Maven Build

Docker Build

Docker Push to ACR

Update manifest.yml

CF Push

Verify Logs & Health

Example Complete Deployment Flow

Step 1 – Build JAR:

mvn clean install

Step 2 – Azure Login:

az login

Step 3 – ACR Login:

az acr login -n wblnd

Step 4 – Docker Build:

docker build -t wblnd.azurecr.io/cherrywork-crud-api:v1.0_iwm_a1b2c3_07052026 .

Step 5 – Push Image:

docker push wblnd.azurecr.io/cherrywork-crud-api:v1.0_iwm_a1b2c3_07052026

Step 6 – Login to CF:

cf login

Step 7 – Deploy:

cf push -f manifest.yml

Step 8 – Verify:

cf apps
cf logs cw-caf-crudapi-dev --recent

Troubleshooting

Application Crash

Check logs:

cf logs cw-caf-crudapi-dev --recent

Docker Image Pull Failure

Verify:

  • Image exists in ACR
  • Correct image tag
  • ACR permissions
  • Docker username configured correctly

Config Server Connection Failure

Verify:

  • Config server URL
  • Active profiles
  • Network accessibility
  • SSL certificates

Database Connection Failure

Verify:

  • JDBC URL
  • Username/password
  • Schema access
  • Firewall/network rules