microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.03k stars 400 forks source link

Support for Windows Subsystem for Linux (WSL2) #727

Open MedAnd opened 6 years ago

MedAnd commented 6 years ago

Consider adding support for development and testing scenarios using Service Fabric for Linux on Windows Subystem for Linux (WSL). Currently .Net Core installs and runs however doing a:

sudo apt-get install servicefabricsdkcommon

fails with countless permission exceptions.

cc @mani-ramaswamy

suhuruli commented 6 years ago

Would having a local Linux cluster running on a Windows dev machine help?

MedAnd commented 6 years ago

Ideally one would be able to use VS Code and VS 2017 interchangeably to build, test and deploy both “native” and Mesh Service Fabric applications. Support for Service Fabric on WSL would make creating cross platform services much easier. If the WSL team implements writing to the rootfs from Windows... I can imagine building & deploying direct from Windows VS Code / VS 2017 to Service Fabric on Windows, or Service Fabric on WSL without ever needing a seperate Dev Linux VM.

suhuruli commented 6 years ago

Two separate problems I think:

  1. Using VSCode and VS interchangeably is something we will look into
  2. Ability to run Windows and Linux clusters on a single machine that enables cross plat development is something we are actively tracking. Once Linux containers are supported on Windows natively, this will allow you to deploy your Windows or Linux containers to your local dev cluster.
MedAnd commented 6 years ago

Re: “Once Linux containers are supported on Windows natively” does this mean Linux Docker will run on top of WSL or via a Hyper-V VM as is already the case? If the later, this request is maybe a 3rd option for running Service Fabric in WSL for dev/test scenarios which would not force me down the container road... so thinking my cross platform experience stays native... in VS 2017 I would just use a new powershell to deploy the exact same package to Service Fabric running in WSL.. hope that makes sense?

mkosieradzki commented 6 years ago

@MedAnd There is also LCoW... I am also curious what @suhuruli means.

suhuruli commented 6 years ago

Was referring to LCoW

mkosieradzki commented 6 years ago

Thanks @suhuruli. Do you expect LCoW to fully support I/O, POSIX, etc? Or is this something very distant?

mkosieradzki commented 6 years ago

@suhuruli I mean specifically bind mounts limitation from: https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/linux-containers I am unable to find work-items tracking those issues.

suhuruli commented 6 years ago

@MedAnd so when LCoW comes around, Linux containers on Windows will run without you needing to explicitly switch the container mode between Windows and Linux. This means Windows and Linux containers can run side by side if that makes sense.

suhuruli commented 6 years ago

These containers would run via a Hyper-V VM and not on WSL I believe ...

suhuruli commented 6 years ago

@mkosieradzki I am not sure on the status of exactly which of those operations will have support on bind-mounted volumes when LCoW comes out ..

MedAnd commented 6 years ago

given LCoW is at the end of the day still using Hyper-V... was wondering in addition to the other options being worked on (containers, cross platform tooling), why not Service Fabric running in WSL... I could develop on Windows but deploy to WSL without ever needing to package my native Service Fabric app into containers. As an example, Service Fabric would be listening to all the usual ports, hence my VS 2017 (powershell) deployment would just work??... this could be a longer term goal, agree that the priority should be on getting container support (hope this includes Docker Compose support) & cross platform tooling...

MedAnd commented 5 years ago

Remote Development such as with VS Code is becoming much more prevalent & mainstream given it adds greatly to developer productivity in cross platform scenarios. Since Service Fabric supports Windows and Linux, process and container development and debugging, please re-consider adding support for Service Fabric under WSL.

PS. Now that WSL2 was announced at Build 2019 I'm even more convinced this would be a great feature!

MedAnd commented 5 years ago

Now that WSL2 is available in preview, I've logged the following installer related issue:

WSL2: Service Fabric for Linux Installation Errors

cc @suhuruli @masnider

MedAnd commented 5 years ago

@ChackDan @msfussell - as per feedback from @therealkenc, the issue appears to be the use of systemd (or anything that systemd usually starts, like dbus-daemon). Any chance you can comment:

Ask them how to make it run on Alpine/Gentoo/Void Linux ref #4158 (message). It will make a better formed question, and you will get a shorter and less confused answer. LZ is microsoft/service-fabric-issues#994.

radderz commented 4 years ago

Any update on this now that WSL2 is released? a debugging experience within VS would simplify development.