From f50e9fc8a53620e60f7612662f9795df1c82c279 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Thu, 13 Apr 2017 09:28:46 +0000 Subject: [PATCH] remove some fedora files so the smapshots load faster Signed-off-by: Sven Dowideit --- .../hosting/digitalocean/fedora-symbiote.yml | 43 +++++++++++++++---- scripts/hosting/digitalocean/host.sh | 2 +- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/scripts/hosting/digitalocean/fedora-symbiote.yml b/scripts/hosting/digitalocean/fedora-symbiote.yml index 82fdbca5..a0c11e20 100644 --- a/scripts/hosting/digitalocean/fedora-symbiote.yml +++ b/scripts/hosting/digitalocean/fedora-symbiote.yml @@ -1,8 +1,22 @@ #!/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" +# +# This can be invoked either from the commandline of a fedora 25 vm, or as user-data +# either way, the part inside the "if" needs to be run by hand from the console atmA +# +# The most experimental way, is to use the ./scripts/hosting/digitalocean/host.sh script to modify this one for the current build +# push the rancher/os:sha image to hub, and then use +# doctl.exe compute droplet create --enable-ipv6 --enable-private-networking --image fedora-25-x64 --region sfo1 --size 2gb --ssh-keys 6956055 --ssh-keys 7170404 --user-data-file digitalocean.yml sven +# where: +#$ cat digitalocean.yml +##include +#http://:2115/digitalocean.sh +# +# + +ROS_VERSION="v1.0.1-rc1" +URL_BASE="https://github.com/rancher/os/releases/download/${ROS_VERSION}" +VMLINUX="vmlinuz-4.9.22-rancher" INITRD="initrd cd /tmp @@ -11,11 +25,24 @@ 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 +if type ros 2>/dev/null; then + if [ "$(ros config get rancher.environment.installer)" == "true" ] && ros --version &>/dev/null; then + # This stuff isn't called automatically atm, need to ru manually + #FIXME removing the grub dir stops `ros os upgrade` from re-installing syslinux, which seems to cause havoc + system-docker run -dit --privileged --name stuff alpine top + system-docker exec -it stuff mount /dev/vda1 /mnt + system-docker exec -it stuff rm -rf /mnt/boot/grub /mnt/boot/*fc25* /mnt/var /mnt/usr /mnt/dev /mnt/proc /mnt/sys /mnt/tmp + system-docker exec -it stuff umount /mnt + system-docker rm -f stuff + + + ros config set rancher.debug true + ros install -f --no-reboot \ + -d /dev/vda -p /dev/vda1 \ + --statedir ros -t noformat \ + --append "rancher.state.dev=LABEL=DOROOT 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 fi echo "installing kexec" > /dev/kmsg diff --git a/scripts/hosting/digitalocean/host.sh b/scripts/hosting/digitalocean/host.sh index 14034ccc..11ffed1e 100755 --- a/scripts/hosting/digitalocean/host.sh +++ b/scripts/hosting/digitalocean/host.sh @@ -49,4 +49,4 @@ echo echo cd ${DIST} -caddy -port ${PORT} +caddy -log stdout -port ${PORT}