diff --git a/scripts/hosting/digitalocean/fedora-symbiote.yml b/scripts/hosting/digitalocean/fedora-symbiote.yml new file mode 100644 index 00000000..82fdbca5 --- /dev/null +++ b/scripts/hosting/digitalocean/fedora-symbiote.yml @@ -0,0 +1,28 @@ +#!/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"