Skip to content

Instantly share code, notes, and snippets.

@Makova
Last active October 23, 2015 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Makova/5d4e6d8e681eac5fc219 to your computer and use it in GitHub Desktop.
Save Makova/5d4e6d8e681eac5fc219 to your computer and use it in GitHub Desktop.
Run on your laptop
#!/usr/bin/env bash
# Usage: ./deploy.sh [host]
host="${1:-ubuntu@opinionatedprogrammer.com}"
# The host key might change when we instantiate a new VM, so
# we remove (-R) the old host key from known_hosts
ssh-keygen -R "${host#*@}" 2> /dev/null
tar cj . | ssh -o 'StrictHostKeyChecking no' "$host" '
sudo rm -rf ~/chef &&
mkdir ~/chef &&
cd ~/chef &&
tar xj &&
sudo bash install.sh'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment