Skip to content

Instantly share code, notes, and snippets.

View rkive's full-sized avatar

Aaron Bento rkive

  • Portland, OR
View GitHub Profile
#!/bin/sh
# Shell script to install your identity.pub on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
ID_FILE="${HOME}/.ssh/identity.pub"
if [ "-i" = "$1" ]; then
@rkive
rkive / gist:1502436
Created December 20, 2011 17:37
Simple cloud-init test taken from https://help.ubuntu.com/community/CloudInit
#!/bin/sh
echo "Hello World. The time is now $(date -R)!" | tee /root/output.txt
@rkive
rkive / gist:1502445
Created December 20, 2011 17:41
/var/log/cloud-init.log output from ubuntu 11.10
2011-12-20 17:24:37,565 - cloud-init[INFO]: cloud-init start-local running: Tue, 20 Dec 2011 17:24:37 +0000. up 11.85 seconds
2011-12-20 17:24:37,995 - __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloud', 'DataSourceOVF']
2011-12-20 17:24:38,012 - __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceNoCloud', 'DataSourceOVF']
2011-12-20 17:24:38,286 - cloud-init[INFO]: cloud-init start running: Tue, 20 Dec 2011 17:24:38 +0000. up 12.56 seconds
2011-12-20 17:24:38,292 - __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloudNet', 'DataSourceOVFNet', 'DataSourceEc2']
2011-12-20 17:24:38,317 - DataSourceEc2.py[DEBUG]: Searching the following metadata urls: ['http://169.254.169.254', 'http://instance-data:8773']
2011-12-20 17:24:38,319 - DataSourceEc2.py[DEBUG]: Using metadata source: 'http://169.254.169.254'
2011-12-20 17:24:38,341 - __init__.py[DEBUG]: found data source DataSourceEc2
2011-12-20 17:24:38,361 - cloud-init[DEBUG]: found data source: DataSourceE
@rkive
rkive / gist:1502451
Created December 20, 2011 17:42
/var/log/cloud-init.log output from Fedora 16
Dec 20 12:24:34 localhost [CLOUDINIT] cloud-init[INFO]: cloud-init start-local running: Tue, 20 Dec 2011 17:24:34 +0000. up 104.45 seconds
Dec 20 12:24:35 localhost [CLOUDINIT] __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloud', 'DataSourceOVF']
Dec 20 12:24:35 localhost [CLOUDINIT] __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceNoCloud', 'DataSourceOVF']
Dec 20 12:24:36 localhost [CLOUDINIT] cloud-init[INFO]: cloud-init start running: Tue, 20 Dec 2011 17:24:36 +0000. up 105.77 seconds
Dec 20 12:24:36 localhost [CLOUDINIT] __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloudNet', 'DataSourceOVFNet', 'DataSourceEc2']
Dec 20 12:24:36 localhost [CLOUDINIT] DataSourceEc2.py[DEBUG]: Searching the following metadata urls: ['http://169.254.169.254', 'http://instance-data:8773']
Dec 20 12:24:36 localhost [CLOUDINIT] DataSourceEc2.py[DEBUG]: Using metadata source: 'http://169.254.169.254'
Dec 20 12:24:36 localhost [CLOUDINIT] __init__.py[DEBUG]: found dat
@rkive
rkive / gist:1503054
Created December 20, 2011 20:07
sudo /usr/bin/cloud-init-cfg all final on fedora 16
[ec2-user@ip-xx-xx-xx-xx log]$ sudo /usr/bin/cloud-init-cfg all final
Not a directory: --regex
2011-12-20 14:53:20,589 - cc_scripts_user.py[WARNING]: failed to run-parts in /var/lib/cloud/instance/scripts
2011-12-20 14:53:20,591 - __init__.py[WARNING]: Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cloudinit/CloudConfig/__init__.py", line 108, in run_cc_modules
cc.handle(name, run_args, freq=freq)
File "/usr/lib/python2.7/site-packages/cloudinit/CloudConfig/__init__.py", line 72, in handle
[ name, self.cfg, self.cloud, cloudinit.log, args ])
File "/usr/lib/python2.7/site-packages/cloudinit/__init__.py", line 309, in sem_and_run
func(*args)
@rkive
rkive / runChefSolo.sh
Created February 17, 2012 21:29
Remotely push chef-solo and run it.
#!/bin/bash
# runChefSolo.sh
# Author: abento+github@gmail.com
# Setup a set of cookbooks using chef-solo on a remote machine.
hostname=""
domain=""
cookbook_root="."
file_root="./provisioning/chef-solo"
@rkive
rkive / en_cluster_partitions.rb
Created March 1, 2012 00:47
Generate a Voldemort partition scheme for a given size of cluster.
#!/usr/bin/env ruby
#
# gen_cluster_partitions.rb
# Generate a Voldemort partition scheme for a given size of cluster.
#
usage = "Usage: gen_cluster_partitions.rb <name of cluster> < # of cluster nodes> < # of partitions per node>"
if ARGV[0]
cluster_name = ARGV[0]
else
@rkive
rkive / stacks.rb
Created March 1, 2012 23:42
Personal Fog experiments
#!/usr/bin/env ruby
require 'rubygems'
require 'mixlib/cli'
require 'fog'
require 'chef/search/query'
require 'chef/knife'
class Stacks
@rkive
rkive / centos6-cloud.yaml
Created March 18, 2012 23:56
Base CentOS 6.x + Chef 0.10.x + Cloud-init 0.5.15 + runurl
name: centos6-cloud
summary: Base CentOS 6 + Chef 0.10.x + Cloud-init 0.5.15 + runurl
version: 1
os:
name: centos
version: 6
hardware:
partitions:
"/":
size: 10
@rkive
rkive / redis.markdown
Created July 23, 2012 00:38 — forked from bdotdub/redis.markdown
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install: