Deploying Milestone AI Bridge (docker compose)
To deploy Milestone AI Bridge using docker compose, you must retrieve Milestone AI Bridge images and then deploy the Milestone AI Bridge.
When you have deployed Milestone AI Bridge, you can check the deployment status to see how the deployment has progressed.
As an option, you can also use Lazydocker to monitor the status of the deployment.
Retrieve Milestone AI Bridge containers
To retrieve the Milestone AI Bridge container images, navigate to the folder containing the docker-compose.yml file and open a terminal on the host running docker compose and run the following command: docker compose --parallel 1 pull
If the command executes successfully, results similar to the example below will be displayed in the terminal. The output for pulling the individual layers is not displayed.
[+] Running 10/10
⠿ aibridge-streaming Pulled
⠿ aibridge-kafka-broker Pulled
⠿ aibridge-init Pulled
⠿ aibridge-health Pulled
⠿ aibridge-fuseki Pulled
⠿ aibridge-connector Pulled
⠿ aibridge-broker Pulled
⠿ aibridge-proxy Pulled
⠿ aibridge-kafka-zookeeper Pulled
⠿ aibridge-webservice Pulled
Deploy the Milestone AI Bridge
When you have pulled the resources, you can deploy the Milestone AI Bridge by opening a terminal on the host running Docker Compose and running the following command (replacing the values in the brackets <...> with your actual values).
EXTERNAL_IP=<ip-address-of-aibridge> \
EXTERNAL_HOSTNAME=<hostname-of-aibridge> \
VMS_URL=<url-of-xprotect-management-server> \
VMS_USER=<user-name-of-basic-user-in-xprotect> \
VMS_PASS=<password-of-basic-user-in-xprotect> \
MASTER_KEY=<Master key used to encrypt VMS sensitive info> \
docker compose --parallel 1 up -d
Here, the default values of the EXTERNAL_IP, EXTERNAL_HOSTNAME, VMS_URL, VMS_USER and VMS_PASS variables in the .env file are overridden by the values in the command lines.
When the command executes successfully, results similar to the output below will be displayed in the terminal.
[+] Running 11/11
⠿ Network default Created
⠿ Container aibridge-fuseki-1 Started
⠿ Container aibridge-kafka-zookeeper-1 Started
⠿ Container aibridge-init-1 Started
⠿ Container aibridge-health-1 Started
⠿ Container aibridge-kafka-broker-1 Started
⠿ Container aibridge-connector-1 Started
⠿ Container aibridge-proxy-1 Started
⠿ Container aibridge-streaming-1 Started
⠿ Container aibridge-webservice-1 Started
⠿ Container aibridge-broker-1 Started
Debug mode
The docker compose --parallel 1 up -d command uses the docker-compose.yml file to run Milestone AI Bridge in debug mode. When running in debug mode, all the services are exposed on the host running docker compose directly.
If you want to run Milestone AI Bridge in production mode, see Deploying in a production environment (docker compose).
Check deployment status
After you have set the values of the variables, you can check the status of the deployment by opening a terminal on the host running Docker Compose and running the following command: docker compose ps.
This command will list each of the containers and their status.
You can monitor the init container to see that it stops, although the init container should stop within a minute or two with an exit value of 0, as displayed below. If the init container does not stop, investigate the init log files for a potential root cause.
NAME | COMMAND | SERVICE | STATUS |
aibridge-broker-1 |
"./broker-brokersa…" |
aibridge-broker | running |
aibridge-connector-1 |
"./connector-broker…" | aibridge-connector | running |
aibridge-fuseki-1 |
"./entrypoint.sh--u…" | aibridge-fuseki | running |
aibridge-health-1 |
"./health-port-numb…" | aibridge-health | running |
aibridge-init-1 |
"./init-ontology-fi…" | aibridge-init | exited(0) |
aibridge-kafka-broker-1 |
"start-kafka.sh" | aibridge-kafka-broker | running |
aibridge-kafka-zookeeper-1 |
"/bin/sh-c'/usr/sb…" | aibridge-kafka-zookeeper | running |
aibridge-proxy-1 |
"./proxy-sparql-que…" | aibridge-proxy | running |
aibridge-streaming-1 |
"./streaming-rtsp-p…" | aibridge-streaming | running |
aibridge-webservice-1 | "nodeapp--document…" | aibridge-webservice | running |
Using LazyDocker
You can also run lazydocker from the folder containing the docker-compose.yml file to open a user interface that will help you to monitor the status of the deployment. Lazydocker is an open-source terminal interface for managing Docker environments and enables you to inspect Docker objects without using terminal commands.
In the Lazydocker user interface, you can see the log output of each container, among other things.
The image below is an example of a successfully completed init container's log output.