ORACLE CONFIDENTIAL. For authorized use only. Do not distribute to third parties.
Pre-General Availability: 2025-12-16
Makefile
This guide explains the Makefile targets available for managing the Agent Factory project. The Makefile provides convenient shortcuts for common commands, simplifying the application’s entire lifecycle, from building and deployment to uninstallation.
Configuration Variables
These variables control the behavior of the Makefile targets. You can override their default values directly from the command line.
| Variable | Default Value | Description |
|---|---|---|
PROJECT_NAME |
applied-ai-studio |
The prefix used for naming Podman containers and images. Example Override: make PROJECT_NAME=my-project up |
COMPOSE_FILE_PROD |
podman-compose-prod.yaml |
The source compose file for production deployments. |
COMPOSE_FILE_QUICKSTART |
podman-compose-quickstart.yaml |
The source compose file for quickstart or development deployments. |
COMPOSE_FILE_ACTIVE |
podman-compose.yaml |
The active compose file used by most targets. It is typically created and managed by the deploy.sh script. |
AAI_CONTAINER_NAME |
oracle-applied-ai-label |
The specific container name used by the logsaai and start targets. |
Makefile Targets
Caution: All make commands described below must be executed from the Staging directory of the application.
Targets are commands you can run with make. To execute a target, use the following syntax:
make <target_name>
For example, to start the application, you would run make up.
Summary of Targets
Here is a quick overview of all available targets.
| Category | Target | Description |
|---|---|---|
| Lifecycle | up |
Starts the application by running the main deployment script (deploy.sh). |
deploy |
Deploys the application using the active compose file (podman-compose.yaml). |
|
down |
Stops and removes all application containers. | |
start |
Starts previously stopped containers without recreating them. | |
stop |
Stops running containers without removing them. | |
restart |
Stops and then starts the containers. | |
clean |
Stops containers and removes the main project image. | |
uninstall |
Runs a script to completely uninstall the application. | |
| Build | build |
Builds all required container images via a script. |
buildaai |
Builds only the AAI service image. | |
buildollama |
Builds only the Ollama service image. | |
build26ai |
Builds only the Oracle AI Database 26ai Free image (db26aifree). | |
| Diagnostics | logs |
Tails the logs from all running services. |
logsaai |
Tails the logs from the AAI service container only. | |
diagnose |
Runs a diagnostic script to check the deployment health. |
Detailed Target Descriptions
Application Lifecycle Targets
all
The default target. It simply runs make up to start the application.
make all
up
Starts the entire application stack by executing the deploy.sh script. This script handles the logic for choosing a deployment mode and setting up the environment.
make up
deploy
A lower-level target that runs podman-compose up using the COMPOSE_FILE_ACTIVE (podman-compose.yaml). You typically do not need to run this directly; use make up instead.
down
Stops and removes all containers, networks, and volumes defined in the active compose file. This is a clean way to shut down the application.
Note: This target does not remove the DB schema. It is recommended to use make uninstall for a full cleanup.
make down
start
Starts containers that were previously created but are currently stopped (e.g., after using make stop). It also executes a command to ensure the crond service is running inside the AAI container.
make start
stop
Stops all running containers without removing them. Your data and container state are preserved. Use make start to resume.
make stop
restart
A convenient shortcut that runs make stop followed by make start.
make restart
clean
Performs a partial cleanup. It first runs make down to stop and remove containers, then attempts to remove the main project container image (e.g., applied-ai-studio).
Note: This target does not remove other images like Ollama or the database. For a full cleanup, use make uninstall.
make clean
uninstall
Executes the uninstall.sh script to perform a complete removal of the application. This is the most thorough way to clean your environment.
Warning: This is a destructive operation that may remove all containers, images, and clears the database schema. Please enter Y in order to clean the DB schema.
make uninstall
sh uninstall.sh
Do you want to clear database objects? (Y/N) [default: N]
[N]: Y
Proceeding with the removal of database objects ...
Uninstalling components ...
Database objects removed successfully.
Stopping and removing containers...
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.9.4-rhel
** excluding: set()
podman stop -t 10 oracle-applied-ai-label
WARN[0010] StopSignal SIGTERM failed ot stop container oracle-applied-ai-label in 10 seconds, resorting to SIGKILL
oracle-applied-ai-label
exit code: 0
podman rm oracle-applied-ai-label
oracle-applied-ai-label
exit code: 0
keep set()
['podman', 'volume', 'ls', '--noheading', '--filter', 'label=io.podman.compose.project=applied-ai-studio', '--format', '']
All objects successfully cleaned up.
Uninstallation process completed successfully.
Logs can be found at ./uninstall.log
Image Build Targets
build
Builds all necessary service images by executing the build-image.sh script. This will build the AAI, Ollama, and database images.
make build
buildaai | buildollama | build23ai
Builds a specified service image individually by calling the build-image.sh script with the correct parameter (e.g., aai, ollama, or db23aifree).
# Example: Build only the Oracle AI Database 26ai Free image
make build23ai
Diagnostics and Logging Targets
diagnose
Runs the diagnose.sh script to help troubleshoot common issues with your deployment. This creates a zip that contains logs and configuration details for further analysis.
make diagnose
logs
Streams the logs from all running services defined in the active compose file. Press Ctrl+C to exit.
make logs
logsaai
Streams the logs for only the AAI container (oracle-applied-ai-label) using a direct podman logs command. Press Ctrl+C to exit.
make logsaai