Open Andrew-Dupuis opened 3 weeks ago
Hi @Andrew-Dupuis, sorry for taking a while to respond. Your points are very valid and indeed there is more we need to do to lock down the directory and its contents, improving the installation experience, and documenting the necessary permissions.
We don't have time to do this all of this at the moment, but at a high level, we would make the following changes:
tyger api install
would create the directories and/or update the ownership and permissions. It would likely need to run as root and therefore would require the userId
and allowdGroupId
fields to be set in the config.I will update this issue as soon as we have something to share.
Hi folks,
When following the current Docker installation documentation, there's a bit of a hole that can be stepped into during the api install step. The documentation mentions that /opt/tyger must exist, and advises to create via sudo: https://github.com/microsoft/tyger/blob/353c5e9849dd8bb55d94f9e346dc8684cd61c9a5/docs/introduction/installation/docker-installation.md?plain=1#L101 This unblocks the install (or at least, appears to for the user), until the data plane container is stood up - at which point it fails its health check. Logs indicate the data-plane fails to bind the tyger.data.sock with a permissions error (since the tyger dir created with sudo is owned by root), which can be fixed with chmod on the tyger dir.
Since the instructions mentioned explicitly to create with sudo, I assumed the root permissions or privileged access might be handled by docker compose or uid in the containers. It might be worth updating the documentation to mention the purpose of the /opt/tyger dir, and necessary permissions - but I also wanted to ask what permissions should be used on the /opt/tyger directory if docker were used in production. I quick-fixed my install with 777 (based on .devcontainer/prepare-host.sh), which lets the installation finish but seems less than ideal? Would prepare-host.sh be worth mentioning in the documentation or using for local, manual docker installations?