aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2022-09-17 19:21:37 +0200
committerJulien Dessaux2022-09-17 19:21:37 +0200
commitbeb8ee039e77fe4c2e0a6344965fbce530b54ebb (patch)
tree027abe115888f606bf7f76c55f2a323e6f1d10b4
parentAdded www-deploy job (diff)
downloadev-scripts-beb8ee039e77fe4c2e0a6344965fbce530b54ebb.tar.gz
ev-scripts-beb8ee039e77fe4c2e0a6344965fbce530b54ebb.tar.bz2
ev-scripts-beb8ee039e77fe4c2e0a6344965fbce530b54ebb.zip
Added simple system upgrade scripts
Diffstat (limited to '')
-rw-r--r--Makefile5
-rw-r--r--upgrades/apk.sh6
-rw-r--r--upgrades/dalinar.yaml11
-rw-r--r--upgrades/kaladin.yaml11
-rw-r--r--upgrades/lore.yaml11
-rw-r--r--upgrades/myth.yaml11
-rw-r--r--upgrades/pkg.sh6
7 files changed, 60 insertions, 1 deletions
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