1
0
mirror of https://github.com/rancher/os.git synced 2025-08-02 23:42:31 +00:00
os/scripts/hosting/digitalocean/fedora-symbiote.yml
Sven Dowideit 096c281ded add a fedora based cloud-initi RancherOS install cloud-init script
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-13 11:09:06 +00:00

29 lines
1.3 KiB
Bash

#!/bin/bash
ROS_VERSION="v0.9.2-symbiote"
URL_BASE="https://github.com/SvenDowideit/os/releases/download/${ROS_VERSION}"
VMLINUX="vmlinuz-4.9.21-rancher"
INITRD="initrd
cd /tmp
echo "downloading ${URL_BASE}/${VMLINUX}" > /dev/kmsg
curl -O -L "${URL_BASE}/${VMLINUX}"
echo "downloading ${URL_BASE}/${INITRD}" > /dev/kmsg
curl -O -L "${URL_BASE}/${INITRD}"
if [ "$(ros config get rancher.environment.installer)" == "true" ] && ros --version &>/dev/null; then
ros install -f -c cloud-config.yml -d /dev/vda -p /dev/vda1 \
--statedir ros -t noformat \
--append "rancher.state.directory=ros rancher.debug=true printk.devkmsg=on notsc clocksource=kvm-clock rancher.network.interfaces.eth0.ipv4ll rancher.cloud_init.datasources=[digitalocean] rancher.autologin=tty1 rancher.autologin=ttyS0"
exit 0
fi
echo "installing kexec" > /dev/kmsg
#apt-get update && apt-get install -y kexec-tools ipcalc
#dnf update
dnf install -y kexec-tools ipcalc
echo "running kexec" > /dev/kmsg
kexec --initrd=${INITRD} -l ${VMLINUX} -f --command-line="rancher.debug=true printk.devkmsg=on notsc clocksource=kvm-clock rancher.network.interfaces.eth0.ipv4ll rancher.cloud_init.datasources=[digitalocean] rancher.autologin=tty1 rancher.autologin=ttyS0 rancher.environment.installer=true"