11 KiB
SAP BTP Deployment and Delivery - Detailed Reference
Source: https://github.com/SAP-docs/btp-best-practices-guide/tree/main/docs/deploy-and-deliver
Deployment Overview
After development, applications are deployed to TEST and PROD environments. The approach depends on organizational needs:
- Simple applications: Manual deployment acceptable
- Enterprise settings: Managed, automated delivery recommended
Deployment Methods by Runtime
Cloud Foundry Environment
Key Recommendation: Archive all components into one package as a Multitarget Application (MTA) archive including a deployment descriptor.
Java Applications
Deploy via:
- SAP BTP cockpit
- Cloud Foundry CLI
- Multiple runtime and JVM options available
HTML5 Applications
Deploy via:
- SAP Business Application Studio
- Cloud Foundry CLI
- SAP BTP cockpit
Node.js Applications
Deploy via:
- SAP Business Application Studio
- Cloud Foundry CLI
SAP HANA XSA Applications
Deploy via:
- SAP HANA Deployment Infrastructure (HDI) in Business Application Studio
- Cloud Foundry CLI
Custom Buildpacks
Cloud Foundry supports "Bring Your Own Buildpack" for custom runtime needs.
Neo Environment
Similar deployment options to Cloud Foundry with:
- SAP BTP cockpit
- Neo console client
Kyma Environment
Core Requirement: Package applications in Linux Docker images.
Options:
- Standard Dockerfile
- Cloud Native Buildpacks
Production Setup:
- Use automation tools like SAP Continuous Integration and Delivery
- Deploy with Helm charts
- Sample GitHub repositories available for Java, Node.js, HTML5
Delivery Options
Enterprise Delivery Approach
A managed, automated delivery approach is recommended because it:
- Is less error-prone
- Creates repeatable outcomes
- Enables governance
- Provides central control over production propagation
Delivery Options Matrix
| Content Type | CI/CD | Cloud Transport Mgmt | CTS+ |
|---|---|---|---|
| Development Content (Java, HTML5, CAP) | Recommended | Recommended | - |
| SAP Cloud Integration Content | In development | Recommended | - |
| SAP HANA Cloud Artifacts | Recommended | Recommended | - |
| SAP Build Work Zone | - | Recommended | - |
| Other App-Specific Content | - | Recommended | Recommended |
| Kyma-Based Apps | Recommended | - | - |
SAP Continuous Integration and Delivery
Solution Options
| Aspect | SAP CI/CD Service | Project "Piper" |
|---|---|---|
| Expertise Required | Low | Medium-to-High |
| Flexibility | Medium | High |
| Infrastructure | Ready-to-use | Requires Jenkins (or Cx Server) |
| Support | Direct SAP support | Open-source community |
| Best For | Typical SAP customers | Advanced customization |
SAP CI/CD Service Features
- Pre-configured pipelines for SAP technologies
- Built-in code quality checks
- Automated testing integration
- Direct deployment to SAP BTP
Project "Piper"
- Open-source CI/CD library
- Extensive customization options
- Jenkins-based pipelines
- GitHub: https://github.com/SAP/jenkins-library
Transport Management
SAP Cloud Transport Management
Centralizes handling of development content archives across subaccounts and global accounts.
Features:
- MTA file transport
- Application-specific content transport
- Cross-global account transport
- Integration with change management tools
Recommendation: Use for all SAP BTP content regardless of format.
CTS+ (Change and Transport System)
- Operates on-premise within ABAP systems
- Supports SAP BTP artifacts packaged as MTA archives
- Integration with SAP Solution Manager
Direction: SAP Cloud Transport Management is the future-proof choice.
Combined CI/CD and Transport Approach
Developer Commit
│
▼
┌──────────────────┐
│ CI Pipeline │ (Build, Test, Deploy to Dev)
└────────┬─────────┘
│
▼
┌──────────────────────────────────┐
│ SAP Cloud Transport Management │
│ │
│ Dev ──► Test ──► Production │
│ (Governance-defined pathways) │
└──────────────────────────────────┘
│
▼
Optional Integration
with SAP Cloud ALM or
SAP Solution Manager
Change Management Integration
SAP Cloud ALM Integration
- Change and deployment management
- Centralized landscape definition
- Access control configuration
- Synchronized transports
SAP Solution Manager Integration
- Minimum version: 7.2 SP10
- Hybrid scenario support (on-premise + cloud)
- Parallel operation with CTS+ and Cloud Transport Management
Manual Delivery Methods
For simpler scenarios:
-
Direct IDE Deployment:
- Deploy to multiple subaccounts via cockpit or CLI
-
Solution Export Wizard (Neo):
- Model solutions as MTA files
- Export for transport
-
Git Repository Synchronization:
- For HTML5 applications
- Manual deployment after sync
-
SAP HANA XS Application Lifecycle Management:
- Transport routes between systems
Multitarget Application (MTA) Archives
Structure
my-app.mtar
├── mta.yaml (deployment descriptor)
├── app-module-1/
├── app-module-2/
├── db-module/
└── srv-module/
mta.yaml Example
_schema-version: "3.1"
ID: my-mta-app
version: 1.0.0
modules:
- name: my-srv
type: nodejs
path: srv
provides:
- name: srv-api
properties:
url: ${default-url}
requires:
- name: my-db
- name: my-auth
- name: my-db-deployer
type: hdb
path: db
requires:
- name: my-db
resources:
- name: my-db
type: com.sap.xs.hdi-container
- name: my-auth
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: application
Building MTAs
# Install MTA Build Tool
npm install -g mbt
# Build MTA archive
mbt build
# Result: mta_archives/my-app_1.0.0.mtar
Kyma Deployment Details
Docker Image Creation
Standard Dockerfile:
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 8080
CMD ["npm", "start"]
Cloud Native Buildpacks:
# Using pack CLI
pack build my-app --builder paketobuildpacks/builder:base
Helm Chart Structure
my-app/
├── Chart.yaml
├── values.yaml
├── templates/
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── ingress.yaml
│ └── configmap.yaml
└── charts/
Deployment Commands
# Deploy with Helm
helm upgrade --install my-app ./my-app \
--namespace my-namespace \
--set image.tag=1.0.0
# Or use kubectl directly
kubectl apply -f k8s/
CI/CD Pipeline Example
SAP CI/CD Service Configuration
# .pipeline/config.yml
general:
buildTool: 'mta'
stages:
Build:
mtaBuild: true
Additional Unit Tests:
npmExecuteScripts:
- 'test'
Acceptance:
cloudFoundryDeploy:
deployTool: 'mtaDeployPlugin'
deployType: 'standard'
Release:
cloudFoundryDeploy:
deployTool: 'mtaDeployPlugin'
deployType: 'standard'
Jenkins Pipeline (Project Piper)
@Library('piper-lib-os') _
node {
stage('Init') {
checkout scm
setupCommonPipelineEnvironment script: this
}
stage('Build') {
mtaBuild script: this
}
stage('Deploy') {
cloudFoundryDeploy script: this
}
}
Transport Landscape Configuration
Defining Transport Routes
┌─────────────────────────────────────────────────────┐
│ SAP Cloud Transport Management │
├─────────────────────────────────────────────────────┤
│ │
│ Node: Development │
│ ├── Import Queue │
│ └── Forward to: Test │
│ │
│ Node: Test │
│ ├── Import Queue │
│ └── Forward to: Production │
│ │
│ Node: Production │
│ └── Import Queue │
│ │
└─────────────────────────────────────────────────────┘
Upload to Transport Management
# Using Cloud Transport Management API
curl -X POST "[https://[ctms-url]/v2/files/upload"](https://[ctms-url]/v2/files/upload") \
-H "Authorization: Bearer $TOKEN" \
-F "file=@my-app.mtar"
# Create transport request
curl -X POST "[https://[ctms-url]/v2/nodes/[node-id]/transportRequests"](https://[ctms-url]/v2/nodes/[node-id]/transportRequests") \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"fileId": "[file-id]", "description": "Deploy version 1.0.0"}'
Best Practices Summary
Deployment
- Use MTA archives for multi-component applications
- Containerize applications for Kyma with proper Docker images
- Implement proper health checks and probes
- Use environment-specific configuration
Delivery
- Combine CI/CD with Cloud Transport Management
- Automate testing at every stage
- Implement proper approvals for production
- Maintain audit trails for compliance
Governance
- Define clear transport routes
- Implement approval workflows
- Restrict who can deploy to production
- Track all changes through transport requests
Source Documentation:
- https://github.com/SAP-docs/btp-best-practices-guide/blob/main/docs/deploy-and-deliver/deploy-and-deliver-5972cdb.md
- https://github.com/SAP-docs/btp-best-practices-guide/blob/main/docs/deploy-and-deliver/deploying-applications-866ab13.md
- https://github.com/SAP-docs/btp-best-practices-guide/blob/main/docs/deploy-and-deliver/delivering-applications-b39bae3.md