Azure IoT Edge Preview 2 – Installing Prerequisites on Server Core

Installing the IoT Edge prerequisites on Server Core 1709 requires using the command line.

If you are in Azure, start by creating a VM using the "Windows Server, version 1709 with Containers" image.

If you are using Hyper-V, build up a VM using Server Core 1709.  The 1803 and Windows Server 2019 versions fail prerequisite validation.

Core does not have the GUI desktop so follow these steps after creating VM.  First see if Docker needs to be upgraded:

  1. Run PowerShell
  2. Invoke-Expression (Invoke-WebRequest -useb https://aka.ms/iotedgewin)If it reports the wrong version of Docker then upgrade Docker with:
  3. Install-Module DockerProvider
  4. Install-Package Docker -ProviderName DockerProvider -RequiredVersion preview -VerboseAnswer A when executing both commands
  5. Invoke-Expression (Invoke-WebRequest -useb https://aka.ms/iotedgewin)Should now report prerequisites were satisfied except installing Python for pip.

Docker preview = 17.10.0-ee-preview-3 when this was written.

Next Install Python:

  1. Run PowerShell
  2. $url = "https://www.python.org/ftp/python/3.6.5/python-3.6.5.exe"
  3. $destination=".\python-3.6.5.exe"
  4. [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
  5. Invoke-WebRequest -uri $url -OutFile $destination
  6. Unblock-File -Path $destination
  7. exit
  8. python-3.6.5.exeCheck Add Python 3.6 to PATH does not seem to work so:
  9. set path=%path%;C:\Python36-32\Scripts;

[TODO] see if firewall ports need to be opened.

Install Edge Runtime:

  1. pip install -U azure-iot-edge-runtime-ctl

Now you can issue the "iotedgectl setup", "iotedgectl login", and "iotedgectl start" commands.  If you encountered the "Hostname cannot be empty or greater than 64 characters" issue then follow the workaround described in IoT Edge's documentation.

Wait a bit and the "docker ps" command should show that your containers are running.