CoreOS Installer

by secplusplus
5 deployments · 2 still active · last rev. 2 years ago

Compatible with: No distros currently supported
						#!/bin/bash
# StackScript based on m12/CoreOS
#
#<UDF name="sshkey" label="SSH public key to gain access">
# SSHKEY=

wget https://raw.githubusercontent.com/coreos/init/master/bin/coreos-install
chmod +x coreos-install

cat > cloud-single-config.yaml << EOF
#cloud-config
---

ssh_authorized_keys:
EOF

echo "  - $SSHKEY" >> cloud-single-config.yaml

cat cloud-single-config.yaml

./coreos-install -d /dev/xvdb -C stable -c cloud-single-config.yaml

mkdir /mnt/core-boot
rm -rf /boot/grub
mount /dev/xvdb1 /mnt/core-boot
mv /mnt/core-boot/boot/grub /boot

sed -i 's/hd0/hd1/g' /boot/grub/menu.lst

mkdir /mnt/xvdb9
mount -o subvol=root /dev/xvdb9 /mnt/xvdb9

# !!!
### Make sure to change the kernel of booting Install partition to pv-grub. Otherwise CoreOS will not boot up. 
#

#
### EOF
#