You are on page 1of 15

Week 1: Introduction

Unit 5: Building Your First Application –


Pushing the App to Cloud Foundry
Building Your First Application – Pushing the App to Cloud Foundry
SAP Cloud Platform domain model

1 n Region
User Account Home
n

n Global Neo Environment


Environment Account*
1 n
Subaccount Organization

n Subaccount

Neo application
n
Space subscriptions
Cloud Foundry
n Neo applications
applications n

Cloud Foundry
n n Neo services
services

*Note: Global accounts can be two types: trial and enterprise


© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
Building Your First Application – Pushing the App to Cloud Foundry
Multiple runtimes and languages with SAP Cloud Platform

SAP Cloud Platform is now a polyglot PaaS

‟Polyglot: a person who knows and is able to use several languages”


Dictionary

▪ Multi-language
▪ Enterprise support for selected buildpacks
▪ Cloud Foundry community buildpacks
▪ Bring your own buildpack

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Building Your First Application – Pushing the App to Cloud Foundry
Multiple runtimes and languages with SAP Cloud Platform

With the Cloud Foundry environment, SAP Cloud Platform enables the use of additional
programming languages and frameworks via buildpacks

Java Node.js Python HTML5 <your choice>


▪ Develop, deploy, and ▪ Benefit from multiple ▪ Build and deploy ▪ Develop and run ▪ Bring your own
operate Java Node.js packages your Python HTML5 applications language and
applications available applications runtime of choice
▪ Benefit from multiple
▪ e.g. complex ▪ Develop and run ▪ Selection of Python SAPUI5 code ▪ Choose from
integration projects Node.js applications packages are also templates existing community
in the cloud available buildpacks or
develop your own

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Building Your First Application – Pushing the App to Cloud Foundry
How applications are staged and started

Staging is the process of creating an application package (droplet) that contains all needed
components for the application to run (e.g. runtime, drivers, additional libraries, etc.).

+ staging

buildpack droplet

+ start

droplet rootfs
application

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Building Your First Application – Pushing the App to Cloud Foundry
Multiple runtimes and languages with SAP Cloud Platform buildpacks explained

▪ Buildpacks are responsible for setting up the environment and injecting dependencies for your app
▪ Every buildpack is just a zip file with 3 scripts: detect, compile, and release
▪ The staging phase where buildpacks come into play consists of 3 steps: executing the 3 scripts

1. Detect: Decide which 2. Compile: Create the droplet 3. Release: Create a metadata
buildpack can handle the app for the application file that tells CF Cloud
(if not specified explicitly) Controller how to start the
application

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Building Your First Application – Pushing the App to Cloud Foundry
Application deployment process: $ cf push

UPLOAD STAGE START

➢ upload application ➢ build droplet ➢ start app container

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Building Your First Application – Pushing the App to Cloud Foundry
Start, Restart, and Restage


Start Restart Restage

Download droplet Stop & start with the already Stop, compile new droplet, start
compiled droplet
Start app container Compiles new droplet without
▪ Use start coming with the Refreshes the app app source update
buildpack environment
e.g. configuration change Restage updates the env used
▪ Provide specific start
command for your app by the buildpack

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


Building Your First Application – Pushing the App to Cloud Foundry
Bring Your Own Language – System buildpacks with community support

There are a number of system buildpacks (beyond Java, Node.js, Python) available in the Cloud Foundry
environment that enable you to leverage various programming languages and frameworks*

Learn more about system buildpacks*:


▪ PHP: https://docs.cloudfoundry.org/buildpacks/php/index.html
▪ .NET Core: https://docs.cloudfoundry.org/buildpacks/dotnet-core/index.html
▪ Go: https://docs.cloudfoundry.org/buildpacks/go/index.html
▪ Ruby: https://docs.cloudfoundry.org/buildpacks/ruby/index.html

▪ Binary: https://docs.cloudfoundry.org/buildpacks/binary/index.html
▪ Staticfile: https://docs.cloudfoundry.org/buildpacks/staticfile/index.html

*There is only community support, SAP does not provide Enterprise Support for these buildpacks
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9
Building Your First Application – Pushing the App to Cloud Foundry
How to use a custom buildpack

In case you use a language or framework that is not available with Cloud Foundry system buildpacks or you
need to change the configuration or enable additional features of an existing buildpack, you can use a custom
buildpack:

▪ A community or third-party provided buildpack


▪ Customize an existing buildpack
▪ Develop your own buildpack

The custom buildpack is provided as a Git Repository URL in the application push configuration.

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Building Your First Application – Pushing the App to Cloud Foundry
Demo scenario – Simple chat room app

▪ Simple chat room


▪ Node.js & HTML5

https://github.com/SAP/cloud-sample-node-chat/

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


Building Your First Application – Pushing the App to Cloud Foundry
Further reading i Additional Material

SAP Cloud Platform Web site

Getting a trial account

Cloud Foundry buildpacks

Staging apps on Cloud Foundry

Deploy apps on Cloud Foundry

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


Building Your First Application – Pushing the App to Cloud Foundry
What you’ve learned in this unit

▪ SAP Cloud Platform domain model


▪ Runtimes supported on SAP Cloud Platform
▪ Polyglot apps and BYOL support on SAP Cloud Platform
▪ Pushing, staging, starting apps on SAP Cloud Platform Cloud
Foundry environment
▪ Developing your first Node.js app

© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2019 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.

You might also like