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

Merge branch '70.update-grid-servers-fixes' into 'develop'

Various manually-tested fixes for the updater

Closes #70

See merge request !128
parents 261aa808 41434241
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 #880 passed
......@@ -38,10 +38,26 @@ update_grid_nodes() {
gridname=$1
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
# one extra string, "network", which is morph configuration stuff and we need
# 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.
for node in ${nodes}; do
......@@ -49,8 +65,8 @@ update_grid_nodes() {
# This isn't a server, it's part of the morph configuration.
continue
fi
update_one_node "${deploy_key}" "${node}"
fi
update_one_node "${deploy_key}" "${node}.${domain}"
done
}
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