Deploy the Azure Service Broker to Cloud Foundry

Deploy the Azure Service Broker to Cloud Foundry

Deploy the Azure Service Broker to Cloud Foundry

Deploy the Azure Service Broker to Cloud Foundry

Clone the Microsoft Azure service broker from GitHub, configure it, and deploy it to your own Cloud Foundry space.

Which configuration is needed for the service broker

How to deploy an application to your SAP Cloud Platform Cloud Foundry space from the Cloud Foundry CLI

In the following steps, you will deploy the Azure service broker application to your SAP Cloud Platform Cloud Foundry space, which you will use later to provide Azure backing services to an application running SAP Cloud Platform Cloud Foundry.

To log onto the right SAP Cloud Platform Cloud Foundry endpoint, the right API endpoint URL is needed. Therefore, log into theSAP Cloud Platform cockpitwith your SAP Cloud Platform user.

Navigate to the subaccount by clicking on the according tile.

Copy the URL of the API endpoint to your clipboard.

Go back to your Azure Cloud Shell and execute the following command.

IMPORTANT:: Dont forget to replace the API endpoint (api-endpoint-url) in the command with the URL in your clipboard.

You havent logged in to your particular SAP Cloud Platform Cloud Foundry space via the Cloud Foundry CLI yet you have only set the API endpoint.

Execute the following command in the Azure Cloud Shell and log in with your SAP Cloud Platform credentials (which you have also used in Step 1 of this tutorial to log onto the SAP Cloud Platform cockpit)

If there are multiple organizations and spaces in your subaccount, please navigate through the prompts by entering the according numbers listed next to the organization/space followed by pressingEnter.

In case there is only one organization and space, you will automatically be directed to the space.

Finally, the following output should appear in your Azure Cloud Shell.

The service broker is technically an application that will later be deployed to your SAP Cloud Platform Cloud Foundry space. Theres already a public GitHub repository, published by Microsoft, which can be cloned easily.

Execute the following command in the Azure Cloud Shell:

All files of the specified repository should now be downloaded into anopen-service-broker-azuredirectory of your Azure Cloud Shell.Execute thelistcommand to list the content of your current directory:

You have recently downloaded the source code for the service broker application. In the next step, the placeholder in themanifest.yml(deployment descriptor) will be replaced with the information of your particular Azure subscription.

Open themanifest.yamlfile (exact path:open-service-broker/contrib/cf) in the Azure Cloud Shell via executing the following command:

As you can see, there are a couple of placeholders. Replace theYOUR SUBSCRIPTION IDwith your actual subscription ID. You can retrieve it via the following command in yourAzure Cloud Shell:

Replace theHOSTNAME FROM AZURE REDIS CACHEplaceholders (there are two!) with the actual hostname of your Redis Cache you have created in the previous tutorial. You can retrieve it via the following command in your Azure Cloud Shell:

Replacename-redis-cachewith your uniqueRedis Cachename from the previous tutorial.[hostName]is not a placeholder and should not be replaced.

Replace thePRIMARYKEY FROM AZURE REDIS CACHEplaceholders (there are two!) with the actual primary key Redis Cache you have created in the previous tutorial. You can retrieve it via the following command in your Azure Cloud Shell:

Replacename-redis-cachewith your uniqueRedis Cachename from the previous tutorial.

az redis list-keys -n name-redis-cache -g SAPTechEd –query [primaryKey] –output tsv

Step 6: Update manifest.yml − service principal information

If you are attending SAP TechEd on site and are using the provided Azure credentials,please ask the SAP Staffon the booth for the service principal details to replace it in themanifest.yml.

Replace the remaining placeholdersYOUR TENANT ID,APPID FROM SERVICE PRINCIPALandPASSWORD FROM SERVICE PRINCIPALin themanifest.ymlwith the service principal information you have received from the SAP staff.

Replace the remaining placeholdersYOUR TENANT ID,APPID FROM SERVICE PRINCIPALandPASSWORD FROM SERVICE PRINCIPALin themanifest.ymlwith the service principal information you have created in the previous tutorial. (You should have taken a screenshot or copied it into a text document.)

Also replace the provided URL for thebuildpacks. Use this URL:

Please take care that the indentation of this line remains unmodified, otherwise themanifest.ymlwill be recognized as corrupt. There should be four white spaces in the beginning of the line.

Before you can save and close the file, your service broker application needs a unique name. The service broker application will later be running on a dedicated URL in the SAP Cloud Platform and therefore needs a unique name.

Replace the application name as shown in the screenshot below with your own unique name.

Please do not useSAPTechEdMyName12345as in the screenshot. Use your own unique combination.

Make sure you have saved themanifest.ymlfile. Saving the file is possible either viaCommand + Sor via right-clicking in the editor and choosing theSaveoption.

Check if the file is saved by the appearance of the sign next to the file name as shown in the screenshot below. If its still there, its NOT saved.

Push (deploy) the application to your SAP Cloud Platform Cloud Foundry space by executing the following command in the Azure Cloud Shell.

This will take some time. At the end of the log outputs the status of your deployed application should be similar to this:

Copy the route information of this log output to your clipboard as its needed in the next step.

The service broker application is now running, but not yet acting as a proper service broker within your space. Thus its necessary to register the application as a service broker.

Execute the specified command in the Azure Cloud Shell.

Replaceapplication-routewith the actual application route you have copied in the previous step. Dont remove the. Please also replace theunique-service-broker-nameown unique combination.

Double-check if the service broker registration was successful by executing the following command in the Azure Cloud Shell:

Since your service broker is now fully functional, you should be able to use the Azure services. To check the available services browse the marketplace by executing the following command in your Azure Cloud Shell:

You should now receive SAP Cloud Platform services as well as Azure services.

Which of the following is a service listed in the CF marketplace offered by Azure?Azure Kubernetes ServicesAzure Cosmos DBMicrosoft Windows 10 VMSubmit Answer

Step 2: Log into SAP Cloud Platform Cloud Foundry space

Step 4: Update manifest.yml − Azure subscription information

Step 5: Update manifest.yml − Redis Cache information

Step 6: Update manifest.yml − service principal information

Step 7: Update manifest.yml − buildpack information

Step 8: Push service broker application to Cloud Foundry space

Step 9: Register service broker in Cloud Foundry space

Step 10: Browse marketplace to discover Azure services