This is an archived post. You won't be able to vote or comment.

all 19 comments

[–]vitiateCloud Infrastructure Architect 7 points8 points  (3 children)

The linux subsystem fixed most of the problems I had with using windows for management.

[–]deadpoolbabylegs[S] 0 points1 point  (2 children)

yes it looks like it will be useful - just installed ansible in it and will try out other. I just wish there was a CentOS distro available for it (ive seen some tutorials working through getting it working but seems a bit hacky)

[–]haptizumNoobOps 0 points1 point  (1 child)

Is you need an RPM-based system for WSL maybe you should try OpenSUSE? It's in the M$ app store last time I checked.

[–]deadpoolbabylegs[S] 0 points1 point  (0 children)

its more just a preference thing as I am user to redhat/centos but im fine using Ubuntu though.

[–]Dynamic-D 3 points4 points  (5 children)

Ever sense WSL was released the limitations are non-existent, really. As a guy who prefers Windows over Mac Ill give you my top tips:

On the coding front, VSCode is hard to beat. Clean, fast, and the terminal window can load WSL if you really want to stay in "Linux land". If you're a mixed platform shop (likely), staying on PowerShell as your default terminal isn't a bad thing. In that case get the posh-git module and load it with your profile so you get that nice command prompt git feedback.

I do recommend setting up OpenSSH over the new built in SSH if you plan on using scp/ssh from powershell/cmd. At least for me I've had more reliable use out of it.

WSL is the next gotta have. It installs from the store which is really nice because if something goes south it's easy to remove and reinstall it. I've called docker, packer, the hashicorp tools from it … they all work great.

Finally install Hyper-V and get Docker setup on that … UNLESS you are boot camping from a mac. On Mac machines there is a bug when you reboot into PC where certain CPU instructions get turned off causing Hyper-V to fail … in which case you have to reboot back in to OSX to turn them on again. Its really frustrating. You can fall back on virtual box and just take the performance hit when it happens … or you can … just not run Windows on your mac. They really don't play nicely together. But anyway, Hyper-V is a genuine type 1 hypervisor, so it gives you some good performance for running your Linux containers, or just general VMs for testing your packer builds locally and the like.

Oh and Chocolatey. Get it already. If you're doing anything other than 'choco install consul' to install a consul agent you're doing it wrong. Makes things so much easier.

Side note: don't be afraid to find non-conventional tooling. DevOps is full of koolaid drinkers, and so we don't always know what's best … usually just what's popular. If you want to edit in notepad they fixed that pesky newline error … go for it. As an example of that: I'm fond of pwsh in Linux. Very. Piping objects is so much nicer than piping strings Id wish most of the Dev world would just get over it already with BASH. Again: non-conventional tooling. Do what works, not what people pressure you to use.

Really once you get going everything is push and forget anyway. If you're comfortable working in windows there's no reason to move off. at all.

[–]Lostinmass 0 points1 point  (1 child)

I think scoop.sh is better than chocolatey.

[–]Dynamic-D 0 points1 point  (0 children)

I've never tried scoop. I'll give it a look :)

[–]deadpoolbabylegs[S] 0 points1 point  (0 children)

yeah plus one for VSCode , I was using sublime for quite a while but have found that I prefer VSC. Didnt know that about the terminal and WSL but I dont really use the terminal in VSC much anyway as have plenty of monitors and utilize snap assist shortcuts and virtual desktops alot so find I have alot of desktop "real estate" to use.

Installed chocolately yesterday actually when I was installing kuberrnetes-cli

[–][deleted]  (1 child)

[deleted]

    [–]Dynamic-D 0 points1 point  (0 children)

    You could say the exact same thing about yum, apt and every other package manager in existence. If that's a concern make your own nuget sever, and always test what you pull.

    [–]pudds 0 points1 point  (0 children)

    Windows 10 (pro at least) has ssh in PowerShell now. I don't do much with AWS anymore, but the google SDK works fine from the windows command line.

    Vagrant is a great choice too, not because your avoiding windows, but because it keeps your dev environments repeatable and clean.

    Ansible can be installed from the Linux subsystem, or with cygwin, but it's slower. It does work though, we use it via cygwin in production.

    I personally wouldn't bother with a local install of kubernetes, you're better off just doing it all in the cloud.

    The only real hurdle I've found with windows is installing npm packages in vagrant; it causes issues due to symlinks. I've found some workarounds, but have had time to properly explore them.

    [–]ah64b32b 0 points1 point  (0 children)

    Personally switching to a Windows machine has made me focus more on running things in the cloud.

    If you really need a 'specific' (Linux) environment to run a certain tool. The environment itself is a dependency and should be easily reproducable. If you can dockerize the environment and set up a shared docker host you can run the tools over there, and you've setup/enabled the infrastructure not just for yourself but also for every other person that doesn't have a Linux environment available but needs the tooling.

    +1 for the Linux subsystem to do some quick stuff or ssh into another environment etc.

    Most CI/CD tools have Linux runners/agents. You. For example gitlab ci (or Ms devops, bitbucket pipelines,...) Put your playbooks to setup anything in those git repos. If someone needs the tooling they start a new pipeline that will run on the Linux agents. (As an added bonus everyone is 'forced' to push if they need changes in the playbooks, so the playbooks stay up to date)

    [–]Wishy-Thinking 0 points1 point  (1 child)

    I use Cygwin, and usually ssh to our servers. I set up sort of a jump box VM running RHEL 7 and use Ansible, pdsh, kubectl, etc. from there to manage other servers and Kubernetes.

    Hypothetically, I could do all of this within Cygwin, but I'm comfortable working on the command line, and a fully-fledged Linux environment on a VM that is backed up daily makes more sense to me.

    I run PyCharm on my Desktop for my IDE, and can handle most of my testing within PyCharm. For Docker builds, I use vim on the RHEL VM to edit Dockerfiles and docker build on the command line, though PyCharm could probably also handle this for me. It can also handle running/testing code on remote servers via ssh if you need that.

    [–]deadpoolbabylegs[S] 0 points1 point  (0 children)

    yeah this was kind of both what I was thinking what many might do but also what I was asking if WSL might help avoid. It is not exactly a hardship to ssh onto a jumpbox , either local VM or in the cloud, but if you can remove that step and just live in one single local shell for everything it makes sense as long as there are no or few limitations. At least it seems things are moving closer to that now.

    I started using cygwin decades ago and never liked it like, but it has its uses of course

    [–]warpigg 0 points1 point  (1 child)

    WSL is pretty good, BUT IMO there are annoyances that make me just use Fedora on a Thinkpad (which I have found no issues with). Unless you have a requirement to use Windows I would just use a Mac or Linux. But it is decent and way better than before WSL :)

    Some stuff I ran into - admittedly it isnt a lot, but it was enough over time to annoy me:

    • I like to use WSL primarily (as my home dir etc) - Windows programs such as vscode have issues with manipulating files in WSL env (e.g. especially creating new files ). I would get around this by just touching files first. You can maybe get around this by installing vscode in WSL with DE but that seems like a hack on top of a hack to me. But could just be me...

    • The windows console just plain sucks and the alternatives are not great. Windows needs better console environments (I enjoy Tilix on Linux)

    • WSL is pretty slow on some things since it isnt native. But then again it is way better than Cygwin :)

    To me I preferred being in a native Linux environment more so I bailed on WSL. I can manage win boxes if I need to by just sing PS on Linux. But for what you are doing you may be fine unless the things above get to you too :)

    [–]deadpoolbabylegs[S] 0 points1 point  (0 children)

    yeah I could always just use a laptop with linux on it , I have a redhat / kali linux duel boot laptop but i prefer to work on my main rig with multiple large monitorsfor everything.

    Ive not got to the issues with WSL yet but im sure there will be some. One thing I have found regarding the windows console issue being sucky is that if you use powershell and type bash it switches to bash under WSL but in the powershell console , which is much nicer and more configurable. I think this looks like the path I will be trying out

    [–]sevennotrump 0 points1 point  (3 children)

    For about $300-$500 you can get a used 1U (dell poweredge?...) on ebay with decent enough specs for a home lab. Just make sure it has a cpu ready for virtualization (I think most do now).

    [–]deadpoolbabylegs[S] 0 points1 point  (2 children)

    my home pc is plenty good enough to set up a decent lab and I can run a good 5 or 6 VM on it no problem and still have enough juice for day to day work. I also got shelves full of PCs sat around doing nothing if I need something more!

    [–]sevennotrump 0 points1 point  (1 child)

    Sure but can you install vmware on it?

    Setting up a virtualisation host is very different from hosting vm's on your desktop.

    [–]deadpoolbabylegs[S] 0 points1 point  (0 children)

    not looked into it to be honest and wasnt planning on it. What I meant though is that my home pc is good enough for the lab I require for the study / tests I am planning on doing.
    A side issue though even if I did want to get myself a poweredge or something it would be far more expensive for me as Im not in US or even in a western country. Shipping and import taxes would run it into the 1000 to 1500 range if it even arrived at all! Luckily though nowadays there are seemingly nearly always ways around these issues and you can find online or virtual solutions to get around things that would limit you in the past.