Skip to main content
PRODUCTION DEPLOYMENT

Windows Service Deployment

Deploy CPU Agents as a Windows Service for production use with automatic startup, enterprise authentication, and secure secrets management.

Prerequisites

.NET 8.0 SDK or later
Download from dotnet.microsoft.com
Windows Server 2019+ or Windows 10+
Required for Windows Service and Credential Manager features
Azure DevOps Organization & Project
Active Azure DevOps project with API access enabled
Azure Key Vault (Optional)
Recommended for enterprise deployment with certificate-based authentication

Installation Steps

1

Clone Repository

git clone https://github.com/Lev0n82/CPU-Agents-for-SDLC.git
cd CPU-Agents-for-SDLC/src/Phase3.AzureDevOps
2

Restore Dependencies

dotnet restore
3

Configure Settings

Create appsettings.json in the project root:

{
  "AzureDevOps": {
    "OrganizationUrl": "https://dev.azure.com/your-org",
    "ProjectName": "YourProject"
  },
  "Authentication": {
    "Method": "Certificate",
    "Certificate": {
      "TenantId": "your-tenant-id",
      "ClientId": "your-client-id",
      "Thumbprint": "certificate-thumbprint"
    }
  },
  "Secrets": {
    "Provider": "AzureKeyVault",
    "KeyVault": {
      "VaultUri": "https://your-vault.vault.azure.net/"
    }
  },
  "Concurrency": {
    "ClaimDurationMinutes": 15,
    "StaleClaimCheckIntervalMinutes": 5
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning"
    }
  }
}
4

Build Application

dotnet build --configuration Release
5

Run Tests

dotnet test
6

Publish Application

dotnet publish --configuration Release --output ./publish
7

Deploy as Windows Service

Open Command Prompt or PowerShell as Administrator:

sc create "CPUAgentsPhase3" binPath="C:\Path\To\publish\Phase3.AzureDevOps.exe"
sc description "CPUAgentsPhase3" "Autonomous AI agents for Azure DevOps SDLC automation"
sc start "CPUAgentsPhase3"
Note: Replace C:\\Path\\To\\publish with your actual publish directory path.

Security Hardening

1. Certificate-Based Authentication

Recommended for production environments:

  • Use X.509 certificates instead of Personal Access Tokens (PATs)
  • Store certificates in Windows Certificate Store with private key protection
  • Use managed identity in Azure environments for automatic credential rotation

2. Secrets Management

Use Azure Key Vault for production:

  • Never store secrets in configuration files or source control
  • Use managed identity for Key Vault access (no credentials needed)
  • Enable Key Vault auditing and access policies for compliance

3. Network Security

Configure firewall rules and proxy settings:

{
  "Network": {
    "AllowedIpRanges": [
      "10.0.0.0/8",
      "172.16.0.0/12"
    ],
    "Proxy": {
      "Enabled": true,
      "Url": "http://proxy.company.com:8080",
      "BypassSSLInspection": true
    }
  }
}

Service Management

Check Service Status

sc query "CPUAgentsPhase3"

Stop Service

sc stop "CPUAgentsPhase3"

Start Service

sc start "CPUAgentsPhase3"

Configure Auto-Start

sc config "CPUAgentsPhase3" start=auto

View Service Logs

Logs are written to:

%LOCALAPPDATA%\AutonomousAgent\Logs\

Uninstall Service

sc stop "CPUAgentsPhase3"
sc delete "CPUAgentsPhase3"