Try something new for fun – Docker!

I did something new today…new for me, but others have been doing for some time.  I deployed a Docker image to Cloud Foundry in the SAP Cloud Platform.  One of the most awesome things I love about my job is that I get to explore new stuff…perhaps not as timely as others…but I am able to learn new technologies and see how it all works.

It’s important to keep learning! 

Testing and development support teams have been using virtualization for many years.  The concept of getting an extra testing or development machine in the form of new hardware on your desk seems so 1990’s.  These folks can “spin up” a version of a Windows system, or Linux, pre-configured for you to use how you want. When you’re done using the system, they just shut the image down.  No hardware to recycle or carry from room to room. It’s like magic.

I often use virtualization software such as VMWare Workstation Pro, so the concept of images and containers is not new.  Virtualization has opened a lot of doors for me to learn Linux and SAP HANA.  Creating a new image is easy (ish) in Workstation Pro since some of the Linux distributions allow you to download pre-packaged images that you can import and “go”.  It seems that using Docker images is pretty much the same.  You can create a base docker image with many of the Linux distributions, and then go from there.  Today I didn’t need to do anything quite as involved, but rather just tested out how Docker works with Cloud Foundry.

Deploy a Docker Container to SCP Cloud Foundry

Since I use Windows 7 on my primary laptop, I chose to install the Docker Toolbox.  This seems to have all the functionality I needed to get started.  Here’s the link to the download:

What I did today was follow simple instructions from an SAP blog post:

In the SAP blog post, Akshay Nayak provides a simple Tomcat application that you build in Docker, create an image, and then deploy the image to the SCP Cloud Foundry.  Since I have had a little bit of experience with Cloud Foundry, and have a Cloud Foundry trial account with SAP, the only thing new for me here was Docker.


p.s. This blog post is in no way any attempt to promote any one technology over another, or one provider over another, but rather share my experience and say “YAY” I learned something new!




SAP Cloud Foundry Tutorial – Connect a Java Servlet to a HANA hdi-shared Service Instance using an SAP Cloud Foundry Trial Account

The goals of this tutorial are to create a Java servlet that connects to a HANA hdi-shared service instance, deploy a WAR file to SAP Cloud Foundry in SAP Cloud Platform and launch the servlet in a browser.

The tutorial uses an SAP Cloud Foundry trial account, an SAP Cloud Platform non-trial account, Eclipse and the Cloud Foundry CLI tools.  It assumes you have worked within the SAP NEO environment, have an SAP Cloud Platform account, and have some familiarity with SAP HANA.

If you are new to SAP Cloud Foundry in the SAP Cloud Platform, and would like more information, see my earlier blog “Differences between SAP NEO and SAP Cloud Foundry in the SAP Cloud Platform“.

Steps to this tutorial:

  1. Create an SAP Cloud Foundry Trial Account in the SAP Cloud Platform
  2. Install the Cloud Foundry CLI tools (Command Line Interface)
  3. Create a Quota Plan
  4. Create a HANA hdi-shared service instance (for database connectivity)
  5. Develop a Java servlet in Eclipse
  6. Create an application in Cloud Foundry and deploy a WAR file
  7. Create a table in SAP HANA via the SAP WebIDE Fullstack tool connected to your SAP Cloud Foundry trial account – this step requires the SAP Cloud Platform account
  8. Launch the application in a browser and see results from a simple database query

Things you’ll need:

  1. Eclipse, Neon or Oxy versions
  2. An SAP Cloud Platform account in the NEO environment


I created this tutorial as part of evaluating the SAP Cloud Foundry environment in the SAP Cloud Platform.  For the past several years I have been working within the SAP NEO environment in the SAP Cloud Platform.  My only option to evaluate SAP Cloud Foundry at the time was to create a trial SAP Cloud Foundry account.

Since I was working within an SAP Cloud Platform Cloud Foundry trial account, the number of services available to me were limited – specifically regarding the SAP HANA service.  Using a trial account, you are limited to using the hdi-shared service plan which provides an HDI container on a HANA database.   SAP’s help and support sites provide information about the available service plans for SAP HANA for non-trial accounts. You can research this on your own starting with Deployment-Infrastructure Services in XS Advanced.

Step One: Create an SAP Cloud Foundry Trial Account

First, sign up for a free trial account in the Cloud Foundry environment. If you already have a trial account, open the cockpit, navigate to your subaccount and to the space in which you’d like to deploy the application and continue with step 3.

  1. Go to the SAP Cloud Platform Home page(
  2. You need to register before you can create a trial account. To do so, proceed as follows:
    • Choose Register.
    • Enter the required data.
      You’ll receive a confirmation e-mail with instructions for activating your trial account.
    • Click the link in the e-mail to confirm your address and activate your trial account.
    • Choose Continue and log on with your credentials.
  3. Choose Cloud Foundry Trial.
  4. For the purposes of these instructions based on the evaluation, select the Europe (Frankfurt) region.


A global account, subaccount, org, and space are automatically created for you.

5.  You should see the below. Choose Go to Space.


Getting to your Cloud Foundry Trial Account after its been created

  1. Go to the SAP Cloud Platform Home page (
  2. Select Cloud Foundry Trial
  3. Select your subaccount
  4. Select your space


Alternatively, if you want to see all your spaces, select Spaces from the left-hand pane.


Then select your space.


Step Two: Install the Cloud Foundry CLI Tools

Download and Install the CLI Tools

  1. Go to and download the installer for your system. Alternatively, the installation can be found here:
  2. Once downloaded, extract the files and execute the installer executable.

To test the installation, open a Command Terminal and type “cf” at the command line.  Information such as the “cf” version and command line options are displayed.

Login to Cloud Foundry

When you created your SAP Cloud Foundry trial, your email address associated with your SAP S-Id is the login id to be used to login in to Cloud Foundry.

The syntax to login is

$ cf login [-a API_URL] [-u USERNAME] [-p PASSWORD] [-o ORG] [-s SPACE]

API_URL is the API endpoint.  You can find the endpoint name by navigating to your trial account’s subaccount and select the Overview.


Once you successfully login, you’ll be prompted to select an Organization if your email is associated with more than one.

The expected output is similar to what is below:


Step Three: Create a Quota Plan

Before you can create the hdi-shared service, you will need to create a Quota Plan within your trial.  Once created, you will have a set number of services that you can add to your subaccount.

  1. Navigate to your “trial” subaccount
  2. Select “Quota Plans” in the left-hand pane
  3. Select “New Plan”

A similar screen will be displayed where you can enter the “Name” of the plan and enter the amount of memory of 2048 (which is the default total for the Organization).


4. Save the new plan

In this same screen, you’ll assign your space to this new plan.

  1. In the “Plan Assignment” section of the screen, you’ll your new space called “dev”. Select the new Quota Plan from the drop down.


Alternatively, a Quota Plan can be created using the CLI tools –

Step Four: Create an hdi-shared service (HANA)

First, you can check to see if you have the appropriate Entitlement for HANA.

  1. Using the SAP Cloud Platform Cockpit, navigate to your trial account.


2. Select “Entitlements” from the left-hand pane.

3. Scroll down the page and you will see the section labeled “HANA”. Before you create the hdi-shared service, the assignment may read “0 of 1 assigned”.  Once you create the service instance, you will see:


Add the hdi-shared service instance from “SAP HANA Schemas & HDI Containers” from within the Service Marketplace.

  1. Using the SAP Cloud Platform Cockpit, navigate to your space.
  2. Select “Service Marketplace” from the left-hand pane.
  3. Scroll down the page, and select “SAP HANA Schemas & HDI Containers”


4. Select “Instances” from the left-hand pane.

5. Select the “New Instance” button

6. In the drop-down, select “hdi-shared”. This will be your only option when using the trial SAP Cloud Foundry account.


7. Click “Next” through the next few screens until you reach the last page. Enter the name myhana in the “Name” for the instance and select “Finish”.

IMPORTANT: The name of the hdi-shared service is used when the application is deployed to Cloud Foundry.  It is included in the file manifest.yml.  If you use a different name for your hdi-shared service instance, be sure to use this name in the manifest.yml file when creating the Java project in Eclipse.  If you use the pre-packaged application and choose to import the project, the name of the hdi-shared service instance is already set to “myhana”.

8. When you see the below screen, select “OK”


9. When the hdi-shared service creation has completed, you should see the following screen.


NOTE:  If you already have an application, you can bind the service instance to the application at the same time you create the service instance.

Alternatively, a service instance can be created using the CLI tools –


An example of the output using the CLI command “cf create-service” is as follows:


Once created, you can look to see all the services by using the command “cf services” which provides the following:


Or if you want to just look at the status of one service, you can use the command “cf service ” which provides the following:


Step Five: Develop a Java servlet in Eclipse

This step method assumes you have a comfortable working knowledge of creating Java projects in Eclipse so that you can use the sample code as a guideline.

A key element to building a Java application that will connect to HANA in Cloud Foundry is retrieving the VCAP_SERVICES environment variable and using the database connectivity values to work with the hdi-shared instance.

Cloud Foundry will be looking for a file called manifest.yml.  This configuration file tells Cloud Foundry how to package the application and which buildpacks and services are required.

The result of this step is to produce a WAR file that will be deployed to Cloud Foundry that will use it create the application.

Sample code included below.

Steps to create your own project:

  1. Create a local folder named c:\cf\war to be used later
  2. Create a new “Dynamic Web Project” in Eclipse called “SimpleServlet”.
  3. Download the Argo Jdom library from Select “Download argo (3.39)”. Unzip the download file.
  4. Copy the argo-3.39.jar file to your project WEB-INF/lib folder. Configure your Java Build Path to include the argo-3.39.jar file as an External JAR.
  5. In the Java Resources, create a new Servlet. Use the package name “cf.apps.servlet” and the class name SimpleServlet.  Use the web servlet URL “/hello”.
  6. Replace the code in with the code from below. There will be errors until the new additional Java classes are created.
  7. In the Java Resources, in the “src” folder under the package “cf.apps.servlet”, create a new Java Class called HDIEnvironment. Replace the code in with the code from below.
  8. In the Java Resources, in the “src” folder under the package “cf.apps.servlet”, create a new Java Class called HDIQueryTests. Replace the code in with the code from below.
  9. At the main project folder “SimpleServlet”, create a file named “manifest.yml”. Copy the code from manifest.yml below.
  10. Export the project to the WAR file war at the c:\cf\war folder location.

package cf.apps.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.sql.*;
import java.util.List;
 * Servlet implementation class SimpleServlet
 * Database credentials are obtained from the class HDIEnvironment which retrieves and
 * parses the environment variable VCAP_SERVICES. The contents of VCAP_SERVICES are 
 * displayed.
 * <p>
 * A sample database query is made using the class HDIQueryTests which will use the
 * HDIEnvironment class for database credentials. 

public class SimpleServlet extends HttpServlet {

private static final long serialVersionUID = 1L;

     * Default constructor. 
    public SimpleServlet() {
        // TODO Auto-generated constructor stub

    public void doGet(HttpServletRequest request, HttpServletResponse response)  throws ServletException, IOException {

         // Set response content type
         PrintWriter out = response.getWriter();
         Statement stmt = null;
         Connection conn = null;
         String docType =
            "<!doctype html public \"-//w3c//dtd html 4.0 " + "transitional//en\">\n";
         out.println(docType +
            "<html>\n" +
            "<head><title>Cloud Foundry Database Tests</title></head>\n" +
            "<body bgcolor = \"#f0f0f0\">\n" +
            "<h1 align = \"center\">Database Connection Tests</h1>\n");

         try {
            HDIEnvironment ev = new HDIEnvironment();
            out.println("<h3>Environment info from VCAP_SERVICES</h3>\n");            
            out.println("<p>URL: " + ev.getUrl());
            out.println("<p>User: " + ev.getUser());
            out.println("<p>Password: " + ev.getPassword());
            out.println("<p>Port: " + ev.getPort());
            out.println("<p>VCAP_SERVICES: " + ev.getVcap_services());  

            HDIQueryTests hsc = new HDIQueryTests(response);
            out = response.getWriter();
            out.println("<h3>Query results</h3>\n");             
            out.println("<p>Query: " + hsc.getSQL());
            List<String> results = hsc.getResults();

      for (String str : results) {
      out.println("<p>Result: " + str);


         catch(Exception e) {
            //Handle errors for Class.forName
         } finally {
            //finally block used to close resources
           try {
            } catch(SQLException se2) {
            } // nothing we can do
            try {
            } catch(SQLException se) {
            } //end finally try
         } //end try

* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);



package cf.apps.servlet;

import argo.jdom.JdomParser;
import argo.jdom.JsonNode;

 * The class HDIEnvironment retrieves the JSON node VCAP_SERVICES from the environment.
 * The node is parsed, and values such as user, passowrd, url and port can be used
 * to establish a JDBC connection in order to perform queries.
public class HDIEnvironment {

    private String vcap_services = "";
    private String host = "";
    private String dbname = "";
    private String user = "";
    private String password = "";
    private String port = "";
    private String url = "";
    private String schema = "";

public HDIEnvironment() {

   try {
       vcap_services = System.getenv("VCAP_SERVICES");
            //for cloud config
       if (vcap_services != null && vcap_services.length() > 0) {
           JsonNode root = new JdomParser().parse(vcap_services);
           JsonNode mysqlNode = root.getNode("hanatrial");
           JsonNode credentials = mysqlNode.getNode(0).getNode(
           host = credentials.getStringValue("host");
           user = credentials.getStringValue("hdi_user");
           password = credentials.getStringValue("hdi_password");
           port = credentials.getStringValue("port");
           url = credentials.getStringValue("url");
           schema = credentials.getStringValue("schema");
   } catch (Exception e) {

public String getVcap_services() {
return vcap_services;

public String getHost() {
return host;

public String getDbname() {
return dbname;

public String getUser() {
return user;

public String getPassword() {
return password;

public String getPort() {
return port;

public String getUrl() {
return url;

public String getSchema() {
return schema;


package cf.apps.servlet;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;

public class HDIQueryTests {
    // JDBC driver name and database URL
    static final String JDBC_DRIVER = "";  
    private String url ="";

    //  Database credentials
    private String user = "";
    private String password = "";
    private String sql;
    private List<String> results = new ArrayList<>();
    public HDIQueryTests(HttpServletResponse response) {
    Statement stmt = null;
    Connection conn = null;
    HDIEnvironment ev = new HDIEnvironment();

    url = ev.getUrl();
    user = ev.getUser();
    password = ev.getPassword();
        // Register JDBC driver
     try {


       // Open a connection
       conn = DriverManager.getConnection(url, user, password);
       // Execute SQL query
       stmt = conn.createStatement();
       ResultSet rs = null;
       sql = "SELECT NAME FROM TABLE1";
       rs = stmt.executeQuery(sql);
       // Extract data from result set
       // Clean-up environment
     } catch (ClassNotFoundException e1) {
     } catch (SQLException e) {

   public String getSQL() {
    return sql;

   public List<String> getResults() {
    return results;


- name: mytomcat
buildpack: sap_java_buildpack
- myhana


The additional library used to traverse the JSON structure is argo.jdom.JdomParser and argo.jdom.JdomNode for simplicity.  If you are using Maven and a pom.xml, the example code provides the Maven dependency information to be included.  You may have a preferred set of libraries to work with JSON – for this example the Argo libraries were simple enough.

The manifest.yml file needs to be at the root of the project.  The contents of this file shown below provides Cloud Foundry the parameters needed to build and deploy the WAR file.  The name of the application is “mytomcat”.  The buildpack value tells CF to use the Java buildpack to construct the application.  Since this example application is to be bound to the hdi-shared container named “myhana”, the name of the service instance “myhana” is place under the services section.  If the name of your hdi-shared service instance is difference, use the name you provided when you created the service.

Step Six: Create application in Cloud Foundry and deploy WAR File

After creating the Java project and exporting the WAR file, you’ll “push” the servlet.war file up to Cloud Foundry.

The CLI command is as follows:  cf push <appName> -p <warfile.war> -b sap_java_buildpack

  1. Open a CMD window
  2. Login to Cloud Foundry “cf login”
  3. Navigate to the c:\cf\war folder
  4. Enter the command cf push mytomcat -p servlet.war -b sap_java_buildpack

You should see a whole series of commands and steps issued during the process.  The last of which will show the status.  To see the status after the application has been deployed, you can use the command cf app mytomcat which will display the below:


Once the application has been pushed to Cloud Foundry, you’ll bind the hdi-shared service instance to the new application.

  1. In the CMD window, enter cf bind-service mytomcat myhana. The syntax for this command is:

cf bind-service <appName> <serviceName>

  1. To verify the binding, you can enter cf services. This should list your “myhana” and show under “bound apps” the “mytomcat” application.


  1. Once the binding is complete, you should use the “restage” command to ensure the environment variables are updated. Enter the following command to restage the application: cf restage mytomcat.
  2. To view/examine the environment variables, especially the VCAP_SERVICES variable, you can enter the command cf env mytomcat.

Step Seven: Create a table using the SAP Web IDE Full-Stack tool

To perform this step, you will need an SAP Cloud Platform NEO account in the EU landscape to enable the SAP Web IDE Full-Stack tool.

First, enable the Web IDE Full-Stack tool:

  1. Login in to the SAP Cloud Platform NEO Cockpit and navigate to your NEO subaccount.
  2. Select “Services” in the left-hand pane
  3. Scroll down the page, and select “SAP Web IDE Full-Stack”
  4. Select “Enable”
  5. Select “Go to Service”


Next you will need to enable “Principal Propagation”.  This will allow the Web IDE to communicate with Cloud Foundry:

  1. Navigate to the subaccount in your NEO environment
  2. Under the section “Security” in the left-hand pane, select “Trust”
  3. In the “Local Service Provider” tab, select the “Edit” button
  4. Select “Enabled” from the drop-down box next to “Principal Propagation”
  5. Select “Save”


Now, you will launch the Web IDE and create a sample project.  The project will not be used for anything other than getting to a SQL interface where you can create a table within your Cloud Foundry hdi-shared schema.

  1. Navigate to the subaccount in your NEO environment
  2. Select “Go to Service” from the “SAP Web IDE Full-Stack” icon on the “Services” page
  3. You may be prompted to connect the Web IDE to Cloud Foundry. Once you have initialized the Web IDE to use Cloud Foundry, it will prompt you reconnect.  If so:
    • Under the Cloud Foundry API Endpoint, select the appropriate endpoint. If you are using the trial CF account, select “
    • Just above the entry, select “Connect”
  4. From the Home page, select “New Project from Template”
  5. Select “Multi-Target Application”, then “Next”
  6. Enter a Project Name, for example mytestproject, and select “Next”
  7. Select “Finish”
  8. The screen should default to the “Development” screen. This screen can be displayed by selecting the icon that looks like : development
  9. Select the main project folder by its name, right click on the name and choose “New” -> “SAP HANA Database Module”.
  10. Enter a name, for example myhanamodule, and select “Next”
  11. On the next screen, select “Finish”

Once you add the “SAP HANA Database Module” you can enable the SAP HANA Database Development tools.

To add the SAP HANA Database Module:

  1. On the left-hand pane you’ll see a “gear” symbol – this is for Settings. Select the “gear” symbol icon that looks like: settings
  2. Select the “Features” option
  3. Enter “HANA” in the search bar.
  4. You should see the icon for “SAP HANA Database Development Tools”. Turn this feature “ON”.
  5. You will also see “SAP HANA Database Explorer”. Turn this feature “ON”.
  6. Select “Save”
  7. In the upper right-hand corner, a status window will pop up telling you your new preferences have been saved.

Now that the Database Development Tools and Database Explorer features are enabled, you will see a new icon in the left-hand pane like:  database

To link your project to Cloud Foundry:

  1. On the left-hand pane, select the “gear” symbol to enter the Settings
  2. Under the “Workspace Preferences”, select the “Cloud Foundry” section
  3. If you created your Cloud Foundry trial in a European landscape, select the API Endpoint as
  4. Select the Organization as your trial account, for example Sxxxxxxxxtrial_trial
  5. Select the Space for your trial account, for example dev
  6. Select Save

To connect the Database Development tools to your Cloud Foundry account:

  1. Select the Database Development icon
  2. This should bring up the below screen.
  3. If the Cloud Foundry API Endpoint is not populated with the correct value, select
  4. Select “Connect”

Finally, you can use the Database Development Tools to connect to your hdi-shared container and create your table.

  1. Select the Database Development Icon
  2. Select the “+” plus symbol to add a connection
  3. Select “HDI Container” as the “Database Type”
  4. Select the name of your hdi-shared service instance under the column “Name”
  5. Select OK

You should now see your hdi-shared service instance in the window.  If you expand the schema, you should see all the database object classes.



To create the table:

  1. Before using SQL, you will need the “hdi_user” account name associated with your hdi-shared service instance.
    1. Open a CMD window, and login in to Cloud Foundry, “cf login”
    2. Enter the command “cf env myAppName” where myAppName is the name of your application. This will display in the CMD window all the environment variables associated with your application.
    3. Copy all the output from this command and paste in to Notepad.
    4. In Notepad, look for the key “hdi_user”. You will use this user name in your SQL GRANT command below.  This name may begin with “SBSS….”.
  2. In the Web IDE, right click on the database name, and select “Open SQL Console”
  3. Copy and paste the below commands in to the SQL Console.
create column table table1 (name nvarchar(80) null);

insert into table1 (name) values ('my name is Mud');

GRANT SELECT, INSERT, UPDATE, DELETE ON table1 TO (copy in your SBSS user name, no quotes);
  1. Replace the user name SBSS… with your hdi_user name that you copied in the previous step. Paste it in the command where indicated.

The purpose of doing this is to ensure that your hdi_user account can work with the hdi-shared service instance.  Since you are using a trial account, you do not have the ability to create tables, or see existing tables even though you previously created the service instance.  These steps are a work-around to allow you to fully interact with the examples and to ensure your web application can query a table.  In a non-trial environment, we would be using a SCHEMA instance and not HDI-Shared and we would not need to perform this GRANT operation.  The trial is expected to include SCHEMAs in early Q1 2019.

  1. Execute these statements (once you have copied/pasted in your hdi_user account name in the commands) by selecting the green arrow in the SQL window.

The output should look like the below:

Statement 'create column table table1 (name nvarchar(80) null)'
executed in 4 ms.

Statement 'insert into table1 (name) values ('my name is Mud')'
executed in 3 ms - Rows Affected: 1

executed in 4 ms.

Step Eight: Launch the application in a browser

Once the application has been pushed to Cloud Foundry, you can launch the application in a browser by entering its URL.

To locate the URL, you can open a CMD window and type “cf app appName” where appName is the name of your application.  This will display the “route” of your application.


IMPORTANT:  If you are using the Java examples provided in this document, the servlet URL to see the database query uses the extension /hello at the end of the URL.  For example, the full URL to see the database connection take place will be “”.

For a full guide describing how to use the SAP HANA service in the Cloud Foundry environment in SAP and Microsoft Azure regions, see:

For information about the SAP HANA service features that are available in the SAP Cloud Platform, see:

Differences between SAP NEO and Cloud Foundry in the SAP Cloud Platform

Recently I took a look at Cloud Foundry in the SAP Cloud Platform.  Having used the NEO environment in the SAP Cloud Platform for several years, it was important to me to understand the differences between the two.

What is Cloud Foundry?  Why would I use it, and how is Cloud Foundry in the SAP Cloud Platform different than NEO in SAP Cloud Platform?

Having attended SAP TechEd in 2017, I was able to see it in action during one of the hands-on sessions…but that was it up until now.  For the past couple of months I researched SAP Cloud Foundry, built a small application, and now want to share what I’ve learned.

Nearly all the content below is derived from other sources.  I’ll do my best to give credit where it is due.

In a follow up blog, I’ll post the steps to create a trial SAP Cloud Foundry account and how to deploy a web application that binds to an hdi-shared HANA service instance.

What is Cloud Foundry?

Cloud Foundry is in open source, multi-cloud application platform and is governed by the Cloud Foundry Foundation –  Cloud Foundry has a container-based architecture that runs applications in any program language.

Cloud Foundry is an industry standard Platforms as a Service (PaaS) technology for developing and deploying cloud applications in both private and public cloud environments. It is designed to run on a variety of Infrastructure as a Service (IaaS), such as Amazon Web Services, OpenStack, Google Cloud Platform and Microsoft Azure. It enables developers to use different programming languages, runtimes and data / backing services. SAP is a founding Platinum level member of the Cloud Foundry Foundation, which oversees the development of Cloud Foundry Software and ecosystem.

Reference: SAP Cloud Platform Public Wiki / SAP Cloud Platform

The SAP Cloud Platform Cloud Foundry environment is managed by SAP and has its own network controlled by SAP on top of the supporting infrastructure providers.  Depending on the SAP availability zone, the Cloud Foundry infrastructure may be either AWS, Google Cloud Platform or Microsoft Azure.

Reference: SAP Cloud Platform Regions
Reference: Environments – Supported and Unsupported Features:

Cloud Foundry Architecture

I found a very good basic tutorial on Cloud Foundry, “Cloud Foundry: From Zero to Hero” from which I derived a quick summary of the Cloud Foundry architecture.

Reference: Cloud Foundry: From Zero to Hero
  • Every application and service are scoped to a space
  • Organizations segregate tenants in a Cloud Foundry installation
  • Quotas provide resource limits to orgs and spaces
  • Apps are started on specialized VMs called cells


  • If it’s a web process, it binds to a TCP port
  • Instances are distributed across multiple cells
  • Router distributes traffic across instances

What happens when you push an application up to Cloud Foundry “cf push”?

  1. Upload: App files sent to CF
  2. Staging: Executable artifact is created (droplet)
  3. Running: App starts on an app host
  4. App receives web requests (if it binds to TCP port)


  • Buildpacks create a runnable artifact called a droplet
  • App Files + Runtime Dependencies = App Artifact (droplet)


HANA Databases in Cloud Foundry – SAP HANA Service

Cloud Foundry supports creating and consuming SAP HANA databases using the SAP HANA Service.

The SAP HANA Service allows you to leverage the in-memory data processing capabilities of SAP HANA in the cloud. As a managed database service, backups are fully automated and service availability guaranteed. Using the SAP HANA service, you can set up and manage SAP HANA databases and bind them to applications running on SAP Cloud Platform. You can access SAP HANA databases using a variety of languages and interfaces, as well as build applications and models using tools provided with SAP HANA.

Reference – What is the SAP HANA Service

In the Cloud Foundry environment in SAP and Azure regions, space developers can install SAP HANA database systems in their space and create tenant databases on these systems. They then can create schemas and HDI containers on the tenant databases and bind them to applications running on SAP Cloud Platform. To do so, they create service instances using the different services available for the SAP HANA service.


Reference – Introduction to the SAP HANA Service in the Cloud Foundry Environment in SAP and Azure Regions:

An SAP HANA database system is associated with a particular space and is available to applications in this space. You can administer the database system and its databases using the SAP Cloud Platform cockpit or the Cloud Foundry command line interface (CF CLI).

What is the SAP Cloud NEO Environment?

The SAP Cloud NEO environment is a development environment that supports Java, SAP HANA XS and HTML5 applications.  Applications run in a modular and lightweight runtime container. Management of the HANA database is performed either in the SAP Cloud Platform using the Cockpit or WebIDE, or by using a local version of Eclipse configured with the SAP Hana Tools.  Virtual Machines are available in the European, Australia and US East landscapes, and only in the NEO environment. (As of October 2018)

My primary experience has been using the SAP NEO environment in the SAP Cloud Platform.  Web applications can be deployed within a runtime container and executed within an embedded Tomcat runtime engine.  Connections to an SAP HANA database also in the SAP Cloud Platform are made using Data Source Bindings and supporting files can be stored within a document service.

When to Use Which Environment?  NEO or Cloud Foundry?

SAP provides a good high level case analysis:

Use Cases for the Cloud Foundry Environment

Application developers can use the Cloud Foundry environment to enhance SAP products and to integrate business applications, as well as to develop entirely new enterprise applications based on business APIs that are hosted on SAP Cloud Platform. The Cloud Foundry environment allows you to use multiple programming languages such as Java, Node.js, and community/bring-your-own language options. We recommend that you use the Cloud Foundry environment for 12-factor and/or micro-services-based applications, for Internet of Things and machine learning scenarios, and for developing applications using SAP HANA extended application services, advanced model (SAP HANA XSA).

Use Cases for the Neo Environment

Neo is a feature-rich and easy-to-use development environment, allowing you to develop Java, SAP HANA XS, and HTML5 applications. We recommend that you use the Neo environment to develop HTML5 and complex Java applications and for complex integration and extension scenarios.

Reference: Environments – When to Use Which Environment?

Capabilities and Features Comparison

An analysis can be found in a blog written in April 2018 by Hakan Yerlikaya, with BuQuaTi, that provides a good comparison between the SAP NEO and SAP Cloud Foundry environments.


Reference: Haken Yerlikaya’s Blog on SAP Cloud Platform NEO vs Cloud Foundry:

For me, the main take-aways from Hakan’s blog:

  • One of the primary qualities of SAP Cloud Foundry is Micro Services Compliance. Develop, deliver and administer isolated units of software.
  • SAP Cloud Foundry offers Multi-Target Applications. Modules can be written in different technologies and deployed to different targets, but all serving a particular purpose.  The positive consequence of using Cloud Foundry is once written, the MTA can be deployed on any platform (AWS, GCP, Azure or SAP CF).
  • SAP NEO is simpler to use and more mature on SAP Cloud Platform. SAP Cloud Foundry has a larger learning curve and requires a larger investment in application development and administration, however appears to be the future for cloud development.
  • SAP Cloud Foundry uses Maven and Spring tools and supports internal tools such as GitHub and Jenkins.

A good graphic that shows fully what is provisioned in Cloud Foundry is below and can be found at  The SAP NEO environment does also provide the runtime containers, however libraries and development artifacts need to be included in your application.



Thoughts on Working Remote

For my first blog, I thought it most appropriate to express how it is to work remote in technology while living on a farm.  The best of both worlds.

Starting the Day

Most days, it is wonderful.  After my coffee and morning news, I go out and feed the horses almost always before sunrise.  IMG_3283They are so happy to see me, but I know it’s just the feed they want.


Once the ducks hear me coming they go crazy in their pen and when I open the door they charge out to the pond as fast as they can waddle.  The roosters are the noisiest and I often wonder if my neighbors are plotting their demise (or mine!). I often feel that I’m the mother of all animals, and my life’s purpose is to care for them…pffft.  Even if I am just a simple servant to them, I am rewarded tenfold just enjoying thier company.


Morning farm chores being complete, its time for the second (or third) cup of coffee and right to the computer.  Login, check email, and dive right in.  It’s roughly 8am…

About 9am, the roosters let me know they want to chat. IMG_3267They perch right outside my office window, and just wait until I get on a conference call.  So awesome…not. I’ve been “called out” on the rooster-racket, so yeah, I need to address that one.


Lunchtime I usually walk around the property making sure everyone is good.  We have coyotes and bobcats that like to pop in once in a while so I am in a constant worry.

One day we will get a donkey or two to help protect the flock…but I digress.

How I Work

My employer is amazing and having worked for them for 20+ years they provide me with the flexibility to work remote, take care of my family and farm.  This did not come right away.  It took several years to build trust and develop a strict routine.  My daily schedule typically does not change.  I have developed a set of principles for myself that I work hard to stick to:

  • Answer emails right away.  Not only is that considerate, but it lets the sender know that not only do you value them and the work, but that you are actively engaged regardless of being in the office.
  • Reply to IMs immediately.  My employer uses Skype, and it’s always “on”.  Perhaps this point is obvious, but if someone is sending you an instant message you should instantly reply!  Also, turn the volume up and make sure you get notifications.  To me, the worst is when I send an IM and the receiver takes longer than 15 minutes to reply (perhaps I should have more patience but if its important to me, it should be important to them!).
  • Write down notes constantly!! I have so many notebooks that have piled up over the years and feel like I have perfected this craft.  I write in notebooks rather than electronic notes for to-dos, meeting minutes, etc.  There’s something more cognitively impressionable about writing things down rather than electronic notes or no note taking at all.
  • Schedule regular meetings with your boss or the lead(s) of your projects. Sometimes just schedule a meeting to catch up even if its only for 15 minutes. Talking on the phone is so much more personable and revealing.
  • Don’t always make it about you.  How are things going with them?  Is there anything you can do to help? And for goodness sake don’t complain.  How can your work-life balance suck if you are at home and getting paid the same as your co-workers in the office?
  • Do not get involved in office politics. There is no amount of drama that is worth your time, or your co-workers time. Keep it professional unless you are talking to your very best best friend – and even so, you are working.
  • Politely tell your family your office hours are off-limits. My adult children are still my children and will send me texts throughout the day.  They have learned that I may not reply for some time.  And they almost never just “pop-in” because they know they may not get the response they were hoping for.  I love my family, and I’m sure you love yours.  Setting the boundaries for your work time is crucial!
  • It’s all about attitude.  Of course that can apply for in-office workers as well as remote folks.  If you are a natural positive “can-do” professional, you’re all set. Unfortunately being cynical, or someone who is sometimes too busy to be bothered…you may have some challenges.  Since you are remote, non-verbal cues are non-existent so your language and tone are everything.


Let’s face it – I work to afford the feed bill and enjoy this lifestyle.  And of course because I love technology.  When I am feeling low, or just need human interaction I may just call up a co-worker to check-in.  Staying positive, engaged and keeping to a strict schedule are key in my opinion!!