Skip to content

Instantly share code, notes, and snippets.

@ctron
Last active January 18, 2019 09:53
Show Gist options
  • Save ctron/e8af2bd108ca44cc85b7a5ba16909721 to your computer and use it in GitHub Desktop.
Save ctron/e8af2bd108ca44cc85b7a5ba16909721 to your computer and use it in GitHub Desktop.
OpenShift ready docker installation on Hetzner cloud infrastructure
#cloud-config
growpart:
mode: off
runcmd:
- [ bash, "-c", "echo -e 'BOOTPROTO=static\nONBOOT=yes\nDEVICE=eth0:1\nTYPE=Ethernet\nIPADDR=94.130.191.121\nNETMASK=255.255.255.255' > /etc/sysconfig/network-scripts/ifcfg-eth0\\:1" ]
- [ ifup, "eth0:1" ]
- [ parted, "/dev/sda", mkpart, primary, ext2, "50GB", "100%" ]
- [ parted, "/dev/sda", set, "2", lvm, on ]
- [ growpart, "/dev/sda", "1" ]
- [ partx, --update, "/dev/sda" ]
- [ resize2fs, "/dev/sda1" ]
- [ pvcreate, "/dev/sda2" ]
- [ vgcreate, docker-vg, "/dev/sda2" ]
- [ bash, "-c", "echo VG=docker-vg > /etc/sysconfig/docker-storage-setup"]
- [ systemctl, start, docker ]
repo_update: true
repo_upgrade: all
packages:
- docker
- lvm2
- NetworkManager
@ctron
Copy link
Author

ctron commented Jan 18, 2019

I guess this is a bit outdated. I have a more complex setup now at: https://github.com/ctron/hcloud-okd-setup/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment