Deploy a custom blade

Once you’ve deployed the Caplin Platform components you can deploy your custom blades. Here’s how to do this…​

For the sake of example, we assume here that you’re deploying a new Adapter blade called MyAdapterBlade, but these instructions also apply to the other types of blade.

First make sure you’ve packed your blade into a kit; see How Can I…​ Package a custom blade.

Before running any Deployment Framework (DFW) command that configures the framework, use the DFW stop command to stop all running core components and adapters. DFW commands that configure the framework include: deploy, activate, deactivate, redeploy, rollback, delete, erase, hosts, and java.

Deploy the blade kit

In the following steps you’ll be using the dfw command of the Deployment Framework. Before entering any dfw command as ./dfw <command-name>, make sure your current (working) directory is set to the Deployment Framework’s topmost directory. For a list of dfw commands, click here.

Remove any old versions of the blade

Before deploying the new version of a blade, remove the files belonging to the previous version on all the server machines in your system: ./dfw delete MyAdapterBlade

If your blade is brand new but you’ve got development versions of it on various machines, delete the development versions from the machines where you want to deploy the finished blade.

Deploy the kit

You should deploy the new blade kit to every server machine in your target system.

  1. Copy the kit to the Deployment Framework’s kits directory on the target machines.

    Example
    cp /software/test_kits/MyAdapterBlade-1.0.0.zip ./kits
  2. Run the deploy command on each target machine:

    ./dfw deploy

The dfw deploy command performs the following actions:

  • Stops any Caplin Platform binaries that are running on the server

  • Unpacks (unzips) the blade kit

  • Moves the kit’s zip file to the kits/archive directory

  • Activates the unpacked blade (but it doesn’t activate any built-in blades that are by default deactivated - it only activates the blade that you supplied in kit form)

The deploy command doesn’t start any of the Caplin Platform components (including the new blade if it’s an Adapter blade).

To ensure that old kit files don’t take up too much space on your serve machines, periodically check and clean out the Deployment Framework’s kits/archive directory.

Check the blade has been deployed

Enter the command: ./dfw versions

The output from this command lists the Deployment Framework version, the versions of the deployed components and blades, and the status of the blades. For example:

Deployment Framework           6.0.4-268982

   Core components                Version
   -----------------------------------------------------------
   Liberator                      6.0.5-268662
   Transformer                    6.0.4-268662

   Deployed blades                Version            State
   -----------------------------------------------------------
   MyAdapterBlade                 1.0.0              Active

   Built-in blades                                   State
   -----------------------------------------------------------
   BlotterExport                                     Inactive
   DemoDataSource                                    Inactive
   DirectConnection                                  Active
   HTTP                                              Active
   HTTPS                                             Inactive
   JavaOpenPermissioning                             Inactive
   LiberatorJMX                                      Inactive
   LiberatorWebsite                                  Active
   MinimalLiberatorWebsite                           Inactive
   OpenPermissioning                                 Active
   ServerIdentification                              Active
   TransformerJMX                                    Inactive

You can also find out which components are running, by entering the command: ./dfw status

At this stage, nothing is running, because we haven’t started the components and blades:

Liberator                      Not running
Transformer                    Not running

Deployed Adapter blades        Status             Process ID
-------------------------------------------------------------
MyAdapterBlade                 Not running

Change server hostnames

If the blade is an Adapter blade, on each server machine in your system, set up the hostname of the server machine or machines where you want the Integration Adapter to run. If failover isn’t configured, this is the only machine on which the Adapter runs. If failover is configured(see How can I…​ Set up server failover capability), it’s the machine where the primary instance of the Adapter runs, and then you also need to specify the hostname where the Adapter’s secondary instance runs.

For a detailed guide on how to set up the blade’s server hostnames, including when failover has been configuered, see the Change server hostnames section of Change server-specific configuration.

Start the Deployment Framework

Now on each of your server machines, you can start the Deployment Framework : ./dfw start

The Framework will determine from the blade’s hostname settings whether it needs to start up the blade’s executable file(s) on this machine.


See also: