Command Line Install Node

Command Line Deployment

On the Create StreamBase Application Archive page, you created a StreamBase Application archive file named with the pattern *ep-application.zip. This page begins the process of running that application archive application archive file from the command line.

Remember that the node lifecycle steps are to install, then start a node. When done, you stop, then remove the node.

Install a Node

Install the newly created application archive zip file for the deploy_firstapp project into a StreamBase Runtime node as follows:

  • Using a StreamBase Command Prompt on Windows or a configured shell prompt on macOS and Linux, navigate to your Studio workspace folder. For example:

    Windows: cd "\Users\sbuser\Documents\StreamBase Studio 10.3 Workspace"
    macOS:   cd /Users/sbuser/Documents/StreamBase\ Studio\ 10.3\ Workspace
    
  • Navigate to the target subfolder of your StreamBase Application deployment project. For example:

    cd deploy_firstapp/target
    

    Tip

    As a shortcut for the above steps, you can select any EventFlow fragment project in Studio's Project Explorer view, right-click, and from the context menu, select StreamBase>Open Command Prompt Here (Windows) or StreamBase>Open Command Terminal Here (Mac). Then navigate up and over to your deployment project.

    cd ../deploy_firstapp/target
    
  • Run a command like the following. This is a single command, shown here on multiple lines for clarity. On macOS:

    epadmin install node \
      --application=deploy_firsapp-0.0.1-SNAPSHOT-ep-application.zip \
      --nodename=A.sbuser \
      --nodedirectory=/home/sbuser/tmp/Nodedirs
    

    On Windows, you can use forward slashes as above, or use Windows-style backslashes and a drive letter:

      ...
      --nodedirectory=C:\home\sbuser\tmp\Nodedirs
    

    The epadmin arguments can be abbreviated to their shortest unique forms:

    epadmin install node \
      --app=deploy_firsapp-0.0.1-SNAPSHOT-ep-application.zip \
      --nodena=A.sbuser \
      --nodedir=/home/sbuser/tmp/Nodedirs
    
  • Run epadmin display services to make sure your node was installed.

epadmin Parameters

The following parameters are not explicitly required, but are strongly recommended to use with every epadmin install node command:

--application=

The application argument specifies the full or relative path to the StreamBase Application archive file you created on the previous page. This is the zip file that contains your StreamBase Application's archive (not the EventFlow fragment's archive file).

If you fail to specify an application argument at node install time, you install an empty node that cannot be started and run. In this case, you can use a command like the following to upload an application zip file to the installed node:

epadmin --servicename=nodename.clustername upgrade node
   --application=path-to-application-zip-file
--nodename=

The nodename argument specifies a name for the node you are installing, using nodename.clusterName format. Do not re-use any nodename currently in use, including any node name assigned by Studio launches. The cluster name is your system login name by default, but can be any string. The example above specifies a nodename of A.sbuser.

If not specified, the default nodename is hostname.cluster, where hostname is the return from the hostname command, and where the cluster name is the literal string "cluster".

--nodedirectory=

Use the nodedirectory argument to specify a directory into which the StreamBase Runtime can write its memory-mapped files, log files, and other tracking information. Specify a container directory; the Runtime creates a subfolder under the directory you specify. The subfolder created is named the same as the nodename. You can use a full or absolute path to any location. See the node directory page of the Concepts Overview for more information.

If you do not specify a nodedirectory argument, epadmin uses its current directory, and creates a subfolder there.

Refer to the following pages to understand other parameters you can use with the epadmin install node command: