
This is the 2nd attempt. The previous was reverted while we figured out the regional mirrors (oops). New plan: k8s.gcr.io is a read-only facade that auto-detects your source region (us, eu, or asia for now) and pulls from the closest. To publish an image, push k8s-staging.gcr.io and it will be synced to the regionals automatically (similar to today). For now the staging is an alias to gcr.io/google_containers (the legacy URL). When we move off of google-owned projects (working on it), then we just do a one-time sync, and change the google-internal config, and nobody outside should notice. We can, in parallel, change the auto-sync into a manual sync - send a PR to "promote" something from staging, and a bot activates it. Nice and visible, easy to keep track of.
20 lines
1.2 KiB
YAML
20 lines
1.2 KiB
YAML
#cloud-config
|
|
|
|
runcmd:
|
|
- modprobe configs
|
|
- docker run -v /dev:/dev -v /home/kubernetes/bin/nvidia:/rootfs/nvidia -v /etc/os-release:/rootfs/etc/os-release -v /proc/sysrq-trigger:/sysrq -e BASE_DIR=/rootfs/nvidia --privileged k8s.gcr.io/cos-nvidia-driver-install@sha256:cb55c7971c337fece62f2bfe858662522a01e43ac9984a2dd1dd5c71487d225c
|
|
- mount /tmp /tmp -o remount,exec,suid
|
|
- usermod -a -G docker jenkins
|
|
- mkdir -p /var/lib/kubelet
|
|
- mkdir -p /home/kubernetes/containerized_mounter/rootfs
|
|
- mount --bind /home/kubernetes/containerized_mounter/ /home/kubernetes/containerized_mounter/
|
|
- mount -o remount, exec /home/kubernetes/containerized_mounter/
|
|
- wget https://dl.k8s.io/gci-mounter/mounter.tar -O /tmp/mounter.tar
|
|
- tar xvf /tmp/mounter.tar -C /home/kubernetes/containerized_mounter/rootfs
|
|
- mkdir -p /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
|
|
- mount --rbind /var/lib/kubelet /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
|
|
- mount --make-rshared /home/kubernetes/containerized_mounter/rootfs/var/lib/kubelet
|
|
- mount --bind /proc /home/kubernetes/containerized_mounter/rootfs/proc
|
|
- mount --bind /dev /home/kubernetes/containerized_mounter/rootfs/dev
|
|
- rm /tmp/mounter.tar
|