2022-11-22 12:49:03 +00:00
|
|
|
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
|
|
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
|
|
|
pkgname=zdt-base
|
2024-03-12 15:18:42 +00:00
|
|
|
pkgver=0.3.19
|
2022-11-22 12:49:03 +00:00
|
|
|
pkgrel=0
|
|
|
|
pkgdesc="ZeroDownTime Alpine additions and customizations"
|
|
|
|
url="https://git.zero-downtime.net/ZeroDownTime/alpine-overlay/src/branch/master/kubezero/zdt-base"
|
|
|
|
arch="noarch"
|
|
|
|
license="AGPL-3.0"
|
2023-10-05 16:46:40 +00:00
|
|
|
depends="logrotate syslog-ng neofetch monit file tiny-cloud dhcpcd"
|
2022-11-22 12:49:03 +00:00
|
|
|
options="!check"
|
2024-03-20 11:04:12 +00:00
|
|
|
subpackages="$pkgname-openrc $pkgname-aws $pkgname-nocloud"
|
2022-11-24 19:01:40 +00:00
|
|
|
install="$pkgname.post-install"
|
2022-11-22 12:49:03 +00:00
|
|
|
|
2022-11-24 19:01:40 +00:00
|
|
|
source="
|
2023-08-18 15:17:00 +00:00
|
|
|
common.sh
|
|
|
|
boot.sh
|
2023-04-26 17:22:52 +00:00
|
|
|
cloudbender-early.init
|
|
|
|
cloudbender.init
|
2024-03-20 11:04:12 +00:00
|
|
|
cloud-aws.sh
|
|
|
|
cloud-nocloud.sh
|
2022-11-24 19:01:40 +00:00
|
|
|
zdt-sysctl.conf
|
|
|
|
https://raw.githubusercontent.com/pixelb/ps_mem/v3.14/ps_mem.py
|
|
|
|
syslog-ng.conf
|
|
|
|
syslog-ng.logrotate.conf
|
2023-04-26 17:22:52 +00:00
|
|
|
syslog-ng.apparmor
|
2024-04-03 14:27:05 +00:00
|
|
|
cloudbender.stop
|
|
|
|
cloudbender.start
|
2023-10-05 16:46:40 +00:00
|
|
|
dhcpcd-mtu.hook
|
2022-11-24 19:01:40 +00:00
|
|
|
monitrc
|
|
|
|
monit_alert.sh.aws
|
|
|
|
neofetch.conf
|
|
|
|
zdt-ascii.txt
|
2023-04-26 17:22:52 +00:00
|
|
|
profile
|
2022-11-24 19:01:40 +00:00
|
|
|
route53.py
|
2022-11-22 12:49:03 +00:00
|
|
|
get_iam_sshkeys.py
|
2023-04-26 17:22:52 +00:00
|
|
|
uniq_hostname.py
|
2024-03-12 15:18:42 +00:00
|
|
|
write_parameters.py
|
2022-11-22 12:49:03 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
build() {
|
2022-11-24 19:01:40 +00:00
|
|
|
sed -i -e 's,#!/usr/bin/env python,#!/usr/bin/env python3,' ps_mem.py
|
2022-11-22 12:49:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2023-04-26 17:22:52 +00:00
|
|
|
# core libraries
|
2023-08-18 15:17:00 +00:00
|
|
|
install -Dm755 "$srcdir/boot.sh" "$pkgdir/usr/lib/cloudbender/boot.sh"
|
|
|
|
install -Dm755 "$srcdir/common.sh" "$pkgdir/usr/lib/cloudbender/common.sh"
|
2023-04-26 17:22:52 +00:00
|
|
|
|
|
|
|
# convienience
|
2023-08-18 15:17:00 +00:00
|
|
|
mkdir -p "$pkgdir/home/alpine"
|
2023-04-26 17:22:52 +00:00
|
|
|
install -Dm644 "$srcdir/profile" "$pkgdir/home/alpine/.profile"
|
2022-12-03 17:04:13 +00:00
|
|
|
|
2023-10-05 16:46:40 +00:00
|
|
|
# set mtu on interface via dhcpcd
|
|
|
|
install -Dm644 "$srcdir/dhcpcd-mtu.hook" "$pkgdir/usr/lib/dhcpcd/dhcpcd-hooks/10-mtu"
|
|
|
|
|
2022-11-24 19:01:40 +00:00
|
|
|
# various sysctl tunings
|
|
|
|
install -Dm644 "$srcdir"/zdt-sysctl.conf "$pkgdir"/etc/sysctl.d/60-zdt.conf
|
|
|
|
|
2023-04-26 17:22:52 +00:00
|
|
|
# early init script to eg. mount var, cannot use any network !
|
|
|
|
install -Dm755 "$srcdir/cloudbender-early.init" "$pkgdir/etc/init.d/cloudbender-early"
|
2022-12-03 17:04:13 +00:00
|
|
|
|
2024-04-03 14:27:05 +00:00
|
|
|
# various tasks during first boot
|
2023-04-26 17:22:52 +00:00
|
|
|
install -Dm755 "$srcdir/cloudbender.init" "$pkgdir/etc/init.d/cloudbender"
|
2022-11-24 19:01:40 +00:00
|
|
|
|
2024-04-03 14:27:05 +00:00
|
|
|
# local boot & shutdown
|
|
|
|
install -Dm755 "$srcdir/cloudbender.start" "$pkgdir/etc/local.d/cloudbender.start"
|
|
|
|
install -Dm755 "$srcdir/cloudbender.stop" "$pkgdir/etc/local.d/cloudbender.stop"
|
|
|
|
|
|
|
|
|
2022-11-24 19:01:40 +00:00
|
|
|
# syslog-ng configs, json all into messages
|
|
|
|
install -Dm644 "$srcdir"/syslog-ng.conf "$pkgdir"/lib/zdt/syslog-ng.conf
|
|
|
|
install -Dm644 "$srcdir"/syslog-ng.logrotate.conf "$pkgdir"/lib/zdt/syslog-ng.logrotate.conf
|
2023-04-26 17:22:52 +00:00
|
|
|
install -Dm644 "$srcdir"/syslog-ng.apparmor "$pkgdir"/lib/zdt/syslog-ng.apparmor
|
2022-11-24 19:01:40 +00:00
|
|
|
|
|
|
|
# monit
|
|
|
|
mkdir -p "$pkgdir"/etc/monit.d
|
|
|
|
install -Dm600 "$srcdir"/monitrc "$pkgdir"/etc/monitrc.zdt
|
|
|
|
|
|
|
|
# ps_mem
|
|
|
|
install -Dm755 "$srcdir"/ps_mem.py "$pkgdir"/usr/sbin/ps_mem
|
|
|
|
|
|
|
|
# Neofetch
|
|
|
|
install -Dm644 "$srcdir"/neofetch.conf "$pkgdir"/etc/neofetch.conf
|
|
|
|
install -Dm644 "$srcdir"/zdt-ascii.txt "$pkgdir"/etc/neofetch-logo.txt
|
|
|
|
mkdir -p "$pkgdir"/etc/profile.d
|
|
|
|
echo '[ -n "$SSH_TTY" -a "$SHLVL" -eq 1 ] && neofetch --config /etc/neofetch.conf' > "$pkgdir"/etc/profile.d/motd.sh
|
2022-11-22 12:49:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
aws() {
|
|
|
|
mkdir -p "$subpkgdir"
|
2024-03-20 11:04:12 +00:00
|
|
|
|
|
|
|
# aws libs
|
|
|
|
install -Dm755 "$srcdir/cloud-aws.sh" "$pkgdir/usr/lib/cloudbender/cloud/aws.sh"
|
|
|
|
|
|
|
|
# other tools
|
2023-04-26 17:22:52 +00:00
|
|
|
install -Dm755 "$srcdir"/route53.py "$subpkgdir"/usr/sbin/route53.py
|
|
|
|
install -Dm755 "$srcdir"/uniq_hostname.py "$subpkgdir"/usr/sbin/uniq_hostname.py
|
|
|
|
install -Dm755 "$srcdir"/get_iam_sshkeys.py "$subpkgdir"/usr/sbin/get_iam_sshkeys.py
|
2024-03-12 15:18:42 +00:00
|
|
|
install -Dm755 "$srcdir"/write_parameters.py "$subpkgdir"/usr/sbin/write_parameters.py
|
2022-11-24 19:01:40 +00:00
|
|
|
|
2023-04-26 17:22:52 +00:00
|
|
|
# Cloudbender SNS integration
|
2022-11-24 19:01:40 +00:00
|
|
|
install -Dm755 "$srcdir"/monit_alert.sh.aws "$pkgdir"/usr/bin/monit_alert.sh
|
2022-11-22 12:49:03 +00:00
|
|
|
}
|
|
|
|
|
2024-03-20 11:04:12 +00:00
|
|
|
nocloud() {
|
|
|
|
mkdir -p "$subpkgdir"
|
|
|
|
|
|
|
|
# nocloud libs
|
|
|
|
install -Dm755 "$srcdir/cloud-nocloud.sh" "$pkgdir/usr/lib/cloudbender/cloud/nocloud.sh"
|
|
|
|
}
|
|
|
|
|
2022-11-22 12:49:03 +00:00
|
|
|
sha512sums="
|
2024-04-03 14:27:05 +00:00
|
|
|
c1808572d074e1a91e0efc3c31462f6035159338843e51fbccca5102b2923506ce60ba9e1ef00b2fbb134da7a33f55af364e1bff15c272eb7f4ebc6035f33887 common.sh
|
2024-03-20 11:04:12 +00:00
|
|
|
cf8b75a81bb35e853761d21b15b5b109f15350c54daaf66d2912541a20f758c3ca237d58932e5608d2d3867fe15a07ebd694fd1c313a8290d15afc2b27a575dd boot.sh
|
2024-03-12 15:18:42 +00:00
|
|
|
eb7d5b6f92f500dbaba04a915cdd8d66e90456ca86bed86b3a9243f0c25577a9aa42c2ba28c3cad9dda6e6f2d14363411d78eff35656c7c60a6a8646f43dcba5 cloudbender-early.init
|
2024-03-20 11:04:12 +00:00
|
|
|
cac71c605324ad8e60b72f54b8c39ee0924205fcd1f072af9df92b0e8216bcde887ffec677eb2f0eacce3df430f31d5b5609e997d85f14389ee099fbde3c478f cloudbender.init
|
|
|
|
482438e6d443777636fd8f8f7b3d887c5664243d9547a47a755cbb3f56fac3a145be34e9ef6ce622bf0dcb28f5dda1a53c8448f8dbfb632210cc52a3b786b18c cloud-aws.sh
|
|
|
|
3a84b728d4169b92356f1da52922c6110efd5bdc2df90b64abe59f89a5de57cc85a81936bdead0cae5071c1ba1735bda1bd866018b5c3f7fd4ef155d0606ac2d cloud-nocloud.sh
|
2024-03-12 15:18:42 +00:00
|
|
|
06102e56c847637f705d0b29b05b07fbbb2bda9ba69f0a7fe1d716126d3b1c7922fb0df159199809908fa0dc143209775edb1dd5976faa84244dbcaa45f00364 zdt-sysctl.conf
|
2022-11-24 19:01:40 +00:00
|
|
|
76e6a4f309f31bfa07de2d3b1faebe5670722752e18157b69d6e868cbe9e85eda393aed0728b0347a01a810eee442844c78259f86ff71e3136a013f4cbfaaea4 ps_mem.py
|
2024-03-20 11:04:12 +00:00
|
|
|
b86dec8c059642309b2f583191457b7fac7264b75dc5f4a06ad641de6b76589c0571b8b72b51519516ba7e68a128fe2da29b4a2a6dc77c252204675c51b2d128 syslog-ng.conf
|
2022-11-24 19:01:40 +00:00
|
|
|
484bdcf001b71ce5feed26935db437c613c059790b99f3f5a3e788b129f3e22ba096843585309993446a88c0ab5d60fd0fa530ef3cfb6de1fd34ffc828172329 syslog-ng.logrotate.conf
|
2023-07-04 15:10:30 +00:00
|
|
|
e86eed7dd2f4507b04050b869927b471e8de26bc7d97e7064850478323380a0580a92de302509901ea531d6e3fa79afcbf24997ef13cd0496bb3ee719ad674ee syslog-ng.apparmor
|
2024-04-03 14:27:05 +00:00
|
|
|
cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e cloudbender.stop
|
|
|
|
b93cec571afe5128ab4d7c3998b3dc48753897f37169a111f606a48d1982e6ffce52a4ac9568a6a062f621148fb652049b84926a40a62d89be3786e6836261e6 cloudbender.start
|
2023-10-05 16:46:40 +00:00
|
|
|
f8c052c7ec12c71937c7b8bc05d8374c588f345e303b30eda9c8612dff8f8f34a87a433648a3e9b85b278196ece198533b29680a303ff6478171d43f8e095189 dhcpcd-mtu.hook
|
2023-08-18 15:17:00 +00:00
|
|
|
e00a8f296c76446fe1241bf804c0108f47a2676f377a413ee9fede0943362a6582cad30fe13edd93f3d0daab0e2d7696553fb9458dca62adc05572dce339021a monitrc
|
|
|
|
c955dabe692c0a4a2fa2b09ab9096f6b14e83064b34ae8d22697096daf6551f00b590d837787d66ea1d0030a7cc30bef583cc4c936c980465663e73aec5fa2dc monit_alert.sh.aws
|
2024-03-20 11:04:12 +00:00
|
|
|
2c02a1d454881dd7197548286c6cf24c1453dd9d726f3e5445703c12414853b0e12205e5b6a0c3ae09b76097d2bdfcfd6e1bc9a122dd9f66c6d6d03ab41f748a neofetch.conf
|
2022-11-24 19:01:40 +00:00
|
|
|
532b8e2eb04942ab20bdc36b5dea1c60239fcbfcb85706123f3e05c18d65c938b85e9072d964ae5793177625a8db47b532db1f5bd5ed5ecbb70d5a331666ff54 zdt-ascii.txt
|
2023-04-26 17:22:52 +00:00
|
|
|
c3e72cd92936b03f2b9eab5e97e9a12fcddcdf2c943342e42e7702e2d2407e00859c62dc9b4de3378688d2f05458aa5c104272af7ab13e53a62f1676d1a9a1b4 profile
|
2023-07-04 15:10:30 +00:00
|
|
|
816049360aa442f9e9aa4d6525795913cfe3dc7c6c14dc4ccad59c0880500f9d42f198edc442fe036bc84ba2690d9c5bc8ae622341d8276b3f14947db6b879b1 route53.py
|
|
|
|
7da28446762a36a6737c5b30becbce78775bd943b4d0c5ef938a50f49b4f51f66708434aa79004c19d16c56c83f54c8d6d68e1502ebc250c73f8aae12bed83c0 get_iam_sshkeys.py
|
2023-08-18 15:17:00 +00:00
|
|
|
ae1941fc45e61fa8d211f5ef7eff2dd01510a6d364c4302cab267812321a10e7434ecc8d8c9263d8671ce5604d04d6531601bf42886a55fb6aec7f321651e1dc uniq_hostname.py
|
2024-03-12 15:18:42 +00:00
|
|
|
ee4264337d86ad99ba6cf9ec3017986c804ac208c0beb5fc8651345bd277bb6de03e7c3a8c1b751767647be48f9d45ac47a7d14cf040d9c827780984394e826d write_parameters.py
|
2022-11-22 12:49:03 +00:00
|
|
|
"
|