#!/bin/bash # Cloud-config for CoreOS IPXE deployment on Vultr ################################################## # This cloud-config bootstraps CoreOS on /dev/vda and provisions: # - private ip-address on eth1 # - etcd on private network # - fleet on private network # - basic firewall (docker compatible) # - SSHd security hardening ################################################## # Usage: # 1. Fill in region, SSH Key and etcd token. # Hint: generate a new token for each unique etcd cluster on https://discovery.etcd.io/new # 2. Point the cloud-config-url parameter in your IPXE boot script to this file. ################################################## REGION='vultr-ams' SSH_KEY='ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDQlPPUsIbsZbZDoSX1JKCK17tkaPJIpC5ngDr/TtcFNW7dArrZGgcaeBNQLU1aB0K46/9maYxAY/UfCIwooDRzRK6ezCl81JtWuFASlRgBfFDtLoiIGa4h3+R14WXz0z+VuBr4wSwf6Endft07wFIbgukVDyFUXcKrqu6Nrp/cjNTYtb6Cr34c3m8qplgpjf66lY2pkKonHuqL2Zfrb8KRc6ypUx8rpY2EmuUPvz8LAxxVRJWR9twl7gfFEBPtKRpLpgqLiYGn+OA4KrvDkfphcDP4BMdf9ga9kNIQRa3mope63bYpbAt0QND5CybD1AA/YRuSWJSBTVcuhOBhh9PvOLDTbhCgjeeTidJ1kjG8pm/RmJ42CGJdltCD94rn0x+SLY8vxMQLC1E9sVHy1P10jlVaGupnByN5dvVbOsxxH6UGQyH156X8m2sjPnKeFpMs2Qkur8uHS2o0clXxX229FiivOEb0uu8b1vFZu5tJ7VSDC4krv2pVM/8RaVa9Kxnf8Spnmaz6NWO5H0KYSYFriwfuyZ9jj+tv8xdH7wrIDDunf6JbEcDUSyPUX1UhvILiEGvN+CNY0q3BRC7JSG6IeauyV3FwuProa/wGuAF7dDVt8xVzqLWG0pUt+4yHGXK1ACW1qEDi/I6y2Y1kPivPFMihBLEHv9K2CPTcX/7nMw== arnab@coderuse.com' ETCD_TOKEN=1fcc848cc9ef1335ce20093ca1b7662b # Don't edit below unless you know what you're doing ################################################## V4_PRIVATE_IP=`curl -sS http://169.254.169.254/current/meta-data/local-ipv4` V4_PUBLIC_IP=`curl -sS http://169.254.169.254/current/meta-data/public-ipv4` INSTANCE_ID=`curl -sS http://169.254.169.254/current/meta-data/instance-id` cat > "cloud-config.yaml" <