Skip to main content

Posts

Windows Feedback: a WSL love letter

Introduction As many of you, you might have seen a request for Feedback from the Windows team and how it help us innovating, creating or simply help running our daily Business. For me, while Windows 10 is certainly one of the best version so far, what really stood out since now almost 2 years is WSL. So here is the text I sent as a feedback (minus the typos) and I will warn you: this IS a Love Letter. So if you're not interested in "Care Bear" writting, good bye and have a nice day. The feedback Windows 10 is for me the WSL love and the impact it’s causing on the “legacy IT genes” itself. Since now ever, in a computerized view, Windows was the evil Dragon to be slain by the *nix knights in shiny armor. And then Windows 10 came, with two main crazy ideas. The first one is to have an unchanged, not recompiled linux environment running side by side with Windows and not virtually (as in Virtualization) separated. And with the possibility to call bi...

Scripting with GO: what about Windows?

!!! Warning !!! Once again, let me repeat, I'm by no means a developer nor a sysadmin (at least no more since 5 years). This means that, while the solution below worked for me and I could reproduce it, it's not 100% safe neither! Also, my solution still feels incomplete (read further), so if someone know the tweak to make it even more compete, please share it and reach out in Twitter, I'll be waiting. Introduction By now, everyone following  @jessfraz read her take about the very neat " little hack " from @cloudflare :  Using Go as a scripting language in Linux As a good WSL Corsair, I tried it and it just worked! But then, based on my latest playground of having a seamless coding experience between WSL and Windows (thanks @bketelsen for the love and notification spam), I really thought it would be unfair to "my Windows side" to not be able enjoying the fun of GO scripting (yes, split personality is bad). So as the good Corsair I am, it wa...

WSL: One Home to host them all

Introduction This blog post will explain how a single home mount can be shared accross all  the WSL instances. It was quite fun to find the idea and then make it happen. It will use all the tools currently available from WSL, so please don't expect a "Linux only" as Interopability will be heavily used. And before I start, here is my point of view about WSL: It's not only  Linux! It's different, just like GNU is different from Unix (yes I said it). We have finally the strength of both worlds combined. And while I do understand the "dev" aspect is meant to be reproducible in a Linux prod environment, the "ops" side is meant to take advantages of everything that can make the full environment feeling Home. Setup requirements In order to really enjoy this solution, I do recommend having 2 or more WSL distros installed or, if you fell like a real WSLCorsair, try @bketelsen crazy setup (I love it)! While the distros are downlo...

Secure nested LCOW: Part 3

Part 3: Getting all together After the configuration of the Docker daemon on the Nested Hyper-V VM ( part 2 ), it's now finally time to configure the Docker client that will connect to it. Once again, I will be using WSL as the main shell. However, if you choose to go with Powershell, it's OK too (simply I won't explain it here :). Setup: Window 10 Docker Client first of all, the docker client needs to be installed in the WSL environment. And this will be as easy as one command line, thanks to the Docker install script: client:~$ curl -sSL https://get.docker.com/ | sudo sh As the end of the log suggests, add your user to the docker group. This will require you to logoff in order to apply the change. You can either close the WSL console window and open a new one (logoff / login), or a small trick is to "login again" using the "su" command: client:~$ sudo usermod -aG docker $LOGNAME client:~$ sudo su - $LOGNAME Generate Docker client ...

Secure nested LCOW: Part 2

What's in Part 2? After the configuration of the Host VM hypervisor ( part 1 ), we will get the following components configured: Windows 2016 with nested Hyper-V, Containers and WSL roles Docker daemon installed (no SSL) Docker daemon configured with SSL Setup: Windows 2016 Server this one will be longer, even if I will only list the commands and reference the guides I followed to have my Docker host configured inside the Hyper-V VM. Which means it will not contain any output and, more importantly, I won't put the explanations that the guides provide. I strongly recommend that you click on the "source" links and look at their great content. Also, I won't explain how to install the OS, just note that you should choose the Windows 2016 Server 1709 version (I picked the Standard version). Adding the roles Add Hyper-V and the Containers roles PS> Enable-WindowsOptionalFeature -Online -FeatureName containers -All -NoRestart PS> Enable-...

Secure nested LCOW: Part 1

The dream Microsoft Windows and Linux working together is a today reality! And while, my beloved, WSL is pretty much a work-in-progress, Docker and Containers are Production ready. That's why, when Docker and Microsoft announced the public availability of Linux Containers on Windows (LCOW), the next question from the community was: what if both  "platforms" could run with only one  daemon. Well, wait no more, the technology is here. Now! Yet another guide?  true, but believe me when I say that I followed very carefully the guides done by Docker  and another by one of "my" captain , I ended several times in getting errors and no LCOW at all. The frustration was so big that I decided to build a "new" environment step by step. I'm nowhere near their level (I support an LMS cloud application in my day to day work), which means my setup is certainly less complex and at the same time more complicated, due to the fact I...

VSCode + WSL: the SSH way

The initial idea early 2017, Rich Turner made a demo where Visual Studio was used to develop C++ code, however the debugging environment targeted was WSL! With some magic, he showed something that he had forbidden from the initial release of WSL: writting directly to the WSL filesystem (still a big no-no actually). Of course, this triggered a lot of curiosity and the WSL Corsair had to loot from it too! SSH to save the day the biggest challenge was to find a way that not only could be easy to setup on both ends, and also would be approved  by the WSL team.  TLDR: if you use the Windows Path, You Die! #ThereBeDragons Another way, more Linux-oriented, needed to be used and hopefully a solution already existed and was simply waiting on being used: SSH🔐 The setup the setup is done in 2 distinct parts: Setup the SSH server on WSL Setup the SSH client on VSCode  While the SSH server is a standard procedure in Linux, finding the right  plugin for VSCode w...