Install - .NET 3 / 6 / 7 / 8 Dynamic Agent on Containerized Windows using a Windows Service
Installation Wizard
To help with the installation process, vFunction offers an Installation Wizard. This Wizard provides additional information about the Prerequisites as well as steps for deploying the vFunction Agent to your environment.
Please contact support@vfunction.com or your vFunction Contact(s) for the password to start using this Wizard.
Installation Steps
- Download the latest vFunction Windows Controller Installation ZIP
- Create a folder for vFunction artifacts in the Artifact Repository accessible by the Docker Build
- Add the vFunction Windows Controller Installation ZIP to the Artifact Repository
- Create a vFunction specific branch to add the vFunction artificats to the Application’s Dockerfile
- Modify the Application’s Dockerfile
FROM base_image_like_mcr.microsoft.com/dotnet/framework/aspnet
RUN existing_application_dockerfile_stuff
########### vFunction ###########
# Place Windows Controller Installation Zip in vf-install directory on image
COPY vf-install/* /app
# Unzip the Controller Installation ZIP
# This Dockerfile uses c:\vfunction as the location from which vFunction runs, find-and-replace this string if desired to run from a different location
RUN Expand-Archive -Path C:\app\vfunction-controller-windows-installation*.zip -DestinationPath C:\ -Force
# Set up vFunction's Agent
### Replace the $CHANGE_ME values with the Required Configuration Settings. For detailed Settings explanations, see:
### https://kb.vfunction.com/installations/configurable-settings/mono-dynamic-agent/dotnet/windows
RUN powershell -NoProfile -ExecutionPolicy unrestricted -Command "powershell -NoProfile -ExecutionPolicy unrestricted -Command "
New-Item -Path Env:\VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_NAME -Value '$CHANGE_ME';
New-Item -Path Env:\VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_HOST -Value '$CHANGE_ME';
New-Item -Path Env:\VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_APP_ID -Value '$CHANGE_ME';
New-Item -Path Env:\VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_ORG_ID -Value '$CHANGE_ME';
New-Item -Path Env:\VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_CLIENT_ID -Value '$CHANGE_ME';
New-Item -Path Env:\VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_CLIENT_SECRET -Value '$CHANGE_ME';
New-Item -Path Env:\VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_INSTANCE_ID -Value '$CHANGE_ME';
New-Item -Path Env:\VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_TAG -Value '$CHANGE_ME';
New-Item -Path Env:\VF_CONTROLLER_DEFAULT_DOTNET_AGENT_VERSION -Value 'framework';
C:\home\vfunction\controller-installation\install.ps1 -instance default-dotnet -scriptMode true -noServices true"
# Add Environmental Variables to the Windows Service Registry Key
# Find-and-replace SERVICE_NAME with the actual name of the Service
RUN $vf_values=@("VF_AGENT_CONF_LOCATION=C:\vfunction\config\agent\instances\default-dotnet\conf.json", "CORECLR_PROFILER_PATH_64=C:\vfunction\agent\vfagent.net.dll", "CORECLR_PROFILER_PATH_32=C:\vfunction\agent\vfagent.net.x86.dll", "CORECLR_ENABLE_PROFILING=1", "CORECLR_PROFILER={cd7d4b53-96c8-4552-9c11-6e41df8eab8a}", "DOTNET_TailCallOpt=0")
RUN New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\SERVICE_NAME" -Name "Environment" -Value $vf_values -PropertyType MultiString
ENTRYPOINT ["existing_application_startup_flow"]
- Build and deploy the Application
- Confirm that the Application comes up and functions as expected
- If any issues arise: