scottmuc / infrastructure

Documentation / Automation for personal third-party infrastructure
The Unlicense
11 stars 2 forks source link

Rebuild WSL - Hoping to fix docker issues #54

Closed scottmuc closed 1 year ago

scottmuc commented 1 year ago

Yay for Repaving!

As much as possible is documented inline in this issue template. In case of problems you may find help by viewing all the previous repave issues. Have fun!

Steps

Verification Steps

scottmuc commented 1 year ago

Interesting to see this line while running coalesce_this_machine:

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

The color scheme stuff is failing with the following:

/home/wsl/workspace/infrastructure/homedirs/wsl/../common/lib/install_alacritty_colorscheme.bash: line 13: pip3: command not found

This signals to me that some asdf bootstrapping needs to be done. (related to https://github.com/scottmuc/infrastructure/issues/49)

scottmuc commented 1 year ago

Having some issues getting python installed via asdf. This comment (https://github.com/scottmuc/infrastructure/issues/49#issuecomment-1429434367) has helped.

It appears a couple more dependencies are needed like: build-essential, zlib1g-dev, liblzma-dev.

edit I should have looked here first: https://github.com/pyenv/pyenv/wiki#suggested-build-environment

scottmuc commented 1 year ago

The above commit sort of works... it fails the first time with asdf not found errors. The second execution works. I thought the subshell implementation would resolve that, but need to see if executing asdf in the coalesce_this_machine script is even a good design. This might all me for nothing because I have a plan to remove alacritty-colorscheme python package at some point.

scottmuc commented 1 year ago

In other news, this resolves the docker issues I was having with my previous WSL instance!

scottmuc commented 1 year ago

The following command shows that I have a significant linux kernel change since my last WSL instance:

~/workspace/infrastructure/homedirs/wsl ? cat /etc/os-release && uname -a
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
Linux wsl 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

There were some hints in /var/log/docker.log previously that it could have been a kernel compatibility issue.

scottmuc commented 1 year ago

Successfully ran ansible, but this required so setup steps that were previously in coalesce_this_machine. This time around, I need to pip install ansible and ansible-galaxy collection install ansible.posix. I'm thinking that the root of the repo can be a coalesce_this_repo script that does the asdf setup along with subequent setup once the asdf related tools are installed.

scottmuc commented 1 year ago

Reading the man page for apt-key I see that Ubuntu 22.04 will be the last supporting OS! All subcommands are marked as deprecated now. Migration is well documented too!

DEPRECATION
       Except for using apt-key del in maintainer scripts, the use of apt-key is deprecated. This
       section shows how to replace existing use of apt-key.

       If your existing use of apt-key add looks like this:

       wget -qO- https://myrepo.example/myrepo.asc | sudo apt-key add -

       Then you can directly replace this with (though note the recommendation below):

       wget -qO- https://myrepo.example/myrepo.asc | sudo tee /etc/apt/trusted.gpg.d/myrepo.asc

       Make sure to use the "asc" extension for ASCII armored keys and the "gpg" extension for the
       binary OpenPGP format (also known as "GPG key public ring"). The binary OpenPGP format works for
       all apt versions, while the ASCII armored format works for apt version >= 1.4.

       Recommended: Instead of placing keys into the /etc/apt/trusted.gpg.d directory, you can place
       them anywhere on your filesystem by using the Signed-By option in your sources.list and pointing
       to the filename of the key. See sources.list(5) for details. Since APT 2.4, /etc/apt/keyrings is
       provided as the recommended location for keys not managed by packages. When using a deb822-style
       sources.list, and with apt version >= 2.4, the Signed-By option can also be used to include the
       full ASCII armored keyring directly in the sources.list without an additional file.

More on this here: https://www.jeffgeerling.com/blog/2022/aptkey-deprecated-debianubuntu-how-fix-ansible

scottmuc commented 1 year ago

This was a valuable learning repave. I learned the following: