project-config/nodepool/elements/zuul-worker
Clark Boylan eceb8690f6 Chown the /opt/git repo cache to zuul:zuul
Latest git packages on Ubuntu (and possibly other locations in the
future) don't allow locally cloning repos owned by a different user by
default. Attempting to do so results in this error:

  fatal: detected dubious ownership in repository at '/opt/git/opendev.org/foo/bar/.git'
  To add an exception for this directory, call:

      git config --global --add safe.directory /opt/git/opendev.org/foo/bar/.git
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.

Currently the /opt/git repos are owned by root:root. We expect that
zuul will be the most common user to interact with these cached repos so
we chown to zuul:zuul in order to avoid these problems as much as
possible. Any cases not using zuul will have to determine a path foward
for that special circumstances.

Change-Id: I7cb21869bae42baed5027a9380f60762ab8944e0
2024-05-29 14:35:55 -07:00
..
extra-data.d Fix ZUUL_USER_SSH_PUBLIC_KEY to support ssh key content 2018-04-23 23:24:04 +00:00
install.d Chown the /opt/git repo cache to zuul:zuul 2024-05-29 14:35:55 -07:00
element-deps Don't use devuser for zuul-worker 2016-06-27 11:01:47 +10:00
README.rst Don't use devuser for zuul-worker 2016-06-27 11:01:47 +10:00

zuul-worker

Setup a node to be a zuul worker

User Creation

This element bakes in a zuul user on the host for the zuul-worker process to log in with.

By default login permissions (authorized_keys) will be populated for the zuul user from ~/.ssh/id_rsa.pub -- i.e. the public key of the currently building user. Specify an alternative filename in ZUUL_USER_SSH_PUBLIC_KEY to override this.

The zuul user is provided with passwordless sudo access.