Installing‎ > ‎

Install on Cloud Foundry

You can install Live API Creator to run as a cloud-based service by installing in a Cloud Foundry environment.

Verify the following prerequisites before installing on Cloud Foundry:
  • You have the Cloud Foundry command line installed, and you are logged into Cloud Foundry.
  • You have obtained the CALiveAPICreator.war Web application ARchive (WAR) file.

Note: The WAR file is set up for installation in a Cloud Foundry environment and includes the database drivers for MySQL, Postgres, and Derby. If you plan on accessing other database types, such as Oracle, DB2, SQL Server, and Cloud Foundry does not provide these JDBC drivers, add the the JDBC driver for that database type to the WAR file. The JDBC drivers Cloud Foundry provides depends on your Cloud Foundry setup.

For more information about how to add other JDBC drivers, see Add Other JDBC Drivers.

  • You have the required MySQL version. The version depends on the version of MySQL that is available in your particular Cloud Foundry installation.

Note: If you experience problems getting Live API Creator to work properly, you may have an incompatible version of the MySQL/MariaDB JDBC driver installed. You can override the driver that Cloud Foundry provides by adding the MySQL/MariaDB JDBC driver to the WAR file.

For more information about viewing an example of how to add the MySQL JDBC driver to the WAR file, see Add Other JDBC Drivers.

Create a MySQL Service

Live API Creator requires a MySQL database to store its settings.

From the Cloud Foundry command line, issue the following command:
cf create-service p-mysql 100mb-dev CALiveAPICreator_admin
  • The service provider p-mysql should be the same for most users.
  • The plan (in this example, 100mb-dev) can vary depending on a number of factors (You can see what services are available to you, and under which plan, by issuing the cf marketplace command)
  • The name of the MySQL service must be CALiveAPICreator_admin.

Create a Cloud Foundry App 

In the same directory as the CALiveAPICreator.war file, create a manifest.yml text file. The application manifest details how Cloud Foundry deploys Live API Creator and requires the name of Live API Creator in Cloud Foundry (name: ca-live-api-creator).

The following code sample illustrates a simple manifest example:

---
applications:
- name: ca-live-api-creator
  memory: 512M
  instances: 1
  path: CALiveAPICreator.war
  services:
    - CALiveAPICreator_admin

The following are the basic Cloud Foundry deployment options:

  • name is the name of Live API Creator in Cloud Foundry. In this example, ca-live-api-creator is the name.

Required: Yes

Important! Do not use underscores in this name as that can cause problems.

  • memory is the amount of memory dedicated to Live API Creator: 512M should be fine for small installations.
  • instances is the number of Cloud Foundry servers that will run Live API Creator.
  • path is the path to the CALiveAPICreator.war file.
  • services is the name of the MySQL service that will be used by Live API Creator to store its metadata. The name of the service must be CALiveAPICreator_admin.

Deploy Live API Creator

  1. From the directory containing the CALiveAPICreator.war file and the manifest.yml file, deploy Live API Creator by issuing the following command:
    cf push
    Messages detailing the deployment appear. Because this is a new application and you have not bound it to the MySQL service yet, error messages about this may appear. Ignore the messages.
    Live API Creator is created.
    1. Bind Live API Creator to the MySQL service by issuing the following commands:
      cf bind ca-live-api-creator CALiveAPICreator_admin
      cf restage ca-live-api-creator
      1. Verify that no error messages appear.
      2. Verify that Live API Creator is up by issuing the following command:
        cf logs --recent ca-live-api-creator
        1. Check the log for error messages or messages that are shown in red.

        Start Live API Creator in Cloud Foundry

        1. Get the URL to your newly-deployed Live API Creator in Cloud Foundry. You can use this URL in your browser.
        2. Get the memory usage of Live API Creator in a space, issue the following command:
          cf apps

          The following response is expected:
        Getting apps in org ACME / space dev as jdoe...
        OK

        name                  requested state   instances   memory   disk   urls   
        ca-live-api-creator   started           1/1         512M     1G     ca-live-api-creator.acme.pivotal.io

        Your URL is the value for urls. Connect to Live API Creator using this URL in your browser.