SampleSampletypeA worked example you read or clone. Evidence: it demonstrates, it never provides.See every one →What this type is →by SAPby SAPoriginPublished by SAP itself. A visible facet, never an input to a reading — a dormant official plugin reads exactly like a dormant independent one.See every one →Starting point

SAP-samples/cloud-foundry-runtime-learning-journey

The companion repository for SAP's Cloud Foundry runtime learning journey, walking through both native cf push and MTA-based deployment of a CAP application to SAP BTP.

Deploying to Cloud Foundry can go two ways, and this repository — the material behind the SAP BTP, Cloud Foundry runtime learning journey on learning.sap.com — covers both, back to back. The first path builds the project for production with cds build --production, whose --production flag is what makes cds build create the cloud deployment files, then pushes it directly with cf push. The second builds an mta.tar with the Cloud MTA Build Tool and deploys it with cf deploy instead. It stops at these two paths; further examples live in the repository's own examples folder rather than in the main walkthrough.

Facts

Last pushLicenceApache-2.0

Where it sits

Lives in
Demonstrates
DeploymentCAPDeploymentcapabilityGetting an application onto a runtime and keeping it there: build descriptors, deployment topology, service bindings and lifecycle operations. The target runtime determines how the application is packaged and configured.

Who is behind it

SAP SamplesSAP SamplesOrganisationMaintains this
In the atlas: maintains 222
@SAP-samples
maintainerArsalan KhanPersonContributes to this
In the atlas: contributes to 3
@asalan316
Markus HaugPersonContributes to this
In the atlas: contributes to 2
@markushaug
Varun ShanbhagPersonContributes to this
In the atlas: contributes to 1
@VarunS2002
3 contributors

What it declares

Every artifact

Type
Sample
Origin
By SAP

As a sample

Form
A tutorial's companion code

Connections1

SAP-samples/cloud-foundry-runtime-learning-journey connectionsSAP-samples/cloud-foundry-runtime-learning-journeyPROVIDES→ demonstrates1demonstrates authoredDeployment

README

quoted from SAP-samples/cloud-foundry-runtime-learning-journey under Apache-2.0, read
SAP-samples/cloud-foundry-runtime-learning-journey/README.mdOn GitHub

Getting Started

REUSE status

How to install

This section explains how to deploy the application to your SAP BTP subaccount. First, the Cloud-Foundry-native deployment using cf-push is shown. Then the MTA-based deployment is explained. Please ensure to log on to the Cloud Foundry environment using the Cloud Foundry CLI using this guide.

Prerequisites
Task 1: Clone the sample application
  1. Clone the sample application from the GitHub repository.

Clone the sample application from the GitHub repository using the following command:

git clone https://github.com/SAP-samples/cloud-foundry-runtime-learning-journey
  1. Open the cloned project in your preferred IDE.
Task 2: Deploy the application using native Cloud Foundry deployment
  1. Build the project

This reference applications already comes with all neccessary files for the deployment. However, you have to build the application for production first:

cds build --production

The --production parameter ensures that the cloud deployment-related artifacts are created by cds build.

  1. Login to your Cloud Foundry instance and target an organization and space

Use the following command to login to your Cloud Foundry instance:

cf login

Provide the API endpoint, which you can find in the SAP BTP cockpit, and your credentials. Once authenticated, target an organization and space by choosing the respective values from the list.

Alternatively, you can also use the following command to target an organization and space:

cf target -o <organization> -s <space>
  1. Push the application to Cloud Foundry

Use the following command to deploy the application to Cloud Foundry:

cf push

Read more about the deployment via cf-push in the official [CAP documentation].

  1. Access the application

In your Terminal, you will see the URL of the deployed application. Open the URL in your browser to access the application. Alternatively, you can also navigate into your application that is now deployed inside your Cloud Foundry space on the SAP BTP cockpit and access the application from there.

Task 2: Deploy the application using Multi-Target Application (MTA) deployment
  1. Build the project This reference applications already comes with all neccessary files for the deployment. However, you have to build the application for production first:
mbt build -t gen --mtar mta.tar

This will create a mta.tar file in the gen folder. This file contains the deployment artifacts for the MTA deployment.

  1. Deploy the application

Use the following command to deploy the application to Cloud Foundry:

cf deploy gen/mta.tar

Wait until the process is finished. You can check the status of the deployment in the terminal. Once the deployment is finished, you should see something like this:

[…] Application "hello-cloud-foundry-srv" started and available at "[org]-[space]-hello-cloud-foundry-srv.landscape-domain.com" […]

Examples

For additional examples and sample applications, check out the examples folder.

Learn More

Contributing

If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.

License

Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

Apache-2.0, read

Details

Sources3
Added by handdiscovered herechecked
github.com/SAP-samples/cloud-foundry-runtime-learning-journeytree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viaAdded by hand
first seen in the atlas
ecosystem and domaincap, operations-and-runtime
Contributors3

From the repository’s contributor list, .

History in the atlas1
  1. First seen.
For your agent
Ref
artifact:sap-samples-cloud-foundry-runtime-learning-journey
JSON
/artifacts/sap-samples-cloud-foundry-runtime-learning-journey.json
MCP
Connecting an agent