From beb8ee039e77fe4c2e0a6344965fbce530b54ebb Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 17 Sep 2022 19:21:37 +0200 Subject: Added simple system upgrade scripts --- Makefile | 5 ++++- upgrades/apk.sh | 6 ++++++ upgrades/dalinar.yaml | 11 +++++++++++ upgrades/kaladin.yaml | 11 +++++++++++ upgrades/lore.yaml | 11 +++++++++++ upgrades/myth.yaml | 11 +++++++++++ upgrades/pkg.sh | 6 ++++++ 7 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 upgrades/apk.sh create mode 100644 upgrades/dalinar.yaml create mode 100644 upgrades/kaladin.yaml create mode 100644 upgrades/lore.yaml create mode 100644 upgrades/myth.yaml create mode 100644 upgrades/pkg.sh diff --git a/Makefile b/Makefile index 546b893..cfee169 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,10 @@ check: ## make check # Check syntax of eventline jobs .PHONY: run run: ## make run # deploy all jobs - evcli deploy-jobs */*.yaml + evcli deploy-jobs eventline/*.yaml \ + mirror-to-github/*.yaml \ + www/*.yaml + evcli deploy-jobs -p upgrades upgrades/*.yaml help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' diff --git a/upgrades/apk.sh b/upgrades/apk.sh new file mode 100644 index 0000000..de68bd4 --- /dev/null +++ b/upgrades/apk.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail + +apk upgrade + +echo OK > /var/spool/adyxax/nagios/upgrade diff --git a/upgrades/dalinar.yaml b/upgrades/dalinar.yaml new file mode 100644 index 0000000..afedf2a --- /dev/null +++ b/upgrades/dalinar.yaml @@ -0,0 +1,11 @@ +name: "dalinar" +steps: + - label: upgrade + script: + path: "pkg.sh" +runner: + identity: "eventline-ssh" + name: "ssh" + parameters: + host: "dalinar.adyxax.org" + user: "root" diff --git a/upgrades/kaladin.yaml b/upgrades/kaladin.yaml new file mode 100644 index 0000000..4971175 --- /dev/null +++ b/upgrades/kaladin.yaml @@ -0,0 +1,11 @@ +name: "kaladin" +steps: + - label: upgrade + script: + path: "pkg.sh" +runner: + identity: "eventline-ssh" + name: "ssh" + parameters: + host: "kaladin.adyxax.org" + user: "root" diff --git a/upgrades/lore.yaml b/upgrades/lore.yaml new file mode 100644 index 0000000..533ac75 --- /dev/null +++ b/upgrades/lore.yaml @@ -0,0 +1,11 @@ +name: "lore" +steps: + - label: upgrade + script: + path: "pkg.sh" +runner: + identity: "eventline-ssh" + name: "ssh" + parameters: + host: "lore.adyxax.org" + user: "root" diff --git a/upgrades/myth.yaml b/upgrades/myth.yaml new file mode 100644 index 0000000..d925844 --- /dev/null +++ b/upgrades/myth.yaml @@ -0,0 +1,11 @@ +name: "myth" +steps: + - label: upgrade + script: + path: "apk.sh" +runner: + identity: "eventline-ssh" + name: "ssh" + parameters: + host: "myth.adyxax.org" + user: "root" diff --git a/upgrades/pkg.sh b/upgrades/pkg.sh new file mode 100644 index 0000000..d54a57b --- /dev/null +++ b/upgrades/pkg.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail + +pkg upgrade -y + +echo OK > /var/spool/adyxax/nagios/upgrade -- cgit v1.2.3