Feat: switch to tiny-cloud
This commit is contained in:
parent
8711dd27d8
commit
04440efa09
Binary file not shown.
|
@ -2,7 +2,7 @@ bash = true
|
|||
jq = true
|
||||
yq = true
|
||||
logrotate = true
|
||||
iptables = true
|
||||
nftables = true
|
||||
syslog-ng-json = true
|
||||
podman = true
|
||||
wireguard-tools = true
|
||||
|
@ -12,5 +12,5 @@ ethtool = true
|
|||
nvme-cli = true
|
||||
xfsprogs = true
|
||||
dhclient = true
|
||||
# monit = true
|
||||
#monit = true
|
||||
# prometheus-node-exporter = true
|
||||
|
|
|
@ -50,7 +50,8 @@ Dimensions {
|
|||
uefi { include required("firmware/uefi.conf") }
|
||||
}
|
||||
bootstrap {
|
||||
cloudinit { include required("bootstrap/cloudinit.conf") }
|
||||
#cloudinit { include required("bootstrap/cloudinit.conf") }
|
||||
tiny { include required("bootstrap/tiny.conf") }
|
||||
}
|
||||
cloud {
|
||||
aws { include required("cloud/aws.conf") }
|
||||
|
|
|
@ -38,6 +38,9 @@ echo 'Installed cloudbender shutdown hook'
|
|||
cp $SETUP/route53.py $TARGET/usr/local/bin
|
||||
echo 'Installed route53.py'
|
||||
|
||||
# use patched tiny-cloud until PR is merged
|
||||
cp $SETUP/tiny.init-final $TARGET/lib/tiny-cloud/init-final
|
||||
|
||||
# ps_mem
|
||||
#wget https://raw.githubusercontent.com/pixelb/ps_mem/master/ps_mem.py
|
||||
#sed -i -e 's,#!/usr/bin/env python,#!/usr/bin/env python3,' ps_mem.py
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
# Tiny Cloud - Final Phase Functions
|
||||
# vim:set ts=4 et ft=sh:
|
||||
|
||||
source /lib/tiny-cloud/init-common
|
||||
|
||||
save_userdata() {
|
||||
skip_action save_userdata && return
|
||||
|
||||
imds -e @userdata > "$TINY_CLOUD_VAR/$CLOUD_USERDATA"
|
||||
gunzip -t "$TINY_CLOUD_VAR/$CLOUD_USERDATA" && mv "$TINY_CLOUD_VAR/$CLOUD_USERDATA" "$TINY_CLOUD_VAR/$CLOUD_USERDATA".gz && gunzip -k "$TINY_CLOUD_VAR/$CLOUD_USERDATA".gz
|
||||
}
|
||||
|
||||
is_userdata_script() {
|
||||
head -n1 "$TINY_CLOUD_VAR/$CLOUD_USERDATA" | grep -q '#!/'
|
||||
}
|
||||
|
||||
run_userdata() {
|
||||
skip_action run_userdata && return
|
||||
|
||||
local log="$TINY_CLOUD_LOGS/$CLOUD_USERDATA.log"
|
||||
local exit="$TINY_CLOUD_LOGS/$CLOUD_USERDATA.exit"
|
||||
local userdata="$TINY_CLOUD_VAR/$CLOUD_USERDATA"
|
||||
|
||||
chmod +x "$userdata"
|
||||
{ "$userdata" 2>& 1; echo $? > "$exit"; } | tee "$log"
|
||||
|
||||
return $(cat "$exit")
|
||||
}
|
Loading…
Reference in New Issue