Deployment

Deploy on the SAP HANA Cloud Platform

In YaaS, you can deploy, update, and scale your services, Builder modules, or storefronts using any deployment method you want. To deploy your project using the SAP HANA Cloud Platform, use one of the following options:

  • SAP HANA Cloud Platform, starter edition for Cloud Foundry services (beta)
  • Other SAP HANA Cloud Platform runtimes

Use the HCP, starter edition for Cloud Foundry services (beta)

To deploy using the HCP, starter edition for Cloud Foundry services (beta), use one of the following options:

  • Cloud Foundry Command Line Interface (cf CLI)
  • Eclipse

Deploy with the cf CLI

First, download the latest version of the cf CLI by following these instructions. Then, connect to your cf space using the following commands:

cf api https://api.cf.us10.hana.ondemand.com
cf login
cf target -o <ORG> -s <SPACE>

To deploy an application, navigate into the project directory that is deployed, and then use the cf push command.

Deploy with Eclipse

The Eclipse Cloud Foundry plug-in enables you to deploy and manage Java applications on the Cloud Foundry instance of the SAP HANA Cloud Platform, from Eclipse. First, install the plug-in following these instructions. Then to use this plug-in in Eclipse, follow these steps:

  1. Open the Java perspective, then select Window > Show View > Other > Server > Servers.
  2. Right-click the Servers view and select New > Server.
  3. In the Define a New Server window, expand the Pivotal folder, select Cloud Foundry, and enter a name for your server, such as HCP Cloud Foundry. Then click Next.
  4. Do not modify the default value for the Server's host name. This field is not used.
  5. In the Cloud Foundry Account window, enter the email and password of your SAP HANA Cloud Platform, starter edition for CF account. Create a new server environment by adding the Cloud Foundry API URL. Go to Manage Cloud > Add a Cloud URL, enter the URL, and then click Validate Account.
  6. The Cloud Foundry Account window is refreshed and displays a message indicating whether or not your credentials are valid. Click Next.
  7. In the Organizations and Spaces window, select the space that you want to target, and click Finish.

Once you have successfully configured the server, it appears in the Servers view of Eclipse, and you can deploy to this server. For more information, see the Cloud Foundry Eclipse Plug-in documentation.

Deploy a store publicly

Once you have created a storefront and have it running locally, deploy it to the cloud using the following steps:

  1. Update the gruntfile.js file to use the Client_ID, Tenant_ID and the Redirect URI with your own project details.
  2. Build an optimized version of your code, and enter the grunt build command from the root directory. This operation creates a build in the ./dist folder.
  3. Configure the static-manifest.yml file for your store.
  4. Deploy the store in single tenant mode using the cf push -f static-manifest.yml command that uses the https://github.com/cloudfoundry/staticfile-buildpack.git buildpack.

Deploy a Builder module

To deploy a Builder module using Cloud Foundry, use the manifest.yml file in the root directory of your Builder module: applications: - name: {your module name} buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git instances: 1 memory: 128M domain: {target cf api domain} Configure the manifest.yml file for your module and then deploy the Builder module using the cf push command.
A Builder module is usually static content, such as HTML and Javascript. Therefore, the staticfile-buildpack is a good buildback to use.

Use other SAP HANA Cloud Platform runtimes

Deploy your project using the SAP HANA Cloud Platform at the following URL: http://hcp.sap.com/index.html. Once you have created your application or service using Java, you can upload the resulting .war file to the SAP HANA Cloud Platform. Perform the following steps for deployment:

Set up your account

  1. Sign up for or use an existing SAP HANA Cloud Platform account, and log into your account.
  2. In the left pane, select Account, and then select the check box to Enable Beta Features for Java 8 Support.

Deploy your service

  1. Management of your application is done within the SAP HANA Cloud Platform Cockpit. Open the cockpit at the following URL: https://account.HANAtrial.ondemand.com/cockpit
  2. In the left pane, select Java Applications, and click on the Deploy link to deploy a Java Web application as a WAR file.
  3. Fill out the Deploy Application form with the information below:
    • Enter the WAR File Location for your service.
    • Give your service a descriptive Application Name.
    • For the Runtime Name, select Java Web Tomcat 7.
    • For the JVM Version, select JRE 8 (BETA).
  4. Click the Deploy button, as seen in the following screenshot, and the .war file is uploaded to the SAP HANA Cloud Platform:
    HCP Deployment Dialog

A notification appears that you have successfully deployed your application or service.

Start your application

After processing the deployment successfully, you can immediately start your service by clicking the Start button. Otherwise, you can start it later by following these steps:

  1. Open the SAP HANA Cloud Platform Cockpit.
  2. In the left pane, click Java Applications, and then select your application or service.
  3. Click on the Start button.
It takes a few minutes for the application or service to start.

Access your application

The URL to your service is listed in the Java Application details, and you can access the RAML Console of your service using these steps:

  1. Open the SAP HANA Cloud Platform Cockpit.
  2. In the left pane, click Java Applications, and then select your application or service.
  3. On the Application Details page, the status of your application or service is displayed at the top as STARTING in yellow, or STARTED in green.
  4. Once the application or service is up and running, click on the URL link in the Application URLs section.

Now, you can interact with your application or service using the API Console.

  • Send feedback

    If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.

  • Get Help

    Use our private help channel. Receive updates over email and contact our specialists directly.

  • hybris Experts

    If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.