Skip to Content

Deploy Your First SAPUI5 App to Cloud Foundry

test
0 %
Deploy Your First SAPUI5 App to Cloud Foundry
Details
// Explore More Tutorials

Deploy Your First SAPUI5 App to Cloud Foundry

09/30/2019

Create, build and deploy a MTA project with an integrated SAPUI5 module.

You will learn

  • How to create a MTA archive
  • Why there are modules belonging to a MTA archive
  • How to add a UI module to an archive
  • How to build a project for Cloud Foundry
  • How to deploy a project to Cloud Foundry


Step 1: Create a new multi-target application

An MTA project is a wrapper for all modules (microservices) which are part of a Cloud Foundry application.

  1. Click on the tile New Project From Template to open the wizard.

    NewProject
  2. Select Multi-Target Application and click Next.

    NewMta
  3. Choose tutorial as the project name and click Next.

    MtaName
  4. Keep the default values on the next screen and click Finish to confirm.

    MtaNext
Log on to answer question
Step 2: Add an HTML5 module
  1. Right-click on the newly created project and select and select New -> HTLM5 Module to create a new module.

    UImodule
  2. Go with the plain SAPUI5 Application and click Next.

    Next
  3. Name the module ui, the namespace sapcp.tutorial.cf and go to the Next screen.

    Name
  4. Keep the default values on this screen and close the creation of the module with Finish.

    View
Log on to answer question
Step 3: Build the application

Build (aka package) the project to a mtar archive to be able to deploy it to Cloud Foundry.

  1. Right-click on the project and select Build and Build to trigger this process.

    build
  2. Check the console output to make sure the process started.

    state
  3. Once the build is complete, you can see a message in the log. You should also see the generated mtar archive in the project tree.

    success
Log on to answer question
Step 4: Deploy the archive to Cloud Foundry

Now that you created a mtar archive, you are all set to deploy the application.

  1. Right-click on the mtar file and select Deploy and Deploy to SAP Cloud Platform.

    deploy
  2. Select the proper your Cloud Foundry API Endpoint. This endpoint varies with the region you selected for your sub-account. The down-down options for Organization and Space should be populated automatically then.

    deployto
  3. You will see a success message and the URL of the app in the log once the deployment finished. Open this URL in your browser to start the application.

    success
Log on to answer question
Step 5: Login to the application

Click Open in the popup (top-right corner) to start your application.

You can also see and open running Cloud Foundry application in the SAP Cloud Platform Cloud Cockpit when you navigate to your Sub-account -> Space -> Applications.

You might need to login with the credentials of your SAP ID (the same credentials you use for the SAP Cloud Platform Cockpit and the Web IDE).

login

This sample application consist of a header and an empty page only. So you should see something like this:

app

Enter the URL of your running application:

×

Next Steps

Back to top