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:
Local Deployment Guide - Deploy a Form.io Enterprise container on a local machine.
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:
Within the Form.io Developer Portal, open the project the UAG will connect to. Create a project if one does not already exist.
Note the Project URL at the top of the page. This will be
PROJECTenvironment variable required later.Click Forms from the left-hand menu of the Developer Portal, open the User Login Form.
Click Embed from the top menu bar. Record the embed URL, this will be the
LOGIN_FORMenvironment variable.Open the project Settings page from the left-hand menu.
Click API Settings on the left side of the Settings panel.
Under the API Keys tab, click + Create Another.
Give the key a descriptive name and click Save. Record the string of characters. This will be the
PROJECT_KEYenvironment 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:
Open the project UAG will connect to in the Developer Portal and open Forms on the left-hand menu.
Click the form name to open it, then click the ... hotdog menu on the top bar.
From the dropdown, select Form Settings.
Scroll down to the Form Tags option and enter UAG in the text field.
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"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:
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.
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?
