25 lines
513 B
Bash
Executable File
25 lines
513 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/.."
|
|
|
|
if [ $# = 0 ]; then
|
|
echo "usage: deploy.sh name ..."
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f $DIR/clusters/$1/default.nix ]; then
|
|
echo "error: $1 does not contain a deployment"
|
|
exit 1
|
|
fi
|
|
|
|
# mkdir -p $1/gcroots
|
|
|
|
# echo "--- Securing certifiates"
|
|
# nix-build -o $1/gcroots/certs $1/build.nix
|
|
|
|
echo "--- Updating deployment"
|
|
nixops modify -d $1 $DIR/clusters/$1
|
|
|
|
echo "--- Deploying $1"
|
|
nixops deploy -d $* --allow-reboot
|