Product Selector

Fusion 5.12
    Fusion 5.12

    Deploy a Search App in Fusion's Webapps Service (4.2)

    You can use App Studio to deploy a search app in Fusion Server. You develop your search interface, and then publish the search app to Fusion’s Webapps service.

    Simplified instructions can be found in Deploy App Studio.
    This deployment type leverages your existing production environment, requiring no dedicated nodes for App Studio. However, you might need to deploy additional Fusion nodes if you anticipate significant traffic to your search interface.

    UI deployment overview

    Fusion webapp deployment

    Here is an overview of the steps:

    1. Develop your search interface.

    2. Publish your UI to Fusion Server using the instructions below.

    Your webapp then becomes accessible at http://localhost:8764/webapps/<project-name>.

    Publishing a search interface to Fusion Server

    These steps publish your search interface to a Fusion instance (and its cluster) where the App Studio project already exists.

    1. In the Fusion workspace, navigate to App Studio and select your search interface.

      App Studio menu

      The configuration panel appears.

    2. Next to Publish Status, click the toggle:

      Publish Status

    3. Click Save.

      The interface is only published after you click Save, which also enables the View Published UI button.

    4. Click View Published UI to launch a new window where you can view the interface as an end user.

      Your published interface is available at http://localhost:8764/webapps/<project-name>#/search.

    Migrating a search interface to other Fusion hosts

    If you have published your search interface on one Fusion Host in a cluster, then it is published throughout the cluster.

    There are two ways to migrate a search interface to a different Fusion cluster:

    Export and import the Fusion app Download and upload the WAR (.war) file

    This migrates all objects in the Fusion app, such as datasources, query profiles, schedules, and so on, in addition to the search interface.

    The search interface will be editable on the target hosts.

    This migrates only the search interface. The search interface will not be editable on the target hosts.

    If you are uploading the file into a Fusion app other than the one in which it was created, the new Fusion app must include a query profile and data fields whose names are identical to the ones already configured in the search interface.

    For instructions on downloading or building a WAR file and uploading it to Fusion, see below.

    Download or build a WAR file

    You can distribute a search interface as a WAR (.war) file.

    You can download a WAR file from the Fusion UI or create one from a downloaded project.

    Downloading a WAR file

    1. In the Fusion workspace, navigate to App Studio and select your search interface.

      App Studio menu

      The configuration panel appears.

    2. Click Download war:

      Download WAR file

    Building a WAR file

    A downloaded project comes with the scripts app-studio (for Unix) and app-studio.bat (for Windows) that create WAR files.

    How to build a WAR file

    Unix and MacOS:

    1. In a shell window, switch to your project directory:

      cd /path/to/project-directory
    2. Create application files:

      ./app-studio package

    Windows:

    1. In a terminal window, switch to your project directory:

      cd \path\to\project-directory
    2. Create application files:

      app-studio.bat package

    Application files created:

    The script creates the following files in the dist directory of your project:

    • search-app-latest.x.jar

      This is a executable Java JAR file file.

    • search-app-project.zip

      Use this file to share your project with other search interface developers.

    • search-app.war

      You can upload this file to Fusion to deploy it. See the Deployment.

    Upload the WAR file

    You can upload the WAR file through the Fusion UI or the REST API.

    Uploading with the Fusion UI

    You can upload your project (as a WAR file) in the App Studio configuration panel.

    If you upload the file into a Fusion app other than the one in which it was created, the new Fusion app must include a query profile and data fields whose names are identical to the ones already configured in the search interface.
    1. From the App Studio menu, select your project:

      App Studio menu

      The project configuration panel appears.

    2. Click Upload.

      Upload project

      Fusion prompts you to confirm that you want to upload a project that will delete the existing one.

    3. Click Yes, continue.

    4. Navigate to your WAR file and select it.

      After the upload is complete, you can edit or publish the uploaded project.

    Uploading with the REST API

    Use the webapps/{id}/war endpoint of the Webapps API to upload a WAR file, as in this example:

    curl -u USERNAME:PASSWORD -X PUT http://localhost:8764/api/webapps/Movie_Search/war -F 'file=@movies.war'

    Running a dedicated node for a search interface

    When deploying Fusion nodes dedicated to serving one or more search interfaces, only the following Fusion services need to run:

    • agent

    • api

    • log-shipper

    • webapps

    When starting a dedicated node, you can minimize the number of running services by starting it like this.

    Unix and MacOS:

    cd fusion/latest.x/bin
    ./agent start
    ./api start
    ./log-shipper start
    ./webapps start

    Windows:

    cd fusion\latest.x\bin
    agent.cmd start
    api.cmd start
    log-shipper.cmd start
    webapps.cmd start