While Google does publish scripts to help with the installation, it requires a non-trivial depth of knowledge to do right. After struggling with it for many hours, I wrote a guide for personal future reference.
I recently returned to those notes to entirely automate the process using GitHub Actions. The work is open-source and available on GitHub.