Deploying a Flogo App to Pivotal Application Service

Note: The information in this section is applicable for an app executable only.
After installing the Cloud Foundry Command Line Interface (cf CLI), you can push a Flogo app to the Pivotal Application Service. For more information on Pivotal Cloud Foundry, Pivotal Application Service, and its CLI, refer to the Pivotal Cloud Foundry documentation.
Before you begin
  • Run the following command to ensure that the Cloud Foundry command-line client is installed successfully:

     $ cf version

    This command returns information about the currently installed version of the Cloud Foundry command-line client. For example:

    cf version 6.42.0+0cba12168.2019-01-10

  • Run the following command to authenticate yourself in the Pivotal Cloud Foundry:

    $ cf login

Building a Linux Executable

From the UI

To build a Linux executable from the UI:

    Procedure
  1. From the UI, build a Linux executable using the Linux/amd64 option. See the Building the App section for details.
  2. Provide run permission to the app executable: chmod +x <app-executable>
  3. Follow the steps in the appropriate section below.

Without Using a manifest.yml File

    Procedure
  1. Create a temporary folder.
  2. Copy the linux/amd64 executable of the app, which you had created in Building a Linux Executable and save it to the temporary folder created in step 1.
    Note:
    • Ensure that you do not save the executable to a path that already contains other files and directories.
    • In your Flogo app, for a REST trigger, ensure that the port is set to 8080 in the trigger configuration.
  3. In a command window, navigate to the path where you saved the executable and run the following command:
     $ cf push <NAME_IN_PCF> -c './<APP_EXECUTABLE_NAME>' -b binary_buildpack -u none

    For example:

     cf push test1 -c ./Timer-linux_amd64 -b binary_buildpack -u none

    For the -u argument, depending on the health check, provide value as none, port, http, or process. For example, if the app is a REST API exposing an HTTP endpoint, use port after -u.

    Note: In your Flogo app, for a REST trigger, ensure that the port is set to 8080 in the trigger configuration.

  4. After successfully deploying the app to the Pivotal Application Service, you can check the log of the app using the following command:
    $ cf logs <APP_NAME_IN_PCF> --recent

Using a manifest.yml File

    Procedure
  1. Create a temporary folder.
  2. Copy the linux/amd64 executable of the app, which you had created in Building a Linux Executable and save it to the temporary folder created in step 1.
    Note: In your Flogo app, for a REST trigger, ensure that the port is set to 8080 in the trigger configuration.

    You have two options:

    • If you do not mention Path in the manifest.yml file, you must have both manifest.yml and the app executable in the same directory.
    • If you have the manifest.yaml file and the app executable in different directories, you must mention the following in the manifest.yml file:

      path:  <app executable path>

  3. Create a manifest file in YAML. The following manifest file illustrates some YAML conventions:
    # this manifest deploys REST APP to Pivotal Cloud Foundry 
    
    applications:
    - name: REST_APP
      memory: 100M
      instances: 1
      buildpack: binary_buildpack
      command: ./REST-linux_amd64
      disk_quota: 100M
      health-check-type: port
    Note: REST-linux_amd64 indicates the name of app executable.
  4. Save the manifest.yml file and run the following command in the same directory:
    $ cf push
Result The Flogo app is successfully pushed to the Pivotal Cloud Foundry.