Deploying UAG

Creating a running instance of UAG.

The following sections describe the process of creating a running instance of UAG and connecting it to a Form.io Enterprise deployment.

For documentation on deploying UAG and connecting it to a Form.io Open Source, refer to the documentation on GitHub:

Prerequisites

The following instructions assume that Form.io Enterprise has already been deployed. If there is no currently deployed instance of Form.io, refer to the appropriate deployment guide:

Preparing a Project

Deploying a UAG container requires an existing project. Remember that the project context of Form.io means the AI agent will not be able to access forms or resources outside of this project.

Before proceeding:

  1. Within the Form.io Developer Portal, open the project the UAG will connect to. Create a project if one does not already exist.

  2. Note the Project URL at the top of the page. This will be PROJECTenvironment variable required later.

  3. Click Forms from the left-hand menu of the Developer Portal, open the User Login Form.

  4. Click Embed from the top menu bar. Record the embed URL, this will be the LOGIN_FORM environment variable.

  5. Open the project Settings page from the left-hand menu.

  6. Click API Settings on the left side of the Settings panel.

  7. Under the API Keys tab, click + Create Another.

  8. Give the key a descriptive name and click Save. Record the string of characters. This will be the PROJECT_KEY environment variable.

Tag Forms and Resources

UAG will only have access to forms and resources that are tagged UAG. Open each form or resource that should be available to AI agents and apply the necessary tag:

  1. Open the project UAG will connect to in the Developer Portal and open Forms on the left-hand menu.

  2. Click the form name to open it, then click the ... hotdog menu on the top bar.

  3. From the dropdown, select Form Settings.

  4. Scroll down to the Form Tags option and enter UAG in the text field.

  5. Click Save Settings on the form settings page to complete the process.

Repeat these steps for all forms and resources that UAG needs access to.

Create the UAG Container

While the UAG container does not necessarily need to exist on the same host as the rest of the Form.io Platform, most users will choose to do so.

Follow the steps for the appropriate provider to deploy the UAG.

AWS

To begin, open the docker-compose.yml included in the multicontainer.zip created during the initial deployment of Form.io in a text editor.

Add the following to the services section:

  formio-uag:
    image: formio/uag:rc
    restart: always
    links:
      - api-server
    depends_on:
      - api-server
    environment:
      PORT: 3200
      DEBUG: formio.*
      PROJECT: CHANGEME
      PROJECT_KEY: CHANGEME
      JWT_SECRET: CHANGEME
      JWT_EXPIRE_TIME: 525600
      LOGIN_FORM: CHANGEME
      BASE_URL: CHANGEME
      UAG_LICENSE: CHANGEME
    ports:
      - "3200:3200"

Some environment variables may not apply to all deployments.

On the Elastic Beanstalk Console, open the environment on which Form.io is deployed.

Update the Environment Properties table with any environment variable that were not already included.

A reference of of all potentially applicable properties is provided:

Variable
Description
Example

PROJECT

The Project URL previously recorded.

PROJECT_KEY

The Project API Key previously recorded.

CHANGEME

UAG_LICENSE

The license to run the UAG against a Form.io Enterprise Deployment. Contact [email protected] to purchase a license or request a trial.

PORT

The port to run the UAG server on.

3200

DEBUG

Variable used to perform debug logs of server activity

formio.*

PORTAL_SECRET

Allows the UAG to connect to the Form.io Enterprise Portal.

CHANGEME

JWT_SECRET

A secret used to generate and validate JWT tokens generated through the authentication process of the UAG. This does not need to match the JWT_SECRET of the Enterprise Server that it is connected to.

CHANGEME

JWT_EXPIRE_TIME

The expiration for the jwt secret.

3600

MONGO

Allows the UAG to connect directly to a MongoDB database without having to redirect the submissions to the Form.io Submission API.

MONGO_CONFIG

JSON configuration for the Node.js Mongo Driver.

BASE_URL

The public URL that the UAG is hosted on. This allows for proper OIDC authentication and allows for the authentication callbacks to point to the correct url.

LOGIN_FORM

The public URL to the Login Form JSON endpoint.

CORS

The CORS domain, or the JSON configuration to configure the "CORS" node.js module cross domain resource sharing.

.

After saving the modified docker-compose.yml to multicontainer.zip, upload the new .zip and deploy it.

AWS should use the docker compose up command internally when launching the UAG container. This should leave any unmodified containers operational through the process.

Azure

Coming Soon

GCP

Coming Soon

Local

Last updated

Was this helpful?