Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e134b92
feat: update subaccount module
florianow Oct 28, 2025
7c85b44
feat: adding some stuff for complexity
florianow Oct 28, 2025
8ca77be
chore: adding tfvars to gitignore
florianow Oct 28, 2025
4fddc85
chore: adding tftest changes to subaccount
florianow Oct 29, 2025
a0c029b
Merge branch 'main' into feature/sap
florianow Nov 5, 2025
4ca73c4
chore: update .gitignore
florianow Nov 5, 2025
0ff15eb
chore: update .gitignore
florianow Nov 5, 2025
9a54ba7
chore: adding variables
florianow Nov 6, 2025
797dc83
chore: test versions file
florianow Nov 6, 2025
1a2bd13
chore: test versions file
florianow Nov 6, 2025
13061c5
chore: test versions file
florianow Nov 6, 2025
1863312
chore: test versions file
florianow Nov 6, 2025
3af8610
chore: adding cloudFoundry and entitlements
florianow Nov 7, 2025
964b815
chore: adding provider file
florianow Nov 7, 2025
0b1eec5
chore: adding provider file
florianow Nov 7, 2025
bfce09d
chore: change from split to jsonencode
florianow Nov 7, 2025
c25318d
chore: with predifiend backend
florianow Nov 10, 2025
f6b0dfb
chore: with import
florianow Nov 10, 2025
b150d68
chore: adding import script
florianow Nov 10, 2025
1d25ec6
feat: adding a version of the import script for powershell
florianow Nov 11, 2025
3460972
feat: trailing whitespaces
florianow Nov 11, 2025
cb88147
feat: update readme import script
florianow Nov 11, 2025
57831b8
feat: adding multiple sap modules
florianow Nov 13, 2025
5b241a9
feat: pre-commit
florianow Nov 13, 2025
b9b9d9e
feat: adding versions file
florianow Nov 13, 2025
f0aefe7
feat: cf quota based
florianow Nov 13, 2025
14d9544
feat: cf quota based
florianow Nov 13, 2025
96c2857
feat: cf quota based
florianow Nov 13, 2025
55949c4
feat: adding sap starterkit
florianow Nov 13, 2025
285a70b
feat: adding import again
florianow Nov 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion modules/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,16 @@ When choosing a provider version for a module, consider:

**GCP Backplane Pattern:** *TBD - To be documented*

**SAP BTP Backplane Pattern:** *TBD - To be documented*
**SAP BTP Backplane Pattern:**
- **No backplane directory** - SAP BTP modules use direct provider configuration
- Authentication via environment variables (set in meshStack):
- `BTP_USERNAME` - Username for SAP BTP authentication
- `BTP_PASSWORD` - Password for SAP BTP authentication
- `BTP_GLOBALACCOUNT` - Global account subdomain
- Provider configuration in `buildingblock/provider.tf` uses `globalaccount` variable
- No cross-account role assumption required
- Direct API access to BTP Global Account and Subaccounts
- All resources managed within the building block layer without separate backplane infrastructure

## Building Block Patterns

Expand Down
198 changes: 198 additions & 0 deletions modules/sapbtp/cloudfoundry/buildingblock/APP_TEAM_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
# SAP BTP Cloud Foundry - User Guide

## 🎯 What This Building Block Does

Enables Cloud Foundry - a platform for deploying and running cloud-native applications. Think of it as your application runtime with built-in services like databases and message queues.

## 🚀 Quick Start

### Enable Cloud Foundry Environment
```
cloudfoundry_plan = "standard"
```

### Add Services Your App Needs
```
cf_services = "postgresql.small,redis.medium,xsuaa.application"
```

## 📋 What is Cloud Foundry?

Cloud Foundry is a **Platform as a Service (PaaS)** that:
- Runs your applications (Node.js, Java, Python, Go, etc.)
- Automatically handles scaling, health checks, and restarts
- Provides built-in services (databases, caching, authentication)
- Simplifies deployment with `cf push`

## 🗄️ Available Services

### Databases
- **PostgreSQL**: Relational database
- `postgresql.small` - 5GB storage, good for development
- `postgresql.medium` - 20GB storage, good for production
- `postgresql.large` - 100GB storage, high-performance

- **Redis**: In-memory cache
- `redis.small` - 250MB, session storage
- `redis.medium` - 1GB, general caching
- `redis.large` - 5GB, high-traffic apps

### Authentication & Authorization
- **XSUAA**: User authentication and authorization
- `xsuaa.application` - Most common, for app security
- `xsuaa.broker` - For service brokers

### Connectivity
- **Destination**: Connect to remote systems
- `destination.lite` - Free tier, destination management

- **Connectivity**: Connect to on-premise systems
- `connectivity.lite` - Cloud Connector integration

### Developer Tools
- **Application Logs**: Centralized logging
- `application-logs.lite` - Free tier
- `application-logs.standard` - Production tier

- **Job Scheduler**: Run scheduled background jobs
- `jobscheduler.lite` - Free tier
- `jobscheduler.standard` - Production tier

### Storage & Secrets
- **Credential Store**: Secure secret management
- `credstore.free` - Free tier
- `credstore.standard` - Production tier

- **Object Store**: S3-compatible storage
- `objectstore.s3-standard` - File storage

### UI Services
- **HTML5 Application Repository**: Host HTML5 apps
- `html5-apps-repo.app-host` - Host apps
- `html5-apps-repo.app-runtime` - Serve apps

## 🔄 Shared Responsibility Matrix

| Responsibility | meshStack/Platform | App Team |
|---------------|-------------------|----------|
| Provision CF environment | ✅ | |
| Create service instances | ✅ | |
| Deploy applications | | ✅ |
| Bind services to apps | | ✅ |
| Monitor applications | | ✅ |
| Scale applications | | ✅ |
| CF runtime updates | SAP BTP | |
| Service instance backups | SAP BTP | |

## 💡 Best Practices

### Start Small, Scale Up
```
# Development
cf_services = "postgresql.small,redis.small"

# Production (upgrade later)
cf_services = "postgresql.medium,redis.medium"
```

### Include Essential Services
Most apps need at least:
```
cf_services = "postgresql.small,xsuaa.application,destination.lite"
```

### Understand Service Plans
- **Free/Lite**: Limited, good for development, may have usage caps
- **Small**: Low traffic production apps
- **Medium**: Standard production apps
- **Large**: High-traffic or data-intensive apps

### Check Entitlements First
Each CF service needs a matching entitlement. Add via **entitlements building block**.

## 🚢 Deploying Your First App

After CF is provisioned:

1. **Install CF CLI**:
```bash
# Download from https://github.com/cloudfoundry/cli
```

2. **Login to Cloud Foundry**:
```bash
cf login -a https://api.cf.eu10.hana.ondemand.com
# Enter your BTP credentials
```

3. **Target Your Org and Space**:
```bash
cf orgs # List available orgs
cf target -o "your-org-name" -s "dev"
```

4. **Deploy Your App**:
```bash
cf push my-app
```

5. **Bind Services**:
```bash
cf bind-service my-app postgresql-small
cf restage my-app
```

## 🔍 Checking Service Status

```bash
# List service instances
cf services

# Get service credentials
cf service-key postgresql-small my-key

# View service details
cf service postgresql-small
```

## ⚠️ Common Issues

### "CF environment not ready"
CF provisioning takes 10-20 minutes. Check status in BTP Cockpit.

### "Service not found"
1. Ensure entitlement exists (use entitlements building block)
2. Wait a few minutes after creating service instance
3. Check service marketplace: `cf marketplace`

### "Out of memory"
Your app needs more memory. Update manifest.yml:
```yaml
memory: 1G # Increase from default 256M
```

### "Can't connect to service"
1. Verify service is bound: `cf services`
2. Check `VCAP_SERVICES` environment variable: `cf env my-app`
3. Restage app after binding: `cf restage my-app`

## 🎓 Next Steps

1. **Deploy an App**: Use `cf push` to deploy your application
2. **Bind Services**: Connect your app to databases and services
3. **Monitor**: Use `cf logs` and Application Logs service
4. **Scale**: Use `cf scale` to adjust instances and memory
5. **Automate**: Set up CI/CD with manifest.yml

## 📚 Learn More

- **CF CLI Cheatsheet**: https://docs.cloudfoundry.org/cf-cli/
- **SAP BTP CF Docs**: https://help.sap.com/docs/btp/sap-business-technology-platform/cloud-foundry-environment
- **Manifest.yml Guide**: https://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html

## 📞 Getting Help

- Check CF logs: `cf logs my-app --recent`
- View app health: `cf apps`
- Contact platform team for infrastructure issues
- Use `cf help` for CLI command reference
Loading
Loading