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:
#!/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 |
#!/bin/sh | |
echo "Hello World. The time is now $(date -R)!" | tee /root/output.txt |
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 |
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 |
[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) |
#!/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" |
#!/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 |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'mixlib/cli' | |
require 'fog' | |
require 'chef/search/query' | |
require 'chef/knife' | |
class Stacks |
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 |