-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
WSL2 - Issue with upgrading #220
Comments
This is related to the fact that Warden tries to use What is more - with the latest updates of either Warden, Docker or WSL2 - you can no longer use |
@lbajsarowicz basically you shouldn't use I would say in case of WSL2 and windows 10 we have to configure DNS server and import root dns cert manually. Maybe in case of WSL2 it's better to write some article and show the link here |
All the project files are kept in WSL storage, however the configuration files for some reason were recommended to be put in |
So that note on the above Gist was a very first attempt to get stuff running on WSL1. I've been told by @LeeSaferite that the only reason it should have failed without moving the home directory is due to the home directory at ~/ in the WSL environment not having been shared with Docker Desktop. Haven't tested that myself; only tested WSL2 myself which does NOT require moving the home directory using @lbajsarowicz is correct about where these come from:
I posted something here about this: #185 (comment) The TL:DR is I'm planning on stripping that part of the install procedure out entirely in 0.10.0 due to it both causing erroneous messages on WSL, not always working right on Linux (depends on how the network is setup), and concluding that having the install procedure modify network settings on Linux which ends up on pushing all DNS traffic through this dnsmasq container likely without the user knowing it in many cases is a bit too heavy handed. On MacOS (thanks to it's BSD roots) the auto-configuration simply drops a file at /etc/resolver/test which sends only the DNS reqs for the .test TLD to dnsmasq; if there is a way to configure Linxu to send only a specific TLD to the dnsmasq container I'm unaware of it. I'll leave this open until it's been addressed, but these warnings / errors should simply be able to be ignored since they're coming from the conditional checks in the install procedure. |
Does anyone have documented steps for installing Warden on WSL2? Something similar to this Gist for WSL1. I have a client who has a frontend developer joining their team, and it seems like WSL2 is the way to go (over WSL1). |
I have such documentation, I need to translate it to English. |
@erikhansen Don't have anything written myself personally, but when I ran through the process using Win 10 running via Bootcamp on my MBP it was pretty smooth. Installed it on Ubuntu 20 if I recall correctly. There are some warnings to ignore when Warden installs, and dnsmasq isn't going to be automatically configured, so I set 127.0.0.1 as the DNS server with 1.1.1.1 as a fallback on the WiFi network interface and it just worked for me. There's some written info on setting DNS resolution in another project's docs here: https://devilbox.readthedocs.io/en/latest/howto/dns/add-custom-dns-server-on-win.html#howto-add-custom-dns-server-on-win @lbajsarowicz I know based on our chats that you have more info in your writeup since you've helped others get past some common hypervisor issues (I think?) — Any chance you could share it as-is, and maybe myself or Erik could run it through Google Translate and then clean it up a bit? |
Oh, one other thin on the topic of the root CA used to sign SSL certificates… It needs to make it into the Warden docs, but taken from the README of my M2 project template:
|
@davidalger Thanks! @lbajsarowicz Think you could share your documentation, even if it's in Polish? :) |
@lbajsarowicz I'm working with a developer running Windows—he's trying to get setup on WSL 2 and he's running into issues. Any chance you could share that documentation? |
@erikhansen I have run through the process on Windows 10 using https://github.com/davidalger/warden-env-magento2 recently. The process in a nutshell
|
@hardyjohnson Thanks so much! I'll direct the developer to your comment. |
An important performance addendum, make sure to run the code from the local Linux file system and not the i.e. use the home or other wsl local path I am not sure yet how that affects development workflow on a day to day basis but performance is not realistic w/out doing that as of now. |
Quick note here: Mutagen is not used on any Linux like environment, including WSL, so this step should not be necessary as it's only leveraged on Darwin/MacOS |
@hardyjohnson (and anyone else using WSL 2) - I recently upgraded my test Windows environment from WSL 1 > WSL 2 using your helpful instructions above. However everything inside Warden seems to be running painfully slowly. Any suggestions for me? For example, a Here are some details about the setup:
|
@erikhansen when logged into the WSL terminal if you use |
@hardyjohnson Oh, I had missed that comment! Right now the code for the M2 project is in |
Yes give that a shot. I believe you should see a big improvement. |
@hanhpv for ssh tunnel you can do configuration like this:
Also, if you wish to have a full DNS support - you can add dns configuration to your ethernet/wifi interface: |
@hanhpv, maybe, you could send a PR with full instruction on installing Warden on WSL2 once you finish configuring? |
@hardyjohnson Oh boy! That did the trick. Running a Thanks so much for your responsiveness in helping me get this sorted! |
Do any of you use a Git GUI on Windows with WSL 2? The Windows frontend developer I'm assisting installed SourceTree, but it's running painfully slowly as he's using a path like I'm looking at going through the "Update April 2021" steps on this article, but am curious what you all are using: https://chuckdries.medium.com/installing-gitkraken-in-wsl-2-15bf6459f823 |
@erikhansen, you have to use an application that has integration with wsl2 and will use the git command from Linux. For instance, PhpStorm Beta for windows does h such integration, and works almost fine there. I’m using phpstorm and sometimes command line for working with git. Unfortunately, AFAIK, SourceTree doesn’t support it. the other option, as you said, installing X server on windows, and running native Linux apps. I’m using it for |
I'm working with one of our clients to get a new developer setup with Warden on Windows 10. We've followed the steps in @hardyjohnson's comment above but are getting this error:
Does anyone have a suggestion for how to get around this issue? Running the We've tried the setup on my and their Windows machines, using WSL 2, trying both Ubuntu 18.04 and 20.04, to no avail. |
For the record, I worked around the issue above by doing the following:
|
@erikhansen @davidalger How to upgrade Warden in Ubuntu 20.04 Version? I want to upgrade the version to 0.13.1 which will be compactible with the OpenSearch with the warden. Which command I have to run to get specific warden version? |
@RakeshJesadiya If you installed via brew, you should be able to run |
@navarr I have installed it in Ubuntu,
I have got the error while, git pull,
|
Hi so I've been able to follow all the steps to install Warden and Docker for windows in windows, but I don't understand step 6. which is the same as in the documentation here: https://docs.warden.dev/installing.html It seems to be very unclear, as in you add DNS entries to your Windows hosts file but what entries specifically? And how do you add 127.0.0.1 as the first DNS server in your current network adapter in Windows? The problem that is happening is when I try to access app.exampleproject.test or app.exampleproject.test/backend from Google Chrome I get a 404 page not found. So I'm trying to understand what entries exactly need to be entered into the windows hosts file. Edit: I've tried adding in 127.0.0.1 app.exampleproject.test in the hosts file and it seems to do the trick when I go to app.exampleproject.test. Actually nevermind, it seemed to work for a small amount of time giving me the nginx 502 error page when I accessed app.exampleproject.test which is what was supposed to happen for installing Magento 2, but now no longer works for some reason. However, towards adding 127.0.0.1 to the network adapter I have no clue whatsoever what that means or how to do it. Is it possible to also be more specific in the Warden documentation page? As it is extremely unclear as to what to put in for windows users using wsl. |
Update on this: seems like adding 127.0.0.1 app.exampleproject.test into the hosts file where exampleproject is the name of the magento2 folder worked consistently when trying to access app.exampleproject.test in Google Chrome after I installed magento 2. So even though the url isn't working, just keep going and install magento 2 first before trying to access the app.exampleproject.test url. So what I had to do is just proceed even though the url wasn't working with these steps here: https://docs.warden.dev/environments/magento2.html Mainly the warden shell bin/magento setup:install and then : But just follow all the above steps in the installing magento 2 documentation and it will bring you the default luma magento 2 page consistently with the Not secure url on google chrome. Anyway, if anybody needs help installing magento 2 on windows through warden, send me a message or a ping here and I'll help you do it from scratch, since I found this process quite difficult. |
You'll want to
I'm glad you figured this out! It's still early morning for me, so I just saw these posts. You are correct in that you'll want to add any URLs pointing to Warden to your HOSTS file with 127.0.0.1. As for changing your name resolver, I am not currently testing this so I'm not sure how well it will work, however Google has pretty decent instructions: https://developers.google.com/speed/public-dns/docs/using#windows In the place where you'd typically put |
Based on what I am reading there is some clarification that could help new users.
My instructions above which are now part of the main documentation are aimed at setting up the global services and not a particular project: https://docs.warden.dev/installing.html#windows-installation-via-wsl2 In the example I gave, I did originally give the commands for running an existing project
An important bit about step 6 is deciding which method of DNS resolution you will be using, you should only need to ever configure one or the other on Windows. With Windows hosts file resolution, all global services and project domains are manually added to the hosts file including
Setting the network adapter's preference for DNS resolver to Warden's built in global dnsmasq DNS service (127.0.0.1). Note this service is only available after running The advantage of the global DNS service is that it will allow for wildcard resolution of *.test domains and you will not need to manually configure each project or any of the top level service domains. They should work automagically if you are using a .test top level domain.
There is an example Magento 2 project repo which can help ease first time Magento 2 installation, though I am not sure if it is up to date at this point @AnimNyan. @navarr is https://github.com/wardenenv/warden-env-magento2 still relevant here? It has been an age since I tried installing Magento 2 from scratch. Hopefully this helps to clarify some things, happy to add another PR to the docs if it does. Also I will update my previous entry on this issue for future users who end up here. |
You can use a secondary DNS server, for instance, 1.1.1.1 or 8.8.8.8, so if your local DNS isn't available, it will automatically resolve DNS from the secondary one. |
@hardyjohnson @navarr I understand you wanted the instructions to be general, but I think it just makes it unclear not listing an example of what to enter in to the hosts file. At the very least, I think your example host file above should be added to the Warden Installation instructions for Magento 2 here: https://docs.warden.dev/environments/magento2.html Otherwise, a lot of users on Windows will encounter 404 errors when attempting to run their local dev environment from a browser. I didn't try that github since it hasn't been updated for 3 years. Markshurt has one here: https://github.com/markshust/docker-magento that is more up to date with Magento 2.4.6, however haven't checked if it works for Windows, since he was using Mac OS to install Magento. Two other pieces of feedback on the Magento 2 Warden documentation here: https://docs.warden.dev/environments/magento2.html . I don't know where to put this, if I need to create a new issue I will:
This is very confusing to put and as placeholders, I think Magento does that too in their docs, but and would make so much more sense. Furthermore, pretty sure the html under the same step is broken here: reference DevDocs https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html I would also suggest adding a link to the adobe marketplace like this: https://commercemarketplace.adobe.com/
This command does not work for Python 3.0+ and returns an error. From python 3.0 print works differently. See this https://www.datacamp.com/blog/python-2-vs-3-everything-you-need-to-know#the-new-print()-function So the above should be really: For python 3.0+. This is a problem because the warden container doesn't come preinstalled with python and when someone installs python with sudo yum install python they install python 3.9 by default causing the above command to fail. Either that or they need to install and build any version of python below 3.0 like I did like so: Then you can use the above command successfully. I made it super safe by changing python to python2 |
Furthermore, for anyone reading this struggling to install Magento 2.4.6 to windows using Warden I made this video here to follow after my successful setup of the dev environment: https://www.youtube.com/watch?v=sQLUbQOBYv0 |
This is ... just wrong. I don't know what led me down that rabbit hole, but 0.14.1 under WSL2 works fine if you add 127.0.0.1 as the first DNS host. At most we should add some screenshots for Windows 11 and their new "simplified" UI. I've created wardenenv/docs#15 to help address this. |
After running
brew upgrade davidalger/warden/warden
(upgrade from 0.9.0 to 0.9.1) andwarden svc up
I got the following message:Everything else works fine
Here is end of the output of
bash -x warden install
The text was updated successfully, but these errors were encountered: