Search Results

Getting Started CLI Tutorial

The following is a walkthrough on using TIBCO Cloud Integration. This tutorial is aimed at DevOps administrators who have been provided an EAR file of a TIBCO BusinessWorks App from a developer, and want to push, scale, monitor, and administer the app. For more details on each step, click the corresponding link.

Register Your Account

To begin using TIBCO® Cloud Integration, you must register an account and log in to the TIBCO Cloud Integration web site. See Registering a TIBCO Cloud Integration Cloud Account for more details.

Download the TIBCO® Cloud - Command Line Interface

The TIBCO Cloud Command Line Interface (CLI) is used to interact with TIBCO Cloud Integration from the command line. We’ll use it to push, scale, and then delete an app. The download will be pre-configured with your account information.

  1. In the menu bar, click Downloads.

  2. Click the version of the TIBCO Cloud - Command Line Interface (CLI) you wish to download.

  3. Move the tibcli or tibcli.exe executable to a location within your system path.

  4. For Unix or Mac OS X systems, change the permissions of the tibcli executable as follows:

     chmod 755 tibcli

    See also:

Push Your App

Use the TIBCO Cloud CLI to push your app to TIBCO Cloud Integration.

The following example uses the sample app petstoreapplication_2.0.0.ear and manifest file manifest.json. You must first generate these deployment artifacts using TIBCO Business Studio - Cloud Edition. For a tutorial of this process, see Deploying an App from TIBCO Business Studio - Cloud Edition.

  1. Move your app and manifest into a temporary directory, and then change to that directory.

     mkdir myPetstore
     cd myPetstore
     cp ~/petstoreapplication_2.0.0.ear .
     cp ~/manifest.json .
  2. Log in to TIBCO Cloud Integration using the TIBCO Cloud CLI. The executable you downloaded is preconfigured with your username, password, and the TIBCO Cloud Integration server:

     tibcli login 
  3. Push a single instance of the app using the tibcli app push command:

     tibcli app push 1

    The command will display output as it is pushing to the server.

  4. In the web UI, go to the Apps tab. The app will be listed, but the icon to the left of the app entry will be amber as the app is being pushed to the server. When it is complete, the icon will turn green.

  5. List the apps using the tibcli app list TIBCO Cloud CLI command:

     tibcli app list 

    See also:

  6. Next, view the app’s endpoint. In the web UI, select the app whose endpoint you want to view. Click Endpoint. By default, the endpoint URL is selected.
  7. To open the URL in a new browser, click the icon within the text field.

    Note that clicking on the endpoint URL to view in a new browser will open the base URL; you generally need to add a resource path to the URL to see anything. For example, for petstoreapplication you would have to copy the URL and then add the resource path /pet/2.

    See also:

Viewing Logs

You can view app logs for your running app to monitor its performance and debug any potential issues. Logs can be streamed in real-time, or you can select a time range to view historical logs.

To stream real-time logs:

  1. View logs with the tibcli monitor applog --stream command:

     tibcli monitor applog --stream petstoreapplication

    The last five minutes of app logs are displayed, and will continually update in real time. They are refreshed every five seconds.

  2. Press Ctrl-C to stop displaying logs.

In addition to real-time logs, you can also view historical logs from a specified range.

To view historical logs:

  1. View logs with the tibcli monitor applog command. By default, this displays the last hour of app logs:

     tibcli monitor applog petstoreapplication
  2. View the logs for the last twelve hours:

     tibcli monitor applog --interval 12h petstoreapplication
  3. View the logs from midnight, January 20th to midnight, January 30th:

     tibcli monitor applog --beginTime 2016-01-20 --endTime 2016-01-30 petstoreapplication
  4. Logs can be downloaded by redirecting the shell output to a file. For example, to download the last hour of app logs:

     tibcli monitor applog petstoreapplication > petstoreapplication.log

    See also:

Scale Your App

A single instance of the app is now running, but you can scale up the app with the TIBCO Cloud CLI to run more instances. App scaling is done using the app scaleup, app scaledown, and app scaleto commands.

  1. Scale up the app petstoreapplication by adding three instances:

     tibcli app scaleup 3 petstoreapplication 
  2. List the apps again using the tibcli app list TIBCO Cloud CLI command to see the number of instances running:

     tibcli app list
  3. Next, scale down the app by one instance. This removes an instance from the total currently running:

     tibcli app scaledown 1 petstoreapplication 
  4. List the apps again using the tibcli apps TIBCO Cloud CLI command again; you will see four instances running.

  5. Scale the app to zero instances:

     tibcli app scaleto 0 petstoreapplication 
  6. List the apps again using the tibcli app list TIBCO Cloud CLI command to see the number of instances running, which will now be zero.

    See also:

Configure Your App

You can late-bind property values for a TIBCO BusinessWorks App using the tibcli app push and tibcli app configure commands. The current values of app properties can be displayed or overridden.

The tibcli app configure command will prompt you to restart the app with the new values. This enables you to modify properties without pushing and building a new EAR file, speeding up changes for moving from test to production, or changing credentials or other variables.

To view app properties:

  1. Log in with the TIBCO Cloud CLI as shown in Logging In With the TIBCO® Cloud - Command Line Interface.
  2. List the properties for an app using the tibcli app configure -l command:

     tibcli app configure -l petstoreapplication

To configure an app:

  1. Change the configuration for the app with the tibcli app configure command, specifying overridden properties in property=value pairs. For example, to override prop1 and prop2 with the values “newval” and “newval2”:

     tibcli app configure petstoreapplication prop1="newval" -e prop1="newval2" 

    After issuing the above command, you will be prompted to verify if the app will be reconfigured. If you confirm, the overrides will be applied and the app will be restarted. The verification can be skipped with the -f option.

    See also:

Delete Your App

After you’re done with your app, you can delete it using the TIBCO Cloud CLI and log out.

  1. Delete the app:

     tibcli app delete petstoreapplication	 
  2. Log out of TIBCO Cloud Integration:

     tibcli logout

    See also: