Install - .NET Framework 4 Dynamic Agent on Containerized Windows using Environment Variables
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 following the Comments to modify values. Note that this is not meant to be a runnable Dockerfile, but is meant to illustrate how vFunction should be added to the existing 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/vfunction-controller-windows-installation*.zip /app/vfunction-controller-windows-installation.zip
# 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:\vfunction -Force
# Add Environment Variables for the VF Installation
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-dynamic-agent/dotnet/windows/#controller_name
ARG VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_NAME="CHANGE_ME"
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-dynamic-agent/dotnet/windows/#controller_host
ARG VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_HOST="CHANGE_ME"
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-dynamic-agent/dotnet/windows/#controller_org_id
ARG VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_ORG_ID="CHANGE_ME"
ARG VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_APP_ID="CHANGE_ME"
ARG VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_CLIENT_ID="CHANGE_ME"
ARG VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_CLIENT_SECRET="CHANGE_ME"
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-dynamic-agent/dotnet/windows/#instance_id
ARG VF_CONTROLLER_DEFAULT_DOTNET_CONTROLLER_INSTANCE_ID="CHANGE_ME"
# Set up vFunction Agent's Configuration Files
RUN powershell -NoProfile -ExecutionPolicy unrestricted -Command "c:\vfunction\controller-installation\install.ps1 -instance default-dotnet -scriptMode true -noServices true"
# Add Environmental Variables
ENV VF_AGENT_CONF_LOCATION="C:\vfunction\config\agent\instances\default-dotnet\conf.json"
ENV COR_PROFILER_PATH_64="C:\vfunction\agent\vfagent.net.dll"
ENV COR_PROFILER_PATH_32="C:\vfunction\agent\vfagent.net.x86.dll"
ENV COR_ENABLE_PROFILING=1
ENV COR_PROFILER="{cd7d4b53-96c8-4552-9c11-6e41df8eab8a}"
ENV COMPlus_TailCallOpt=0
ENTRYPOINT ["existing_application_startup_flow"]
- Build and deploy the Application
- Confirm that the Application comes up and functions as expected
- If any issues arise: