Skip to content

Commit

Permalink
make all /var presistant on VM ISO
Browse files Browse the repository at this point in the history
  • Loading branch information
medyagh committed Apr 22, 2020
1 parent 8310520 commit ade5a44
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 28 deletions.
45 changes: 19 additions & 26 deletions deploy/iso/minikube-iso/package/automount/minikube-automount
Original file line number Diff line number Diff line change
Expand Up @@ -88,38 +88,31 @@ if [ -n "$BOOT2DOCKER_DATA" ]; then
mount $BOOT2DOCKER_DATA /mnt/$PARTNAME
fi

# Just in case, the links will fail if not
umount -f /var/lib/docker || true
rm -rf /var/lib/docker /var/lib/boot2docker
mkdir -p /var/lib
rm -rf /var
mkdir -p /var
mkdir -p /run
ln -s /var/run /run
mkdir -p /var/lib/boot2docker
mkdir -p /var/lib/cni
mkdir -p /var/lib/kubelet
mkdir -p /var/lib/docker
mkdir -p /var/lib/containerd
mkdir -p /var/lib/containers
mkdir -p /var/log
mkdir -p /var/tmp

mkdir -p /mnt/$PARTNAME/var/lib/boot2docker
mkdir /var/lib/boot2docker
mount --bind /mnt/$PARTNAME/var/lib/boot2docker /var/lib/boot2docker

mkdir -p /mnt/$PARTNAME/var/lib/boot2docker
mkdir -p /mnt/$PARTNAME/var/lib/cni
mkdir -p /mnt/$PARTNAME/var/lib/kubelet
mkdir -p /mnt/$PARTNAME/var/lib/docker
mkdir -p /var/lib/docker
mount --bind /mnt/$PARTNAME/var/lib/docker /var/lib/docker

mkdir -p /mnt/$PARTNAME/var/lib/containerd
mkdir -p /mnt/$PARTNAME/var/lib/containers
mkdir -p /var/lib/containers
mount --bind /mnt/$PARTNAME/var/lib/containers /var/lib/containers

mkdir -p /mnt/$PARTNAME/var/log
mkdir /var/log
mount --bind /mnt/$PARTNAME/var/log /var/log

mkdir -p /mnt/$PARTNAME/var/tmp
mkdir /var/tmp
mount --bind /mnt/$PARTNAME/var/tmp /var/tmp

mkdir -p /mnt/$PARTNAME/var/lib/kubelet
mkdir /var/lib/kubelet
mount --bind /mnt/$PARTNAME/var/lib/kubelet /var/lib/kubelet

mkdir -p /mnt/$PARTNAME/var/lib/cni
mkdir /var/lib/cni
mount --bind /mnt/$PARTNAME/var/lib/cni /var/lib/cni


mount --bind /mnt/$PARTNAME/var /var

mkdir -p /mnt/$PARTNAME/data
mkdir /data
Expand Down
2 changes: 0 additions & 2 deletions deploy/iso/minikube-iso/package/podman/podman.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ endef

define PODMAN_INSTALL_TARGET_CMDS
$(INSTALL) -Dm755 $(@D)/bin/podman $(TARGET_DIR)/usr/bin/podman
$(INSTALL) -d -m 755 $(TARGET_DIR)/etc/cni/net.d/
$(INSTALL) -m 644 cni/87-podman-bridge.conflist $(TARGET_DIR)/etc/cni/net.d/87-podman-bridge.conflist
endef

$(eval $(generic-package))

0 comments on commit ade5a44

Please sign in to comment.