homestead icon indicating copy to clipboard operation
homestead copied to clipboard

WSL Rework Discussion

Open svpernova09 opened this issue 11 months ago • 14 comments

Goal

Continuing work in https://github.com/laravel/homestead/pull/1949 by @MichaelBelgium and integrating https://github.com/laravel/homestead/pull/1956 from @karmendra

Complete

Complete is a fully functional Homestead-like Ubuntu 22.04 system with associated documentation.

Branch and Status

Work is being done on the wsl-rework branch. I've tested a fresh bento/ubuntu-22.04 Vagrant box and run sudo ./bin/wsl-init installed the base system as expected.

  • [x] Do not install PostgreSQL in wsl-init, should probably be a feature. Thoughts?
  • [x] Ensure our shell variables make it down into the subshell when we run bash scripts/features/php8.3.sh
  • [ ]

svpernova09 avatar Feb 28 '24 22:02 svpernova09

Hi @svpernova09,

Regarding PostgreSQL, I am of the opinion that it shouldn't be part of wsl install as in amd64.sh of laravel/settler it installs and then disable the service # Disable to lower initial overhead. We would rather install it as a feature. Also my opinion is biased by the fact that I am a heavy user of MySql.

karmendra avatar Feb 29 '24 16:02 karmendra

Agree about PostgreSQL being a feature

Ensure our shell variables make it down into the subshell when we run bash scripts/features/php8.3.sh

What is this for if i may ask?

MichaelBelgium avatar Feb 29 '24 19:02 MichaelBelgium

@svpernova09 Correct me if I'm wrong but I think we also need an apache feature script, Nginx gets installed in wsl-init but if there's gonna be an site with type "apache" or "apache-proxy", the apache type or apache-proxy will be used but there's no webserver

https://github.com/laravel/homestead/blob/219e126539a9d55b38b1952fa86ef84319a90c11/scripts/site-types/apache.sh#L26

This line will fail in both site type scripts for WSL

MichaelBelgium avatar Feb 29 '24 21:02 MichaelBelgium

Hi @svpernova09,

Regarding PostgreSQL, I am of the opinion that it shouldn't be part of wsl install as in amd64.sh of laravel/settler it installs and then disable the service # Disable to lower initial overhead. We would rather install it as a feature. Also my opinion is biased by the fact that I am a heavy user of MySql.

Right, PostgreSQL has been moved to a feature and remove from wsl-init.

Agree about PostgreSQL being a feature

Ensure our shell variables make it down into the subshell when we run bash scripts/features/php8.3.sh

What is this for if i may ask?

I've been burned in the past with running bash scripts within bash scripts and want to do a quick test to ensure variables persist as expected.

@svpernova09 Correct me if I'm wrong but I think we also need an apache feature script, Nginx gets installed in wsl-init but if there's gonna be an site with type "apache" or "apache-proxy", the apache type or apache-proxy will be used but there's no webserver

https://github.com/laravel/homestead/blob/219e126539a9d55b38b1952fa86ef84319a90c11/scripts/site-types/apache.sh#L26

This line will fail in both site type scripts for WSL

I don't think we need a feature. We could install and disable it which is what settler does today.

svpernova09 avatar Mar 01 '24 03:03 svpernova09

@svpernova09 , I created a new PR with my changes #1958. Please merge this instead of #1956 I closed this PR. Thanks.

karmendra avatar Mar 01 '24 12:03 karmendra

Hi, Just catching up, hope you guys are doing well, what are our next steps with this, let me know if I can help with something to take this further, got some free time next week. Thanks

karmendra avatar Apr 14 '24 08:04 karmendra

Would it be an idea to revert #1933 so that we can have mailpit on WSL?

MichaelBelgium avatar Apr 28 '24 14:04 MichaelBelgium