Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to setup anything under Windows #405

Closed
BlacKcuD opened this issue Jun 14, 2021 · 5 comments
Closed

Impossible to setup anything under Windows #405

BlacKcuD opened this issue Jun 14, 2021 · 5 comments

Comments

@BlacKcuD
Copy link

BlacKcuD commented Jun 14, 2021

If you run Windows, you can't use this book. This should be mentioned somewhere prominently.

  • Using WSL2, you can't provision VMs using Virtualbox/Vagrant. The instructions in the book are vague and the whole topic is ultra advanced.
  • Hosting Linux yourself with a Virtualbox only works if you have advanced knowledge of Virtualbox AND use an AMD CPU. If you use Intel, you are out of luck.
  • Cygwin can't run Ansible.

It seems you either need a bare-metal Linux or dual-boot. Neither is an option for me right now (and I assume many other readers). This has been a very frustrating week and I would wish that the fact that you need Linux to even use this book would be made clearer.

@geerlingguy
Copy link
Owner

@BlacKcuD — VirtualBox works great on Intel CPUs (I don't have an AMD CPU in the house, and I can get things working on both my Windows PC (HP with a 10th gen Intel i3) and my two Intel Macs (well, now just one — I sold my i9 but still have an older i5).

Also, the Vagrantfiles are just provided as a convenience, and at some point I may figure out a better way to make them work out-of-the-box on any platform (Windows/Mac/Linux), but trying to make sure they work perfect, out of the box, on all three OSes is a monumental task:

  • Apple just switched to the M1 processor, so all the VM tools out there are kinda-sorta working or not working at all, so trying to find a way to have VMs with unique IP addresses for multi-server examples is difficult. See Apple Silicon (arm64) - what should I do with VirtualBox-based examples? #404
  • Windows PCs often have VT-X disabled in the BIOS, and to a less advanced user, it may not be obvious they have to enable that (and/or maybe disable things like Hyper-V) to be able to use VirtualBox correctly.
  • Solutions like Parallels or VMWare require (sometimes expensive) paid licenses.
  • Docker and other container-based tools don't have the same networking layout, so the examples don't always work the same (the network architecture of an app is usually different if it's run inside containers like in K8s or Docker versus on traditional servers or VMs).

Because of all that, I have to rely on the fact that I can't make everything work perfectly for every type of computer and hardware combination out of the box, but that's why I mention you can either get things working in Windows (via the guide in the Appendix), albeit not as gracefully, or you can run each and every example on cloud VMs (from low cost providers like Linode, DigitalOcean, or even AWS/Azure/GCP—you just need one or more VMs running with SSH access).

@geerlingguy
Copy link
Owner

Closing this issue — but if you have any specific parts of the book or this repo where you find something that is not working or is buggy, or could be improved, please let me know :)

@BlacKcuD
Copy link
Author

If a senior IT consultant who works with Ansible for SAP can't figure out how to do it on Windows 10 in 4 days then 99% of readers surely can't.

I acknowledge that keeping these guides up to date is an insane task. However, the guide for Windows is insufficient at best. The topic is highly advanced and no easy feat to manage. For example, we all know how awesome the Ansible documentation is. However, on our journey to try to make it work on Windows 10, we encountered errors that had 404 ansible doc URLs in them!

If you made it work with Windows 10, we'd love to hear about every little detail you can remember.

@geerlingguy
Copy link
Owner

geerlingguy commented Jun 15, 2021

I should note that the Ansible docs explicitly state that Ansible is not supported to run under Windows in any way, and even running it under WSL is considered experimental and not to be done in production.

So my efforts to document a few different ways of getting it running in Windows (under WSL, using Cygwin—which can be done but does not result in a very happy solution, and inside a VM in VirtualBox or any other VM provider that can run a Linux instance) are 'as good as I can do', and I do guarantee that all of them have been tested and were at least working at the time I wrote about them (and I still have instances on my HP Windows 10 i3 PC that have Ansible working in them running 2.9—haven't tried with Ansible 4.0 yet but it should work too).

In the end, the easiest way to get Ansible working is to have some form of Linux running, and install Ansible within, then you can use it to manage VMs, docker containers, or bare metal servers that are accessible via SSH or whatever other connection method you find suitable.

In the end, I'll leave you with this post: Developing with VirtualBox and Vagrant on Windows. A quote from it:

The big problem, I see, is that almost all the tool-builders for OSS web software run either macOS or a flavor of Linux, and many don't even have access to a Windows PC (outside of maybe an odd VM for testing sites in Internet Explorer or Edge, if they're a designer/front-end developer). My evidence is anecdotal, but go to any OSS conference/meetup and you'll likely see the same.

When tool-builders don't use Windows natively, and in many cases don't even have access to a real Windows environment, you can't expect the tools they build to always play nice in that kind of environment. Which is why virtualization is almost an essential component of anyone's Windows development workflow.

@NiftyMist
Copy link

I'd like to mention, that for my workflow at work, I use the following with the issued windows laptop/workstation:

  • Run a Ubuntu VM with VT-x enabled in VMware workstation (provided by company)
  • VSCode with the Remote Development Extenstion which allows my VSCode on Windows to explore and edit files on the Ubuntu VM
  • Use either the building terminal to VSCode or use the Windows Terminal for running the vagrant and molecule commands on a daily basis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants