Deploy Grafana on SAP BTP Cloud Foundry in 5 Minutes
Share

[[{“value”:”

Previous Article : Monitoring SAP Cloud Foundry Applications with Prometheus and Python

Monitoring is a critical part of any cloud-native application landscape. While SAP BTP provides built-in observability capabilities, many teams prefer Grafana for creating rich dashboards and visualizing metrics from multiple data sources.

Prerequisites

Before starting, ensure you have:

  • An SAP BTP subaccount with Cloud Foundry enabled
  • Cloud Foundry CLI installed
  • Space Developer role in your Cloud Foundry space
  • Docker Hub access (optional for custom images)
  • Logged in to Cloud Foundry

 

Create manifest.yml


applications:
– name: grafana-test
memory: 1512M
disk_quota: 5G
docker:
image: grafana/grafana:latest
env:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin

Cloud Foundry manifests provide a repeatable deployment configuration and are the recommended approach for application deployment.

Push Grafana to SAP BTP

Deploy the application.

cf login -a api.cf.<region>.hana.ondemand.com –sso

cf push

Cloud Foundry will:

  1. Pull the Grafana Docker image
  2. Create the application
  3. Start the container
  4. Map the route
  5. Expose Grafana

The deployment lifecycle includes upload, staging, and startup phases managed automatically by Cloud Foundry

Yogananda_0-1786786364931.png

Optional: Install Popular Plugins

Add plugin installation through environment variables.

env:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: Welcome123!
GF_INSTALL_PLUGINS: grafana-piechart-panel

Grafana supports plugin installation through Docker image environment configuration

Optional: Use User-Provided Service for Secrets

Instead of storing passwords in the manifest:

cf cups grafana-config -p ‘{“adminPassword”:”StrongPassword”}’

Bind the service:

cf bind-service grafana grafana-config
cf restage grafana

 Bonus Manifest.yaml


applications:
– name: grafana-prod
memory: 2G
disk_quota: 2G
instances: 2

docker:
image: grafana/grafana:latest

env:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: ChangeMeImmediately
GF_USERS_ALLOW_SIGN_UP: “false”

health-check-type: port

routes:
– route: grafana-prod.cfapps.<region>.hana.ondemand.com

 

Conclusion

Deploying Grafana on SAP BTP Cloud Foundry is surprisingly simple. Using the official Grafana Docker image, a lightweight manifest.yml, and a single cf push, you can have a fully functional Grafana instance running in minutes. This approach is ideal for PoCs, internal monitoring solutions, and dashboarding applications while leveraging the scalability and operational simplicity of SAP BTP Cloud Foundry

“}]] 

 [[{“value”:”Previous Article : Monitoring SAP Cloud Foundry Applications with Prometheus and PythonMonitoring is a critical part of any cloud-native application landscape. While SAP BTP provides built-in observability capabilities, many teams prefer Grafana for creating rich dashboards and visualizing metrics from multiple data sources.PrerequisitesBefore starting, ensure you have:An SAP BTP subaccount with Cloud Foundry enabledCloud Foundry CLI installedSpace Developer role in your Cloud Foundry spaceDocker Hub access (optional for custom images)Logged in to Cloud Foundry Create manifest.yml—
applications:
– name: grafana-test
memory: 1512M
disk_quota: 5G
docker:
image: grafana/grafana:latest
env:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: adminCloud Foundry manifests provide a repeatable deployment configuration and are the recommended approach for application deployment.Push Grafana to SAP BTPDeploy the application.cf login -a api.cf.<region>.hana.ondemand.com –sso

cf pushCloud Foundry will:Pull the Grafana Docker imageCreate the applicationStart the containerMap the routeExpose GrafanaThe deployment lifecycle includes upload, staging, and startup phases managed automatically by Cloud FoundryOptional: Install Popular PluginsAdd plugin installation through environment variables.env:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: Welcome123!
GF_INSTALL_PLUGINS: grafana-piechart-panelGrafana supports plugin installation through Docker image environment configurationOptional: Use User-Provided Service for SecretsInstead of storing passwords in the manifest:cf cups grafana-config -p ‘{“adminPassword”:”StrongPassword”}’

Bind the service:

cf bind-service grafana grafana-config
cf restage grafana Bonus Manifest.yaml—
applications:
– name: grafana-prod
memory: 2G
disk_quota: 2G
instances: 2

docker:
image: grafana/grafana:latest

env:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: ChangeMeImmediately
GF_USERS_ALLOW_SIGN_UP: “false”

health-check-type: port

routes:
– route: grafana-prod.cfapps.<region>.hana.ondemand.com ConclusionDeploying Grafana on SAP BTP Cloud Foundry is surprisingly simple. Using the official Grafana Docker image, a lightweight manifest.yml, and a single cf push, you can have a fully functional Grafana instance running in minutes. This approach is ideal for PoCs, internal monitoring solutions, and dashboarding applications while leveraging the scalability and operational simplicity of SAP BTP Cloud Foundry”}]] Read More Technology Blog Posts by SAP articles 

#SAPCHANNEL

By ali

Leave a Reply