Managing Adapters

Overview

Working with adapters is a straightforward process. You can create, update and delete adapters like any other object in a ClearBlade system. Each Adapter consists of a name, a small number of administrative commands, and a small number of files comprising the administrative and executable assets of an adapter.

Create Adapter

Note

While it is not required, it is assumed that any executable code and dependant libraries comprising an adapter have been created.

  1. Navigate to the “Adapters” tab on the sidebar or menu of the developers console

  2. Click + Add Adapter.
  3. Enter the name, architecture, and description for the adapter and click Create.

    Heads Up!

    Adapter names must be unique within a system!


The new adapter will now be displayed in the list of adapters defined within the selected system.

Update Adapter

Updating an existing adapter is very easy. When updating an adapter, you can change the adapter architecture and description; add, modify, and delete adapter files; and modify the commands associated with the adapter.

Edit Adapter Properties

  1. Navigate to the “Adapters” tab on the sidebar or menu of the developers console
  2. Click on the adapter you want edit properties for
  3. Click on the icon under the adapter name next to the architecture description
  4. Make the necessary changes to the Architecture and Description fields and click Edit

Edit Adapter Files

See Adapter File Management

Edit Adapter Configuration

For a description of the commands that can be configured on the adapter, see Adapter Configuration

  1. Navigate to the “Adapters” tab on the sidebar or menu of the developers console
  2. Click on the adapter you want edit the configurations for
  3. Click on the icon next to Configuration
  4. Click the Configuration button.

  5. Enter shell commands that should be executed for each of the associated fields
    • Deploy Command - A command or shell script that will be run after the files are installed on a ClearBlade Edge
    • Start-up Command - A command or shell script that will be executed to start the adapter on a ClearBlade Edge
    • Stop Command - A command or shell script that will be run to stop the adapter on a ClearBlade Edge
    • Status Command - A command or shell script that will be run to determine the status of the adapter on a specific ClearBlade Edge
    • Undeploy Command - A command or shell script that will be run to uninstall the adapter from a ClearBlade Edge
    • Logs Command - A command or shell script that will be used to retrieve any logs printed out by the adapter while it is executing
  6. Select the updated file and click Open

  7. Click Update Adapter

Delete Adapter

Deleting an adapter is also very simple. Follow steps 1-2 above, and then click on Delete Adapter. Tap “Confirm” in the dialog that appears.

Heads Up!

You must UNDEPLOY the adapter from all Edges prior to deleting it

Deploy Adapter

In order to be able to manage and administrate adapters using the ClearBlade Platform developers console, the adapter must be deployed to a gateway device running the ClearBlade Edge.

  1. Navigate to the “Adapters” tab on the sidebar or menu of the developers console

  2. Click on the name of the adapter you wish to deploy
  3. Select the checkbox (or select multiple checkboxes) of the Edge you wish to deploy the adapter to
  4. Click the Deploy to Selected Edges button
  5. A message indicating whether or not the adapter was deployed will be displayed

Note

Once an adapter is deployed, you will need to start the adapter. It will not be automatically started.

Undeploy Adapter

There are two methods that can be utilized to undeploy an adapter from an Edge.

To undeploy an adapter from a single Edge, see start

To undeploy an adapter from 1 or more Edges: 1. Navigate to the “Adapters” tab on the sidebar or menu of the developers console

2. Click on the name of the adapter you wish to undeploy 3. Select the checkbox (or select multiple checkboxes) of the Edge you wish to undeploy the adapter from
4. Click the Delete from Selected Edges button 5. A message indicating whether or not the adapter was undeployed will be displayed

Start Adapter

start

Stop Adapter

start

Reload/Restart Adapter

start