Web Applications¶
To install a web application you need:
- Web application stated in the model
- Nginx (and SeaCat Auth)
- Respective web application file in the Library
Model¶
Use webapps section to state which web applications should be installed. Choose nginx location where each web app is served.
Example of /Site/model.yaml
define:
  type: rc/model
services:
  zoonavigator:
    instances:
      1:
        node: "lmc01"
  nginx:
    instances:
      1:
        node: "lmc01"
  mongo:
    instances:
      1:
        node: "lmc01"
  seacat-auth:
    instances:
      1:
        node: "lmc01"
applications:
  - name: "ASAB Maestro"
    version: v23.47
params:
  PUBLIC_URL: "https://maestro.logman.io"
webapps:
  /: LogMan.io WebUI
  /auth: SeaCat Auth WebUI
Dependencies¶
The web apps can be only served from a proxy server Nginx.
Make sure your public URL in the params section in your model is correct.
Most of the web applications require authorization server. To run LogMan.io web UI successfully, install also SeaCat Auth and Mongo as its dependency.
Web Application file¶
The web app declaration contains the distribution point, Nginx specification and list of the web apps.
- Choose between mfeandspa
- Choose server ("https", "http", "internal")
- Specify nginx location where to serve the web application
- Specify the name of the web application
Note
mfe stands for "micro-frontend" application. LogMan.io Web UI consist of many microfrontend applications.
spa stands for "single-packed" application.
Version of each application is stated in the version file. Applications not listed in the version files are used in their latest version.
Web application descriptor for MFE¶
define:
  type: rc/webapp
  name: TeskaLabs LogMan.io WebUI
  url: https://teskalabs.com
webapp:
  distribution: https://asabwebui.z16.web.core.windows.net/
mfe:
  https:
    /: lmio_webui
    /asab_config_webui: asab_config_webui
    /asab_library_webui: asab_library_webui
    /asab_maestro_webui: asab_maestro_webui
    /asab_tools_webui: asab_tools_webui
    /bs_query_webui: bs_query_webui
    /lmio_analysis_webui: lmio_analysis_webui
    /lmio_lookup_webui: lmio_lookup_webui
The section webapp and the key distribution specifies the base URL from which the application is distributed.
The section mfe contains the specification of the server (https, http or internal) to which the installation will be performed.
Inside of the server, there is a dictionary of the location "subpath" (/) and the MFE component name (lmio_webui).
One location should be /, it is the entry point into the MFE application.
Web application descriptor for SPA¶
define:
  type: rc/webapp
  name: TeskaLabs SeaCat Auth WebUI
  url: https://teskalabs.com
webapp:
  distribution: https://asabwebui.z16.web.core.windows.net/
spa:
  https: seacat-auth
The section webapp and the key distribution specifies the base URL from which the application is distributed.
The section spa contains the specification of the server (https, http or internal) to which the installation will be performed.
The value  seacat-auth specifies the name of (singular) SPA component to be installed.
Versioning¶
Versions of web application components are specified in the respective /Site/<application name>/Versions/v<application version>.yaml file:
define:
  type: rc/version
  product: ASAB Maestro
  version: v23.32
versions:
  ...
  webapp seacat-auth: 'v23.13-beta'
  webapp lmio_webui: 'v23.43'
The web application has a prefix webapp with the trailing space.
If the version is not specified, the "master" version is assumed.
This file provides the compatible version combination of the web application components and respective microservices.
Running web application distribution sherpa manually¶
You may need to execute the web application distribution sherpa manually ie to upgrade to a recent version of the web application.
This is how it is done:
$ cd /opt/site
$ ./gov.sh compose up nginx-1-webapp-dist
[+] Running 1/1
 ✔ Container nginx-1-webapp-dist  Created         0.1s
Attaching to nginx-1-webapp-dist
nginx-1-webapp-dist  | Installing lmio_webui (mfe) ...
nginx-1-webapp-dist  | lmio_webui already installed and up-to-date.
nginx-1-webapp-dist  | Installing asab_config_webui (mfe) ...
nginx-1-webapp-dist  | asab_config_webui already installed and up-to-date.
nginx-1-webapp-dist  | Installing asab_maestro_webui (mfe) ...
nginx-1-webapp-dist  | asab_maestro_webui already installed and up-to-date.
nginx-1-webapp-dist  | Installing asab_tools_webui (mfe) ...
nginx-1-webapp-dist  | asab_tools_webui already installed and up-to-date.
nginx-1-webapp-dist  | Installing bs_query_webui (mfe) ...
nginx-1-webapp-dist  | bs_query_webui already installed and up-to-date.
nginx-1-webapp-dist  | Installing lmio_analysis_webui (mfe) ...
nginx-1-webapp-dist  | lmio_analysis_webui already installed and up-to-date.
nginx-1-webapp-dist  | Installing lmio_lookup_webui (mfe) ...
nginx-1-webapp-dist  | lmio_lookup_webui already installed and up-to-date.
nginx-1-webapp-dist  | Installing lmio_observability_webui (mfe) ...
nginx-1-webapp-dist  | lmio_observability_webui already installed and up-to-date.
nginx-1-webapp-dist  | Installing lmio_parser_builder_webui (mfe) ...
nginx-1-webapp-dist  | lmio_parser_builder_webui already installed and up-to-date.
nginx-1-webapp-dist  | Installing seacat-auth (spa) ...
nginx-1-webapp-dist  | seacat-auth already installed and up-to-date.
nginx-1-webapp-dist exited with code 0
$