Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions NANO_SERVER_MIGRATION_ANALYSIS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Windows Nano Server Migration Analysis

## Executive Summary
Moving the Warewolf project to Windows Nano Server Docker instances is currently **not feasible** without a significant re-architecture and rewrite of the application. Windows Nano Server supports only .NET Core (now .NET 5+), whereas Warewolf is built on the .NET Framework 4.8. Additionally, the project relies heavily on technologies that are not available or fully supported in .NET Core/Nano Server, most notably Windows Workflow Foundation (WWF).

## Critical Blockers

### 1. .NET Framework Dependency
The codebase targets `.NET Framework 4.8`. Windows Nano Server images do not include the full .NET Framework; they are designed for .NET Core applications.
* **Impact**: The entire codebase must be ported to .NET 6 or .NET 8. This is not a simple recompile; APIs have changed, and some namespaces have been removed.

### 2. Windows Workflow Foundation (`System.Activities`)
The project heavily utilizes `System.Activities` and inherits from `NativeActivity<T>`.
* **Issue**: Windows Workflow Foundation was not ported to .NET Core. There is an open-source project (CoreWF), but it is not a direct replacement and may lack features used by Warewolf.
* **Impact**: The core workflow execution engine would likely need to be rewritten or heavily adapted to use a different workflow engine compliant with .NET Core.

### 3. COM Interop (`Warewolf.COMIPC`)
The project uses COM Interop (`Warewolf.COMIPC`).
* **Issue**: While .NET Core has COM support, Windows Nano Server has a significantly reduced API surface. Many standard COM components and libraries available in full Windows Server are missing in Nano Server.
* **Impact**: Any COM components relied upon might not exist in the Nano Server environment.

### 4. Legacy Web Technologies (`System.Web`)
References to `System.Web` suggest usage of ASP.NET Web Forms or older HTTP handlers.
* **Issue**: `System.Web` is not available in .NET Core.
* **Impact**: Web components must be rewritten using ASP.NET Core.

### 5. Windows-Specific APIs
* **`System.DirectoryServices`**: Used for Active Directory interaction. While some support exists in .NET Core via compatibility packs, it relies on underlying Windows APIs that must be verified on Nano.
* **`System.ServiceProcess`**: Used for Windows Services. Nano Server supports services, but the hosting model in Docker usually prefers console apps or background workers.
* **`System.Management` (WMI)**: WMI support is limited in Nano Server.

## Conclusion and Recommendations
The 7GB image size is due to the `mcr.microsoft.com/dotnet/framework/runtime:4.8` base image, which includes the full Windows user mode environment.

To move to Nano Server (which would result in a much smaller image, ~200-500MB):
1. **Rewrite Strategy**: You would need to port the solution to .NET 6/8. This involves finding replacements for Windows Workflow Foundation and `System.Web`.
2. **Intermediate Step**: If a full rewrite is not possible, consider using **Windows Server Core** images instead of the full Windows image if you aren't already. However, if you are already on Server Core (which is likely given the 4.8 runtime image), there isn't much room to shrink further without moving to .NET Core.

## Estimated Effort
**High**. This is a major modernization project, not a simple migration.
Loading