apiManagement backend
Handles the management requests behind the interface and the application’s configuration.
A clear path to your first deployment.
Copy the commands. Check the results. Keep moving.
.sh file, then run bash create_fortiaigate_vpc.sh or bash destroy_fortiaigate_vpc.sh.One t3a.large instance, 150 GiB gp3 storage and one public IPv4 address in us-east-1.
| Resource | Rate | 730-hour month |
|---|---|---|
| EC2 t3a.large | $0.0752/hour | $54.90 |
| 150 GiB gp3 | $0.08/GiB-month | $12.00 |
| 1 public IPv4 | $0.005/hour | $3.65 |
gp3 includes 3,000 IOPS and 125 MiB/s at this storage rate.
Start here, in the AWS console.
aws s3 cp "s3://wrady-fortiaigate-lab/scripts/fortiaigate_launcher.sh" \
"$HOME/fortiaigate_launcher.sh" \
--region us-east-1 --only-show-errors && \
bash "$HOME/fortiaigate_launcher.sh"
Switch from CloudShell to your Ubuntu instance.
/bin/bash <<'FORTI_SCRIPT' || printf 'STOP: block failed.\n' >&2
set -euo pipefail
sudo -n true
cat /etc/os-release
uname -m
nproc
free -h
df -h /
printf 'PASS: host checks completed; review sizing above.\n'
FORTI_SCRIPT
Set up the signed Docker package source.
/bin/bash line and closing FORTI_SCRIPT line.docker.list and docker.sources files are backed up before replacement./bin/bash <<'FORTI_SCRIPT' || printf 'STOP: block failed.\n' >&2
set -euo pipefail
sudo -n true
. /etc/os-release
[ "$ID" = ubuntu ]
[ "$VERSION_ID" = 22.04 ]
[ "$(dpkg --print-architecture)" = amd64 ]
printf 'Repairing Docker repository...\n'
forti_backup=$(sudo mktemp -d /etc/apt/docker-backup.XXXXXX)
for name in docker.list docker.sources; do
path="/etc/apt/sources.list.d/$name"
if [ -f "$path" ]; then sudo mv "$path" "$forti_backup/"; fi
done
sudo apt-get update
sudo env DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=l \
apt-get install -y ca-certificates curl unzip
sudo install -m 0755 -d /etc/apt/keyrings
key=/etc/apt/keyrings/docker.asc
sudo curl -fsSL --retry 3 \
https://download.docker.com/linux/ubuntu/gpg -o "$key"
sudo chmod 0644 "$key"
head -n 1 "$key"
printf '%s\n' \
'Types: deb' \
'URIs: https://download.docker.com/linux/ubuntu' \
'Suites: jammy' \
'Components: stable' \
'Architectures: amd64' \
'Signed-By: /etc/apt/keyrings/docker.asc' \
| sudo tee /etc/apt/sources.list.d/docker.sources >/dev/null
sudo apt-get update
apt-cache policy docker-ce | sed -n '1,8p'
printf 'Source backup: %s\n' "$forti_backup"
printf 'PASS: repository refresh completed.\n'
FORTI_SCRIPT
Install Docker Engine, Buildx and the Compose plugin.
sudo for Docker commands. No Docker group change is required for this workflow./bin/bash <<'FORTI_SCRIPT' || printf 'STOP: block failed.\n' >&2
set -euo pipefail
sudo -n true
printf 'Installing Docker Engine and Compose...\n'
sudo env DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=l \
apt-get install -y docker-ce docker-ce-cli containerd.io \
docker-buildx-plugin docker-compose-plugin
sudo systemctl enable --now docker
sudo docker version
sudo docker compose version
sudo docker run --rm hello-world
sudo systemctl is-active docker
forti_docker_root=$(sudo docker info --format '{{.DockerRootDir}}')
df -h "$forti_docker_root" /opt
printf 'PASS: Docker and Compose checks completed.\n'
FORTI_SCRIPT
Give the Ubuntu host access to the release files.
aws configure or long-lived access keys are needed./bin/bash <<'FORTI_SCRIPT' || printf 'STOP: block failed.\n' >&2
set -euo pipefail
sudo -n true
printf 'Downloading and installing AWS CLI v2...\n'
forti_cli_tmp=$(mktemp -d)
trap 'rm -rf -- "$forti_cli_tmp"' EXIT
curl -fsSL --retry 3 \
https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip \
-o "$forti_cli_tmp/awscliv2.zip"
unzip -q "$forti_cli_tmp/awscliv2.zip" -d "$forti_cli_tmp"
if [ -d /usr/local/aws-cli/v2 ]; then
sudo "$forti_cli_tmp/aws/install" --update
else
sudo "$forti_cli_tmp/aws/install"
fi
/usr/local/bin/aws --version
/usr/local/bin/aws sts get-caller-identity --region us-east-1 --no-cli-pager
printf 'PASS: AWS CLI v2 and EC2 identity verified.\n'
FORTI_SCRIPT
Fetch the CPU images and Deployment Assistant.
forti_source URI before running.Images/ and Installer/ folder names./opt/fortiaigate and checks all seven image TARs. It does not extract the images./bin/bash <<'FORTI_SCRIPT' || printf 'STOP: block failed.\n' >&2
set -euo pipefail
sudo -n true
forti_source=s3://wrady-fortiaigate-lab/FortiAIGate_8.0.2_CPU/
/usr/local/bin/aws s3 ls "$forti_source" --recursive --region us-east-1
sudo install -d -m 0755 -o "$(id -un)" -g "$(id -gn)" /opt/fortiaigate
/usr/local/bin/aws s3 sync "$forti_source" /opt/fortiaigate/ \
--exclude "*" --include "Images/*.tar" --include "Installer/*.tar.gz" \
--region us-east-1
cd /opt/fortiaigate
forti_build=V8.0.2-build0055-FORTINET
for part in api webui llm-gateway guardrail guardrail-scanner \
license_manager logd; do
file="Images/FAIG_$part-$forti_build.tar"
printf 'Checking %s\n' "$file"
test -s "$file"
tar -tf "$file" >/dev/null
done
test -s "Installer/FAIG_deploy-docker-compose-cli-$forti_build.tar.gz"
printf 'PASS: seven CPU images and the installer are present.\n'
FORTI_SCRIPT
.tar contains ready-built FortiAIGate software and its dependencies. Importing it makes the image available to Docker; it does not start the application.Installer/*.tar.gz contains the Deployment Assistant and its user guide. In step 7, you extract and test this assistant.apiManagement backendHandles the management requests behind the interface and the application’s configuration.
webuiBrowser interfaceProvides the screens for setup, policies, monitoring and licensing.
llm-gatewayAI request gatewayHandles requests between your applications and configured model providers, calling guardrails for inspection.
guardrailContent checksCoordinates checks, including CPU regex screening, and sends eligible checks to scanner backends.
guardrail-scannerScanner backendSupplies the backend used by policy-guard. Model-based policy checks remain disabled in this CPU deployment.
license_managerLicensing serviceProvides the licensing services used by the FortiAIGate runtime.
logdActivity loggingHandles application logs so you can review activity and investigate problems.
FAIG_<component>-V8.0.2-build0055-FORTINET.tarReplace <component> with one of the seven names above. All seven files live in Images/.Component roles follow the bundled 8.0.2 Deployment Assistant. More about Docker images ↗
Validate the Deployment Assistant before opening the wizard.
deploy-docker-compose.sh and USER-GUIDE.md from the installer archive./bin/bash <<'FORTI_SCRIPT' || printf 'STOP: block failed.\n' >&2
set -euo pipefail
sudo -n true
cd /opt/fortiaigate/Installer
forti_installer=FAIG_deploy-docker-compose-cli-V8.0.2-build0055-FORTINET.tar.gz
tar -tzf "$forti_installer"
tar -xzf "$forti_installer" deploy-docker-compose.sh USER-GUIDE.md
chmod 755 deploy-docker-compose.sh
bash -n deploy-docker-compose.sh
./deploy-docker-compose.sh --self-test
FORTI_SCRIPT
Software saved in the TAR files you downloaded.
Docker runs an instance of an image as a container.
A tool that reads a configuration and runs the connected services together.
Open the interactive wizard, then import and deploy.
/bin/bash -c '
cd /opt/fortiaigate/Installer &&
exec /bin/bash ./deploy-docker-compose.sh
'
/opt/fortiaigate/Imagesfortiaigatefds1.fortinet.com and Docker Hub for third-party images.Check the running application before onboarding.
logd-api-ready helper that finishes with Exited (0) is normal./bin/bash <<'FORTI_SCRIPT' || printf 'STOP: block failed.\n' >&2
set -euo pipefail
sudo -n true
cd /opt/fortiaigate/Installer/faig_deployment_assistant_data/deployment
sudo ./compose.sh ps -a
forti_http=$(curl -ksS --max-time 15 -o /dev/null -w '%{http_code}' \
https://127.0.0.1/ui)
printf 'WebUI HTTP %s\n' "$forti_http"
test "$forti_http" = 200
printf 'PASS: local WebUI returned HTTP 200.\n'
FORTI_SCRIPT
Complete the initial setup, then verify real requests.
https://<public-ip>/ui. Verify you reached your instance before accepting its self-signed certificate.https://<public-ip>, without /ui..lic file under Settings → License and verify it is Active./bin/bash <<'FORTI_SCRIPT' || printf 'STOP: block failed.\n' >&2
set -euo pipefail
sudo -n true
cd /opt/fortiaigate/Installer/faig_deployment_assistant_data/deployment
sudo ./compose.sh restart api
sudo ./compose.sh ps -a
printf 'PASS: API restart command completed; review status.\n'
FORTI_SCRIPT
Return to CloudShell when you are ready to remove this lab.
aws s3 cp "s3://wrady-fortiaigate-lab/scripts/fortiaigate_launcher.sh" \
"$HOME/fortiaigate_launcher.sh" \
--region us-east-1 --only-show-errors && \
bash "$HOME/fortiaigate_launcher.sh"
/usr/local/bin/aws.