Hopp over navigasjon

Agile SAP development with SAP Cloud Platform on Azure

Publisert på 2 juli, 2018

Senior Program Manager, R&D Compute

This blog post was co-authored by Mario Szpuszta, Principal Software Engineer, Azure CAT

Recently we announced that SAP Cloud Platform is transitioning from Beta to general availability on Azure. SAP Cloud Platform (SAP CP) is SAP's multi-cloud platform-as-a-service offering and is now available for production use in Azure West Europe.

With SAP CP on Azure, we extend the choices available on Azure to meet your SAP development needs.  SAP CP offers a fully managed platform-as-a-service, operated by SAP, and is the first multi-tenant and fully managed Cloud Foundry PaaS on Azure. With SAP CP running on Azure, customers can

SAP Cloud Platform on Azure – Getting started

To get started with SAP CP on Azure, login to your SAP CP account. Pick Cloud Foundry and select Europe (Netherlands) Azure region. This will create an Organization and Space within the SAP CP Cloud Foundry environment.

image_1_regions

Deploying applications and services

Developers can use either the SAP CP cockpit or Cloud Foundry CLI to deploy and manage their applications and services.

SAP CP cockpit provides a convenient way to browse and monitor deployed applications. Developers can use cockpit to browse through the catalog of infrastructure services enabled by SAP under the Service Marketplace. These services leverage Azure Virtual Machines for infrastructure, even configuring use of Azure Availability Zones for high availability.

image_2_marketplace

Using the Cloud Foundry CLI

Since SAP CP is a Cloud Foundry based PaaS enabled for SAP infrastructure, you can manage your SAP CP environments just like any other Cloud Foundry environment. For SAP-specific services such as HANA, SAP provides plug-ins such as the HANA MTA plug-in for the Cloud Foundry CLI to make it easier to work with SAP-specific services.

SAP CP uses different API endpoints for each region. For accessing the SAP CP landscape deployed in Azure West Europe through the CF CLI, you'd use the following API endpoint:

cf api https://api.cf.eu20.hana.ondemand.com
cf login

You can use all Cloud Foundry CLI/APIs to push apps, explore marketplace, and more.

Connecting to Azure Platform Services using the Meta Azure Service Broker

Meta Azure Service Broker (MASB) lets you provision Azure Platform Services directly from Cloud Foundry. MASB GitHub page provides steps to install the service broker on Cloud Foundry. You can also use Open Service Broker, which is currently in preview but will eventually replace MASB for your productive environments.

Once you've installed MASB, Azure Services will become available in Service Marketplace. You can use Cloud Foundry CLI or SAP CP cockpit to browse the services available.

image_3_cfmarketplacev3

The above shows all Azure services enabled in addition to the services enabled by SAP. You can now start using the services exposed by MASB for Azure. Connecting to Azure Platform services in the Marketplace follows standard Cloud Foundry patterns with Service Brokers. You create a service, and then bind the service to one or many applications using the Cloud Foundry service broker APIs and CLI.

You can find the parameters to be specified for each service on the MASB GitHub. Let's create an Azure CosmosDB as an example. We’ll use the following configuration:

{
   "resourceGroup": "Tests.SAPCPMetaServiceBroker",
   "cosmosDbAccountName": "samplecosmosaccount",
   "cosmosDbName": "samplecosmosdatabase",
   "location": "westeurope",
   "kind": "DocumentDB"
}

We’ll use CloudFoundry CLI commands to create a new service and make Cloud Foundry aware of it:

>cf create-service azure-cosmosdb-xxxxxxx-xxxx-xxxx-xxxx-45337ac75764 standard samplecosmosdb -c C:\Temp\params.json

Creating service instance samplecosmosdb in org xxxxxxxtrial_trial / space dev as xxx@live.com...
OK

Create in progress. Use 'cf services' or 'cf service samplecosmosdb' to check operation status.

Attention: The plan `standard` of service `azure-cosmosdb- xxxxxxx-xxxx-xxxx-xxxx-45337ac75764` is not free.  The instance `samplecosmosdb` will incur a cost.  Contact your administrator if you think this is in error.

> cf service samplecosmosdb

Showing info of service samplecosmosdb in org xxxxxxxtrial_trial / space dev as  xxx@live.com...

name:            samplecosmosdb
service:         azure-cosmosdb-xxxxxxx-xxxx-xxxx-xxxx-45337ac75764
bound apps:
tags:
plan:            standard
description:     Azure CosmosDb Service (dev)
documentation:
dashboard:

Showing status of last operation from service samplecosmosdb...

status:    create succeeded
message:   Created the cosmosDb
started:   2018-06-20T14:39:23Z
updated:   2018-06-20T14:44:33Z

You can also see the CosmosDB instance show up in the Service Instances tab in cockpit:

Image_4_CosmosDBSucceed

Finally, by using the cf bind-service command, you can bind the service to any application you've deployed. Configuration parameters will then be exposed through environment variables as per the documentation of the respective service in the Meta Azure Service Broker GitHub. All the above steps can be carried out using SAP Cloud Platform Cockpit, as well.

What’s next

We expect more Azure regions to become available soon for SAP development using SAP Cloud Platform.  As more and more service light up on Open Service Broker for Azure, it will graduate and eventually replace Meta Azure Service Broker. We expect more regions, along with ability to connect to more Azure Services would effectively round out your SAP Cloud development requirements.