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.
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ā¦
- Win security > app control > exploit settings > override code guard (really? ā¦link next post)
- If forget to āinstall as adminā then got to manually delete every last trace before reinstallingā¦
** like delete ā users \ [name] \ .docker
** and delete ā appdata \ local /and/ roaming \ Docker
** and run PowerShell cmds to unregister docker and data
** maybe even delete registry entries
** sign out/in, etc. - Even if installed correctly, apparently thereās years of issues of Docker Win not starting
- And not keen to āopen upā the Docker runtime to āexperimental modeā and whatnot to get GEAās Linux build to run in Docker Win (albeit in Win CL)
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:
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
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.
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).