Edge agent in windows

Trying out Docker for windows.
Should I be able to run the Losant edge agent there?

Hello @hyp_nos97,

You should have no problem running the Losant Edge Agent with Docker on Windows.

Please, though, let me know if you run into any issues.

Thank you,
Heath

Hi Heath,

Help me understand, yes thereā€™s a Losant to install of Docker in Win, but what about all the ā€˜setupā€™ stuff, like config file, etc.? Ex, to enter Losant device ID, etcā€¦

Like thereā€™s no chmod or vim cmds in Win (that I can tell), is it easier to just ā€˜getā€™ latest Ubuntu 22.04 from Microsoft Store?

Thanks

In fact, if you try going to Ubuntu after installing Docker for Win (which comes w/ WSL), you get this msg:

[computerName]:~$ sh get-docker.sh

Executing docker install script, commit: [ā€¦]

Warning: the ā€œdockerā€ command appears to already exist on this system.

If you already have Docker installed, this script can cause trouble, which is
why weā€™re displaying this warning and provide the opportunity to cancel the
installation.

If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.

You may press Ctrl+C now to abort this script.

  • sleep 20

WSL DETECTED: We recommend using Docker Desktop for Windows.
Please get Docker Desktop from Docker Desktop: The #1 Containerization Tool for Developers | Docker

Else is there some advantage to Linus runtime, like more stable? Or just stay in native Win?

The Gateway Edge Agent runs in Docker on Windows just fine; if it were me, I would install Docker Desktop for Windows and utilize that. Then, you can use its GUI to create a container from the GEA image and mount in a volume that contains a configuration file, in which you can place the device ID, access key, etc.

If you do not wish to use Docker Desktop, you should still be able to start the container using the Windows command prompt. You are correct that the format of file paths and scripts will be different from what is published in our documentation, but if you are familiar with Windows, those differences should be apparent.

I did also find this other thread that is somewhat related (itā€™s about running the agent on a Windows server). You may find some useful information for your use case there.

1 Like

Many thanks for that.

Taking stock of it all, cool GEA runs well in Docker Win / Desktop. Anyway seems simpler (more efficient?) than downloading say a Linux instance (latest Ubuntu?) and running it there, which is running within Win. Then again Losantā€™s Linux setup / tutorial seems way easier.

Background thoughts include, not that Losant is missing a Win tutorial, but seems like Docker Win has many more nuances; likeā€¦

Iā€™m not sure what Win CL will get you (just a non-GUI?).
And Iā€™m still facing the ā€˜wonā€™t run in Winā€™ issues nowā€¦ Forever:
Docker won't start

SO in short,
Docker Linux = a tad more overhead? Maybe.
But way more stable, and easier to follow? Seems like it.
Agreed?

EDITS for links

One more link (code flow override)

So with Linux in mind, whatā€™s this mean?

Typed into Ubuntu: docker logs [container-id]
One of the status lines - ā€œwarnā€ (yellow):

Unable to load flows from disk. Workflow path: /data/workflows must be a directory

Iā€™m not going to wade into the Linux vs. Windows debate, other than to reiterate that all of the Losant product documentation and default configuration values are written from the perspective of a Linux operating system.

As for your warning message, it is possible to load edge workflows directly from your deviceā€™s file system, as opposed to configuring them on the cloud and deploying down from there. Doing so requires defining the directory (defaults to /data/workflows) and then dropping on-disk workflow files into there.

The warning you encountered simply means the agent could not find a directory at the defined path (or in your case, the default path). If you arenā€™t using on-disk workflows, it is nothing to worry about, though you could create that directory in your mounted volume if youā€™d like it to go away.

1 Like

Ok very good x2.

Yes just a look into / understanding of the options is all I need.

Very cool to see the flexibility of GEA.

Actuallyā€¦ could you kindly recommend Linux distro(s) that play nicely w/ GEA? I imagine most, if not all.

But particularly for computers that have more ā€˜edge levelā€™ processors?
Figure something like Debian or Deepin?

We donā€™t have much guidance here as we havenā€™t encountered any commonly used Linux distributions that do not support the GEA (or more specifically, Docker).

You canā€™t go wrong with Ubuntu. Even if youā€™re in a Windows environment, it has you covered.

Sure thanks.
I think the trick is running on Win LTSC 2019 doesnā€™t really support wsl
(None of the wsl features can activate nor commands works)

Additionally, not entirely sure Docker for Win will be helpful, as they also rely on wsl (preferably wsl2 at that).