container-service-extension icon indicating copy to clipboard operation
container-service-extension copied to clipboard

Ubuntu template

Open mplanquart opened this issue 5 years ago • 2 comments

The cust-ubuntu-16.4.sh doesn't work on the referenced cloud image.

Reason: Some packages have changed (and the script doesn't specify the version in all cases). Example: curl -L git.io/weave -o /usr/local/bin/weave

We managed to manually create a working image but it might be worthwhile fixing the script! Note that our working image runs with weave 2.4.1.

Thanks, Marc.

mplanquart avatar Sep 23 '18 13:09 mplanquart

Thanks for raising this. What is the fix you incorporated in the script.

sahithi avatar Sep 24 '18 19:09 sahithi

As curl -L git.io/weave -o /usr/local/bin/weave is retrieving weave 2.4.1, we made the following additional changes (for 2.3.0 we downloaded weave directly from github):

docker pull weaveworks/weave-kube:2.4.1 docker pull weaveworks/weave-npc:2.4.1 export kubever=$(kubectl version --client | base64 | tr -d '\n') wget --no-verbose -O weave.yml "https://cloud.weave.works/k8s/net?k8s-version=$kubever&v=2.4.1"

Interestingly enough, doing only the above steps doesn't work. Weave doesn't initialize properly on the nodes. But if we additionally run weave setup in the template, it works... We haven't add any time to figure out why yet!

We also added the following to the script (for safety): apt-mark hold open-vm-tools apt-mark hold open-vm-tools-dev apt-mark hold docker-ce apt-mark hold kubeadm apt-mark hold kubectl apt-mark hold kubelet

If any of those gets updated automatically while doing an ubuntu update, we might get in trouble. Note that it's very important not to upgrade the open-vm-tools (as the new version is failing to properly customize ubuntu 16.04)

And last but not least, after the ubuntu img is downloaded and the open-vm-tools are installed, we interrupt the install and run: echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklist-floppy.conf rmmod floppy update-initramfs -u and removed cloud-init... Otherwise the image takes forever to boot! We then replaced the ova with this modified version.

We are also working on an 18.04 version with k8s 1.11.3 and the latest open-vm-tools... But it's not working yet (guest customization is not updating the master properly during the install).

Thanks, Marc.

mplanquart avatar Sep 26 '18 10:09 mplanquart