From 64fbf5345c7f48ed4a8c67ec8d7c310bae4241e7 Mon Sep 17 00:00:00 2001 From: karim hamidou Date: Mon, 28 Apr 2014 19:21:17 +0200 Subject: [PATCH] spring cleaning - removed unused file --- bootstrap.rb | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 bootstrap.rb diff --git a/bootstrap.rb b/bootstrap.rb deleted file mode 100644 index b7fdef4..0000000 --- a/bootstrap.rb +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env ruby -# Setup kite on a non-vagrant machine, like a digital ocean server -# -# This script goes through the following steps -# - setup ssh key-based auth on server -# - rsync the sources -# - run puppet on the server - -if ARGV.length != 1 then - puts "usage: $0 hostname" - exit -end - -hostname=ARGV[0] - -if !ENV["SSH_AGENT_PID"] then - `ssh-add` -end - -def exec_command(command) - out = `#{command}` - if !$?.success? then - puts "FAIL.\n An error happened executing #{command}" - puts "Output: #{out}" - else - puts "OK." - end -end - -printf "Setting up public key auth on #{hostname}: " -exec_command("ssh-copy-id root@#{hostname}") - -printf "Setting up puppet: " -exec_command("ssh root@#{hostname} bash -c \"apt-get update && apt-get install -y rsync puppet\"") - -printf "Copying the sources: " -exec_command("rsync -a -f\"- .git/\" ../kite root@#{hostname}:/root/") - -puts "Applying Puppet configuration (this may take some time): " -exec_command("ssh root@#{hostname} bash -c \"puppet apply /root/kite/manifests/server.pp --modulepath=/root/kite/puppet_modules/\"") -- 2.43.0