#!/usr/bin/env bash id=kube1 # if [ $# = 0 ]; then # echo "usage: deploy.sh name ..." # exit 1 # fi if [ ! -f ./deployment.nix ]; then echo "error: ./ 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 $id ./deployment.nix echo "--- Deploying $id" nixops deploy -d $id --allow-reboot