This document describes how a Mendix application is deployed on the SAP Cloud Platform. It also describes how Cloud Foundry can be set up on SAP from within the Desktop Modeler.
It is recommended that you use the SAP deployment tools in the Developer Portal and follow the instructions in the documentation for deploying to SAP Cloud Platform unless you have specific requirements which that method does not support.
2 SAP Cloud Platform Cloud Foundry
To run a Mendix application on the SAP Cloud Platform, you need a subscription to the SAP Cloud Platform Cloud Foundry. This can be a trial account or a commercial account.
A Mendix application requires the following services on the SAP Cloud Platform:
- PostgreSQL database
In addition to these required services, the following services are optional:
- XSUAA Service
- Connectivity Service
- ObjectStore (S3)
It is recommended that you use the instructions for deploying through the Mendix Developer Portal. If you do this, these services will be automatically instantiated and bound to the application.
2.1 Trial Account
An SAP Cloud Platform Cloud Foundry trial account comes with a large enough quota to run a single application. The database plan available on the trial account is v9.4-dev.
The S3 ObjectStore Service is not available on a trial account. This will result in the loss of documents or files within your application when you redeploy it.
2.2 Commercial Account
To run Mendix within a commercial SAP Cloud Platform Cloud Foundry account, the quota should include the following:
- ObjectStore (s3)
- PostgreSQL v9.4-xsmall
- XSUAA Service
- Connectivity Service
A set of these services will be initiated for each application.
3 Deployment of an Application
To deploy an application on SAP Cloud Platform Cloud Foundry, the Mendix Developer Portal is recommended.
3.1 Command-Line Deployment
When you want to make your deployment part of a CI/CD pipeline, it is also possible to use the Cloud Foundry command line.
For the command-line instructions, see Mendix Cloud Foudry Buildpack.
3.2 Deployment with Desktop Modeler Native Cloud Foundry Integration
If you do not want to use the Mendix Developer Portal for managing your application on the SAP Cloud Platform, you can use the Desktop Modeler Cloud Foundry integration.
Perform these steps to deploy your app on Cloud Foundry using the Desktop Modeler:
- Set up Cloud Foundry in the Desktop Modeler.
- Bind your services in SAP Cloud Platform Cloud Foundry.
- Deploy your app to Cloud Foundry.
To set up Cloud Foundry in the Desktop Modeler, follow these steps:
Go to Menu > Run > Edit Cloud Foundry Settings:
Enter the API endpoint of your SAP Cloud Platform Cloud Foundry Region and provide your account credentials, then click Next:
Provide to following information:
- App Name
- Buildpack (use Default)
The Desktop Modeler is now ready to use SAP Cloud Platform Cloud Foundry. Next, you need to set up your Cloud Foundry Services within SAP Cloud Platform Cloud Foundry.
To bind your services to SAP Cloud Platform Cloud Foundry, follow these steps:
- Open your SAP Cloud Platform Cockpit.
- Log in and navigate to the Cloud Foundry Region you selected in the Desktop Modeler.
Select the Space and the app you created using the Desktop Modeler wizard:
Open the Binding Services menu and click Bind Service:
Click Next to select a service:
Select PostgreSQL as the database for your application:
Select the v9.4-dev plan for a trial account or v9.4-xssmall for a commercial account:
Enter an Instance Name and click Finish.
Your application is now set up with the minimum configuration needed to run your application. Follow a similar process to set up other services. For information about configuring these services, consult the links in section 4 Related Content.
To deploy your application using the Desktop Modeler-native Cloud Foundry integration, follow these steps:
Open the Desktop Modeler.
Click the drop-down menu for the Run option in the toolbar.
Click Run on Cloud Foundry. Your app will now be deployed to Cloud Foundry.