Skip to content
Snippets Groups Projects
Commit 41434241 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Various manually-tested fixes for the updater

parent 261aa808
No related branches found
No related tags found
3 merge requests!140Merge staging into production,!129Merge develop into staging,!128Various manually-tested fixes for the updater
Pipeline #879 passed
...@@ -38,10 +38,26 @@ update_grid_nodes() { ...@@ -38,10 +38,26 @@ update_grid_nodes() {
gridname=$1 gridname=$1
shift shift
case "$gridname" in
"production")
grid_dir=./morph/grid/production
domain=private.storage
;;
"staging")
grid_dir=./morph/grid/testing
domain=privatestorage-staging.com
;;
*)
echo "Unknown grid: ${gridname}"
exit 1
esac
# Find the names of all hosts that belong to this grid. This list includes # Find the names of all hosts that belong to this grid. This list includes
# one extra string, "network", which is morph configuration stuff and we need # one extra string, "network", which is morph configuration stuff and we need
# to filter out later. # to filter out later.
nodes=$(nix eval --json '(builtins.attrNames (import ./morph/${gridname}/grid.nix))') nodes=$(nix eval --json "(builtins.concatStringsSep \" \" (builtins.attrNames (import $grid_dir/grid.nix)))" | jp --unquoted @)
# Tell every server in the network to update itself. # Tell every server in the network to update itself.
for node in ${nodes}; do for node in ${nodes}; do
...@@ -49,8 +65,8 @@ update_grid_nodes() { ...@@ -49,8 +65,8 @@ update_grid_nodes() {
# This isn't a server, it's part of the morph configuration. # This isn't a server, it's part of the morph configuration.
continue continue
fi fi
update_one_node "${deploy_key}" "${node}" update_one_node "${deploy_key}" "${node}.${domain}"
fi done
} }
update_grid_nodes "${DEPLOY_KEY}" "${GRIDNAME}" update_grid_nodes "${DEPLOY_KEY}" "${GRIDNAME}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment