Based on your Bosgame P4 (Ryzen 7, 32GB RAM, 1TB storage) and the DDEC application requirements:
| Resource | Minimum | Recommended | Notes |
|---|---|---|---|
| vCPUs | 2 | 4 | Ryzen 7 has 8 cores, allocate 4 for DDEC |
| RAM | 4 GB | 8 GB | Application uses 1-2GB, leaves room for OS and caching |
| Disk | 40 GB | 60 GB | Application ~500MB, plus logs, temp files, and growth |
| Network | Bridge | Bridge | Direct access from Windows host |
| Component | Memory Usage |
|---|---|
| Ubuntu 22.04 LTS | ~1 GB |
| Java 17 JVM (DDEC) | 1-2 GB |
| ActiveMQ (embedded) | ~100 MB |
| Build tools (Maven) | ~500 MB during builds |
| Total | 3-4 GB typical |
ddec-server, Start at boot = Yesddec with strong password# Update system
sudo apt update && sudo apt upgrade -y
# Install essential tools
sudo apt install -y curl wget git unzip net-tools
# Set timezone
sudo timedatectl set-timezone America/Detroit
# Install OpenJDK 17
sudo apt install -y openjdk-17-jdk
# Verify installation
java -version
# Should show: openjdk version "17.0.x"
# Set JAVA_HOME
echo 'export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64' >> ~/.bashrc
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
# Verify JAVA_HOME
echo $JAVA_HOME
# Install Maven
sudo apt install -y maven
# Verify installation
mvn -version
# Should show: Apache Maven 3.6.3 or higher
# Alternative: Install latest Maven manually
cd /opt
sudo wget https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
sudo tar xzf apache-maven-3.9.6-bin.tar.gz
sudo ln -s /opt/apache-maven-3.9.6/bin/mvn /usr/local/bin/mvn
The EngineeringController uses a native C library for PKWARE DCL Implode compression:
# Create library directory
sudo mkdir -p /opt/app/clib
# Note: The XCompress.so library must be obtained from the original deployment
# or compiled from source. Place it in /opt/app/clib/
# Set library path
echo 'export LD_LIBRARY_PATH=/opt/app/clib:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
# Create directories
sudo mkdir -p /opt/ddec/{app,data,logs,scripts}
sudo mkdir -p /opt/qte/{data/r24at,scripts/batch/drs}
sudo chown -R ddec:ddec /opt/ddec /opt/qte
From your Windows machine (using PowerShell):
# Copy source code to VM
scp -r D:\source\repos\ddec\src ddec@<VM_IP>:/opt/ddec/
Or on the VM:
# Clone from git if available, or use SCP/SFTP to transfer
cd /opt/ddec
# Files should be at: /opt/ddec/src/ddec-qre and /opt/ddec/src/ddec-web
cd /opt/ddec/src
# Build QRE Framework (required first)
cd ddec-qre/qre2-parent
mvn clean install -DskipTests
cd ../qre2-mvs-parent
mvn clean install -DskipTests
# Build DDEC Web Application
cd ../../ddec-web
mvn clean package -Pweb -DskipTests
# Verify WAR file created
ls -la target/ddec-web-*.war
Create production configuration file:
# Create config directory
mkdir -p /opt/ddec/config
# Create production properties file
cat > /opt/ddec/config/ddec-prod.properties << 'EOF'
# Database Configuration (SQL Server)
qre.data.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
qre.data.url=jdbc:sqlserver://<SQL_SERVER_IP>;databaseName=DDEC;trustServerCertificate=true;sendStringParametersAsUnicode=false
qre.data.username=DDEC_APPL
qre.data.password=<YOUR_PASSWORD>
qre.data.schema.application=DDEC
# SFTP Configuration (for batch jobs)
ddec.file-server.sftp-host=<BATCH_SERVER_IP>
ddec.file-server.sftp-account=ddec
ddec.file-server.sftp-password=<SFTP_PASSWORD>
# Server Configuration
server.address=0.0.0.0
server.port=8080
EOF
sudo cat > /etc/systemd/system/ddec.service << 'EOF'
[Unit]
Description=DDEC Web Application
After=network.target
[Service]
Type=simple
User=ddec
Group=ddec
WorkingDirectory=/opt/ddec/app
ExecStart=/usr/bin/java \
-Djava.net.preferIPv4Stack=true \
-Xms1024m -Xmx2048m \
--add-opens=java.base/java.io=ALL-UNNAMED \
--add-opens=java.base/java.lang=ALL-UNNAMED \
--add-opens=java.base/java.net=ALL-UNNAMED \
-jar /opt/ddec/src/ddec-web/target/ddec-web-1.0.1-SNAPSHOT.war \
--spring.profiles.active=web,prod \
--spring.config.additional-location=file:/opt/ddec/config/
Restart=on-failure
RestartSec=10
StandardOutput=append:/opt/ddec/logs/ddec.log
StandardError=append:/opt/ddec/logs/ddec-error.log
[Install]
WantedBy=multi-user.target
EOF
# Reload systemd and enable service
sudo systemctl daemon-reload
sudo systemctl enable ddec
sudo systemctl start ddec
# Check status
sudo systemctl status ddec
# View logs
tail -f /opt/ddec/logs/ddec.log
# Allow HTTP (8080) and ActiveMQ (61616)
sudo ufw allow 8080/tcp
sudo ufw allow 61616/tcp
sudo ufw allow 22/tcp # SSH
sudo ufw enable
sudo ufw status
Since you have SQL Server on another VM:
Restore the database backup:
DDEC_MTU_2025_12_26.bak to your SQL Server VMCreate application user:
-- On SQL Server
CREATE LOGIN DDEC_APPL WITH PASSWORD = 'YourSecurePassword';
USE DDEC;
CREATE USER DDEC_APPL FOR LOGIN DDEC_APPL;
ALTER ROLE db_datareader ADD MEMBER DDEC_APPL;
ALTER ROLE db_datawriter ADD MEMBER DDEC_APPL;
/opt/ddec/config/ddec-prod.properties with your SQL Server IP and credentials# Start manually to see output
cd /opt/ddec/src/ddec-web
java -Djava.net.preferIPv4Stack=true \
-jar target/ddec-web-1.0.1-SNAPSHOT.war \
--spring.profiles.active=web,prod \
--spring.config.additional-location=file:/opt/ddec/config/
# Look for: "Started Application in X seconds"
From your Windows browser:
http://<VM_IP>:8080
Login with: admin / admin (or configured Keycloak)
# From VM or any machine with curl
curl -u admin:admin http://<VM_IP>:8080/engineering/ddec/basecal?archiveFileName=test
# Should return 401 or error (validates endpoint is responding)
| Issue | Solution |
|---|---|
| Port already in use | sudo lsof -i :8080 and kill process |
| Database connection failed | Check SQL Server firewall allows 1433 from VM IP |
| OutOfMemoryError | Increase -Xmx in service file |
| Native library not found | Verify XCompress.so in /opt/app/clib and LD_LIBRARY_PATH |
| Log | Location |
|---|---|
| Application | /opt/ddec/logs/ddec.log |
| Systemd | journalctl -u ddec -f |
| Spring Boot | /opt/ddec/src/ddec-web/logs/ |
For production authentication, you'll need Keycloak:
# On same VM or separate VM
# Download Keycloak
cd /opt
wget https://github.com/keycloak/keycloak/releases/download/20.0.3/keycloak-20.0.3.tar.gz
tar xzf keycloak-20.0.3.tar.gz
# Start in dev mode (for testing)
cd keycloak-20.0.3
bin/kc.sh start-dev
# Access at http://<VM_IP>:8443
Restore the Keycloak database backup (DDEC-KEYCLOAK.bak) for pre-configured realms and clients.
# Install monitoring tools
sudo apt install -y htop iotop
# Monitor Java process
htop -p $(pgrep -f ddec-web)
# Check disk usage
df -h /opt/ddec
# Check memory
free -h