# Quick Start - Ubuntu Deployment

Follow these steps to deploy the Aumentum API on Ubuntu:

```bash
# 1. Run deployment script (as root)
sudo bash scripts/deploy_ubuntu.sh

# 2. Copy application files to /opt/plagis_aumentum
#    (or clone from git)
# Example:
#   sudo git clone <your-repo-url> /opt/plagis_aumentum
#   sudo chown -R plagis:plagis /opt/plagis_aumentum

# 3. Setup Python environment
cd /opt/plagis_aumentum
sudo bash scripts/setup_application.sh

# 4. Mount contentstore
# First create credentials file: sudo nano /root/.smb_credentials_aumentum
# Add: username=Administrator, password=YOURPASS, domain=
# Then: sudo chmod 600 /root/.smb_credentials_aumentum
sudo mount -t cifs //10.10.10.5/LRS_STORAGE /mnt/aumentum_contentstore \
  -o credentials=/root/.smb_credentials_aumentum,uid=$(id -u plagis),gid=$(id -g plagis),file_mode=0755,dir_mode=0755

# 5. Install and start service
sudo cp scripts/plagis-aumentum-api.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable plagis-aumentum-api
sudo systemctl start plagis-aumentum-api

# 6. Verify it's working
curl http://localhost:8001/health
```

## Notes

- Replace `YOURPASS` in step 4 with your actual Windows share password
- The service will automatically restart on failure
- Logs are available at `/var/log/plagis/api.log`
- For persistent mount, add to `/etc/fstab` (see DEPLOYMENT_UBUNTU.md)

## Troubleshooting

```bash
# Check service status
sudo systemctl status plagis-aumentum-api

# View logs
sudo tail -f /var/log/plagis/api.log

# Test database connection
tsql -S MSSQL_LRS43_PROD -U sa -P 'Plagis$registry'
```

