mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 01:50:50 +08:00 
			
		
		
		
	CI: mount tmpfs for container storage
Try to speed up the CI tests by using tmpfs as container storage. This is important for system tests, other tests setup their own --root already on tmpfs so it should not effect them. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
		| @ -150,6 +150,9 @@ setup_rootless() { | |||||||
|     showrun groupadd -g $rootless_gid $ROOTLESS_USER |     showrun groupadd -g $rootless_gid $ROOTLESS_USER | ||||||
|     showrun useradd -g $rootless_gid -u $rootless_uid --no-user-group --create-home $ROOTLESS_USER |     showrun useradd -g $rootless_gid -u $rootless_uid --no-user-group --create-home $ROOTLESS_USER | ||||||
|  |  | ||||||
|  |     # use tmpfs to speed up IO | ||||||
|  |     mount -t tmpfs -o size=75%,mode=0700,uid=$rootless_uid,gid=$rootless_gid none /home/$ROOTLESS_USER | ||||||
|  |  | ||||||
|     echo "$ROOTLESS_USER ALL=(root) NOPASSWD: ALL" > /etc/sudoers.d/ci-rootless |     echo "$ROOTLESS_USER ALL=(root) NOPASSWD: ALL" > /etc/sudoers.d/ci-rootless | ||||||
|  |  | ||||||
|     mkdir -p "$HOME/.ssh" "/home/$ROOTLESS_USER/.ssh" |     mkdir -p "$HOME/.ssh" "/home/$ROOTLESS_USER/.ssh" | ||||||
|  | |||||||
| @ -167,10 +167,10 @@ runroot = "/run/containers/storage" | |||||||
| graphroot = "/var/lib/containers/storage" | graphroot = "/var/lib/containers/storage" | ||||||
| EOF | EOF | ||||||
|  |  | ||||||
| # Since we've potentially changed important config settings, reset. |  | ||||||
| # This prevents `database graph driver "" does not match "overlay"` | # mount a tmpfs for the container storage to speed up the IO | ||||||
| # on Debian. | # side effect is we clear all potentially pre existing data so we know we always start "clean" | ||||||
| rm -rf /var/lib/containers/storage | mount -t tmpfs -o size=75%,mode=0700 none /var/lib/containers | ||||||
|  |  | ||||||
| # shellcheck disable=SC2154 | # shellcheck disable=SC2154 | ||||||
| showrun echo "Setting CI_DESIRED_STORAGE [=$CI_DESIRED_STORAGE] for *e2e* tests" | showrun echo "Setting CI_DESIRED_STORAGE [=$CI_DESIRED_STORAGE] for *e2e* tests" | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Paul Holzinger
					Paul Holzinger