This article describes general app deployment with App Studio.

Fusion Webapps service

Deploy App Studio gives you an embedded instance of App Studio in each of your Fusion instances.
This article describes how to deploy App Studio in Fusion 5.
Starting in Fusion 5.11.0, Fusion has deprecated the Webapps service. As of Fusion 5.11.0, you should instead deploy App Studio manually.
In Fusion 5.x, the default FUSION_PORT value is 6764.
  1. Create UI (create a new App Studio project)
    curl -v -u USERNAME:PASSWORD -H 'Content-type: application/json' -X POST 'https://FUSION_HOST:FUSION_PORT/api/apps/APP_NAME/webapps' -d '{"id": "UI_ID","name": "UI_NAME","contextPath": "/UI_CONTEXT"}'
    
    
  2. Execute the command ./app-studio package to generate the app-studio-enterprise.war file. The file is created in the following location: /<$Application>/dist/app-studio-enterprise.war
  3. Deploy WAR (upload to webapps service)
    curl -v -u USERNAME:PASSWORD -X PUT -H 'Content-type: application/zip' 'https://FUSION_HOST:FUSION_PORT/api/apps/APP_NAME/webapps/UI_ID/war' --data-binary @app-studio-enterprise.war
    
  4. Go to https://FUSION_HOST:FUSION_PORT/webapps/UI_CONTEXT/.

Standalone deployments

  • Deploy an App in a Servlet Container
    Package your search app in a Java WAR file, which can be deployed in a servlet container such as Tomcat or Jetty. This is the most common way to deploy a search app.
  • Deploy a Standalone App
    Package your search app in a Java JAR file that also contains an embedded Tomcat web server. The app is ready to deploy in a production environment. It is not necessary to build a WAR file and deploy that in a servlet container or application server.
  • Deploy a Standalone App
    Package your search app in a Java JAR file. You can run the app with the Java launcher.
The most common way to deploy an App Studio search application is to package it as a standard Java .war file, which can be deployed in any standard servlet container such as Tomcat or Jetty.

Create a WAR file

Create a WAR file suitable for deployment in a servlet container. Do either of the following:
  • Use a script - Run the script app-studio (on Unix or MacOS) or app-studio.bat (on Windows) with the parameter package to create the WAR file.
  • Download the WAR file from Fusion - If you created the search interface in Fusion, you can download the WAR file from Fusion.

Deploy the WAR file

Deploy the WAR file in the servlet container. Follow the instructions in the documentation for the servlet container.
There are two ways to deploy a standalone App Studio search interface:

Embedded Tomcat web server

Package your app as a standalone app for deployment to a production server. The standalone app embeds an Apache Tomcat servlet container.Unix or MacOS:
./app-studio dist
Windows:
app-studio.bat dist

Standalone app directory

Unix or MacOS:The standalone app for deployment is in the _app-name_/search-app-standalone directory.
search-app-standalone/
    README.md
    app/
    build/
    config/
    keystore.jks
    lib
    search-app-start.bat
    search-app-stop.bat
    search-app-stop.ps1
    search-app.sh
Windows:The standalone app for deployment is in the _app-name_\search-app-standalone directory.
search-app-standalone\
    README.md
    app\
    build\
    config\
    keystore.jks
    lib
    search-app-start.bat
    search-app-stop.bat
    search-app-stop.ps1
    search-app.sh
The search-app-project.zip is a snapshot of your project at the time you compiled the application.

Executable Java JAR file

In this deployment type, your search interface runs within the Java runtime environment (JRE).A downloaded project comes with an app-studio script that creates a JAR file.How to create the JAR file
  1. In a shell window, switch to your project directory:
    cd /path/to/project-directory
    
  2. Create the JAR file: Unix and MacOS:
    ./app-studio package
    
    Windows:
    app-studio.bat package
    
The script creates the executable JAR file in the dist directory of your project:
search-app-latest.x.jar

Running an executable JAR file

java -jar search-app-latest.x.jar
There are two ways to deploy a standalone App Studio search interface:

Embedded Tomcat web server

Package your app as a standalone app for deployment to a production server. The standalone app embeds an Apache Tomcat servlet container.Unix or MacOS:
./app-studio dist
Windows:
app-studio.bat dist

Standalone app directory

Unix or MacOS:The standalone app for deployment is in the _app-name_/search-app-standalone directory.
search-app-standalone/
    README.md
    app/
    build/
    config/
    keystore.jks
    lib
    search-app-start.bat
    search-app-stop.bat
    search-app-stop.ps1
    search-app.sh
Windows:The standalone app for deployment is in the _app-name_\search-app-standalone directory.
search-app-standalone\
    README.md
    app\
    build\
    config\
    keystore.jks
    lib
    search-app-start.bat
    search-app-stop.bat
    search-app-stop.ps1
    search-app.sh
The search-app-project.zip is a snapshot of your project at the time you compiled the application.

Executable Java JAR file

In this deployment type, your search interface runs within the Java runtime environment (JRE).A downloaded project comes with an app-studio script that creates a JAR file.How to create the JAR file
  1. In a shell window, switch to your project directory:
    cd /path/to/project-directory
    
  2. Create the JAR file: Unix and MacOS:
    ./app-studio package
    
    Windows:
    app-studio.bat package
    
The script creates the executable JAR file in the dist directory of your project:
search-app-latest.x.jar

Running an executable JAR file

java -jar search-app-latest.x.jar