Managing Cloud Foundry Environments

Objectives

After completing this lesson, you will be able to:
  • Manage Cloud Foundry environments
  • Manage service instances in Cloud Foundry

Cloud Foundry Environment

SAP BTP supports Cloud Foundry environments and runtimes:

Cloud Foundry
The SAP BTP, Cloud Foundry environment is a service that manages one ore more spaces.
Space
A space provides resources and settings for apps and service instances.
Service Instance
A service instance runs together with apps and other service instances in a space.
Space Quota
The SAP BTP, Cloud Foundry environment may define space quotas for spaces based on the quota of its entitlement.
Visualization of the account model with Cloud Foundry as environment, space as runtime, and space quota as quota

A space is a runtime of SAP BTP, Cloud Foundry environment. The Cloud Foundry environment manages these spaces and defines quotas to size them. Service instances run in a space. A Cloud Foundry environment contains what is referred to as an org.

Note

In Cloud Foundry, an org(anisation) is a development account that an individual or multiple collaborators can own and use. There's a one-to-one relationship between org and SAP BTP, Cloud Foundry environment.

Screenshot flow enabling Cloud Foundry in the overview of a subaccount

From the Overview of a subaccount, the SAP BTP, Cloud Foundry environment can be easily enabled by choosing Enable Cloud Foundry. There can be only one environment per subaccount, but this environment can have many spaces.

Hint

The proposed Org Name includes the global account name. This may lead to a very long name with special characters like spaces. Other services refer to the name like destinations used for the SAP Cloud Transport Management Service (cTMS). Therefore, the org name shouldn't be too complicated.

After enabling the Cloud Foundry environment in a subaccount, the Cloud Foundry menu on the left in the SAP BTP cockpit can be expanded showing Spaces, Space Quotas, and Org Members.

Screenshot flow creating a space with org quota

Spaces can be created in the Overview or by choosing Cloud FoundrySpaces on the left. Choosing the Create Space button opens a popup asking for a space name and space roles, which should be assigned to the user creating the space.

The first space created in a Cloud Foundry environment gets the whole org quota assigned. If additional spaces should be created, this quota must be reduced to free quota for the other spaces.

Screenshot flow creating a space quota and and assigning it to a space

A space quota defines the amount of memory and the number of routes, service, and app instances for a space. It can be created and assigned to spaces in Cloud FoundrySpace Quotas. The popup for creating a space quota provides the org quota underneath every input field as assistance.

Entering -1 in an input field assigns an "unlimited" quota for the resource. This means that the org quota is used.

Hint

The only true unlimited resource is the number of app instances.

Enable a Cloud Foundry Environment

Task 1: Add a Service Plan for Cloud Foundry Environment

Task 2: Enable and Configure a Cloud Foundry Environment

Enable Cloud Foundry Environments in a Development Landscape

Task 1: Add Service Plans for Cloud Foundry Environment

Task 2: Enable and Configure the Cloud Foundry Environment in the Test Account

Task 3: Enable and Configure the Cloud Foundry Environment in the Prod Account

Service Instance in Cloud Foundry

Visualization of the account model using HTML5 Application Repository Service as an example for a service instance in Cloud Foundry

An example of a service instance is the app-host service plan of HTML5 Application Repository Service. It uses a numeric quota and can therefore be used in as many subaccounts in parallel as there's quota available.

Screenshot flow about opening a space from the subaccount overview and Cloud Foundry spaces

A space can be opened by selecting the line in the Spaces table in the Overview of the subaccount. Another way is to choose the header of the tile for a space in Cloud FoundrySpaces. Both will show the details like deployed applications or service instances running in the space.

Screenshot flow instantiating HTML5 Application Repository Service in the service marketplace of a subaccount

From the Service Marketplace in a subaccount, a service can be created by choosing a service plan. A service instance needs in addition the environment (Cloud Foundry), runtime (space), and a unique instance name. Creating the HTML5 Application Repository Service results in a service instance in Instances and Subscriptions.

Note

The instance should have a CLI-friendly name (command line interface): A short string (up to 32 characters) containing only alphanumeric characters (A–Z, a–z, 0–9), periods, underscores, and hyphens. It cannot contain spaces.

From the Service Marketplace in a Cloud Foundry space, a service can be created in the same way as in the subaccount. The only difference is that only the service plan and instance name are needed. The environment and space were already set by selecting the service marketplace in the space.

Create a Service Instance in Cloud Foundry

Task 1: Create a Service Instance in a Cloud Foundry Environment

Log in to track your progress & complete quizzes