To access the Control Center, its backend must be running. In addition, to access the Control Center's web interface,
a web server is required to host the Control Center's frontend.
Configuring the Frontend
In the example below, Nginx is used and configured to access the Control Center.
Follow the steps below to configure Nginx to host the Control Center frontend.
Navigate to the Nginx/conf folder and open the nginx.conf configuration file
in a text editor.
Add the following blocks:
http{...server{...#AMT Control Center Frontendlocation/control-center{aliasC:\AMT\AMT-Java\Binaries\control-center-frontend;try-files$uri$uri//index.html=404;}#API requests from the Control Centerlocationcontrol-center/api{rewrite^/control-center(.*)$ $1break;proxy_passhttps://127.0.0.1:9001;}...}
(Change the alias path to point to the Control Center frontend in the AMT environment).
Save the file.
Starting the Back and Frontend
Open PowerShell and run the following command to start the backend:
Open another PowerShell window and run the following command from the Nginx folder to start the
frontend:
nginx start
Running the Control Center through Docker
We will be using Rancher in our examples to manage the Docker container for the Control Center.
To install Rancher, visit the Rancher website and follow their download
instructions.
warning Rancher requires WSL: aka.ms/wslinstall.
info Running the following in PowerShell installs WSL2: wsl --install.
Start Rancher and set runtime to "dockerd (moby)".
Using Kubernetes is optional. Enable Kubernetes if it's required to dynamically scale your deployment. This
can be enabled later in Rancher's preferences.
The container will be a composite of the Control Center backend, frontend (through Nginx), and a system database
(through PostgreSQL).
An image of the Control Center backend and frontend is necessary.
Pulling the AMT Image
Pull the image provided by Avanade using the following command:
docker pull <address>/control-center-server-java
Setting Up the Folder Structure
Set up a folder structure for the Docker container to contain the Docker compose.yaml, configuration
file, and license file.
Simple configuration file for the Control Center. This is a minimal local solution serving as an example, not suited
for production environments.
Note the usage of host.docker.internal instead of localhost.
---name:AMT Control Center Java Configenvironment:DEVnode:host:0.0.0.0restPort:9001systemDatabase:type:POSTGRESsettings:name:amtsystemschema:amtsystemusername:<username>password:<password>driverClassname:org.postgresql.Driverurl:jdbc:postgresql://host.docker.internal:5432/amtsystemhibernateDialect:org.hibernate.dialect.PostgreSQLDialectconnectionPoolSize:200authentication:type:OIDCclients:rest:settings:issuerURL:http://localhost:8080/realms/AMTRealmclientID:AMTreturnUrl:http://localhost:4200/control-center...
Configuring compose.yaml
Simple configuration for the Docker Compose file.
services:# PostgreSQL Databasepostgres:image:postgres:15container_name:amt-postgresenvironment:POSTGRES_DB:amtsystemPOSTGRES_USER:<username>POSTGRES_PASSWORD:<password>ports:-"5432:5432"volumes:-postgres-data:/var/lib/postgresql/datahealthcheck:test:["CMD-SHELL","pg_isready-Upostgres"]interval:10stimeout:5sretries:5# Control Center Backendcontrol-center-backend:image:amt-java/control-center-server-javacontainer_name:amt-control-center-backenddepends_on:postgres:condition:service_healthyports:-"9001:9001"volumes:-./config:/config:roenvironment:-JAVA_OPTS=command:>java-jar /.../control-center-server/control-center-server-pekko.jar-cf /config/cc-config.yaml-lf /config/AmtRuntime.lichealthcheck:test:["CMD","curl","-f","http://localhost:9001/health"]interval:30stimeout:10sretries:3start_period:40s# Control Center Frontendcontrol-center-frontend:image:amt-java/control-center-server-angularcontainer_name:amt-control-center-frontendports:-"4200:80"depends_on:-control-center-backendvolumes:postgres-data:
Starting the Container
With the image pulled and the folder structure set up, run the following command from the folder containing the
compose.yaml file to start the container:
docker compose up -d
To stop the container, run the following command from the same folder: