This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Opscode | |
class Backup | |
attr_accessor :backup_dir | |
def initialize | |
@backup_dir = Chef::Config[:knife][:chef_server_backup_dir] ? Chef::Config[:knife][:chef_server_backup_dir] : File.join(".chef", "chef_server_backup") | |
end | |
def backup | |
nodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "chef chef/chef_server_url string https://api.opscode.com/organizations/scee" | debconf-set-selections | |
echo "deb http://apt.opscode.com lucid main" > /etc/apt/sources.list.d/opscode.list | |
wget -O- http://apt.opscode.com/[email protected] | apt-key add - | |
apt-get update | |
apt-get install -y chef | |
echo "validation_client_name \"scee-validator\"" >> /etc/chef/client.rb | |
echo -e "sekrit key...." > /tmp/validation.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:Javascript | |
$(document).ready(function() { | |
$("#environments #version").draggable({revert: true}); | |
}); | |
- colwidth = 95/@environments.count | |
%p= "There are " + @environments.count.to_s + " Environments available." | |
%style{ :type => 'text/css' } | |
:sass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: << File.expand_path(File.dirname(__FILE__)) | |
require 'vapour' | |
require 'awesome_print' | |
key = "secret" | |
secret = "reallysecret" | |
vapour = Vapour.new(key, secret) | |
envs = vapour.describe_stacks.map { |stack| stack.description } | |
ap envs | |
environments = {} | |
envs.each do |env| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-1.9.2-p0 > @vapour.describe_stacks | |
=> [#<struct Vapour::Stack id="arn:aws:cloudformation:eu-west-1:431569401286:stack/sns1/60912880-5d44-11e0-b290-5017c2ccb886", status="CREATE_COMPLETE", description="MSA System Test", name="sns1", creation_time=2011-04-02 16:15:08 UTC, disable_rollback=false, status_reason="User Initiated", parameters={"KeyPair"=>"test123"}, outputs={"InstanceId"=>"i-2d67bd5b"}>, #<struct Vapour::Stack id="arn:aws:cloudformation:eu-west-1:431569401286:stack/sns2/b4d3d3f0-5d46-11e0-b290-5017c2ccb886", status="CREATE_COMPLETE", description="MSA System Test", name="sns2", creation_time=2011-04-02 16:31:48 UTC, disable_rollback=false, status_reason="User Initiated", parameters={"KeyPair"=>"test123", "Version"=>"17"}, outputs={"InstanceId"=>"i-9fe540e9", "Version"=>"17"}>, #<struct Vapour::Stack id="arn:aws:cloudformation:eu-west-1:431569401286:stack/sns3/b67a4bd0-5da5-11e0-9095-5081b384b686", status="CREATE_COMPLETE", description="Phase1", name="sns3", creation_time=2011-04-03 03:51:53 UTC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description" : "Phase1", | |
"Parameters" : { | |
"KeyPair" : { | |
"Description" : "The EC2 Key Pair to allow SSH access to the instance", | |
"Type" : "String" | |
}, | |
"Version" : { | |
"Description" : "The version of the app that was deployed", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Magick < Sinatra::Base | |
helpers do | |
def smash(version, environment) | |
environments = get_environments | |
versions = environments[environment] | |
index = versions.index(version) | |
environments[environment].delete_at(index) | |
File.open("environments.yaml", "w") { |file| file.write(environments.to_yaml) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description" : "Test template that fires up a single FreeBSD instance", | |
"Parameters" : { | |
"KeyPair" : { | |
"Description" : "The EC2 Key Pair to allow SSH access to the instance", | |
"Type" : "String" | |
} | |
}, | |
"Resources" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:48 +0000] INFO: Client key /etc/chef/client.pem is not present - registering | |
ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:49 +0000] WARN: HTTP Request Returned 409 Conflict: Client already exists. | |
ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:51 +0000] WARN: HTTP Request Returned 404 Not Found: Cannot load node test_node | |
ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:54 +0000] INFO: Setting the run_list to "" from JSON | |
ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:55 +0000] INFO: Starting Chef Run (Version 0.9.14) | |
ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:56 +0000] ERROR: Running exception handlers | |
ec2-46-137-39-91.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 21:50:56 +0000] ERROR: Exception handlers complete | |
ec2-46-137-39-91.eu-west-1.compute.amazonaws.com /usr/lib/ruby/gems/1.8/gems/chef-0.9.14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ec2-46-137-13-24.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 19:07:26 +0000] INFO: Client key /etc/chef/client.pem is not present - registering | |
ec2-46-137-13-24.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 19:07:26 +0000] ERROR: Connection refused connecting to localhost:4000 for /clients, retry 1/5 | |
ec2-46-137-13-24.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 19:07:31 +0000] ERROR: Connection refused connecting to localhost:4000 for /clients, retry 2/5 | |
ec2-46-137-13-24.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 19:07:36 +0000] ERROR: Connection refused connecting to localhost:4000 for /clients, retry 3/5 | |
ec2-46-137-13-24.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 19:07:41 +0000] ERROR: Connection refused connecting to localhost:4000 for /clients, retry 4/5 | |
ec2-46-137-13-24.eu-west-1.compute.amazonaws.com [Wed, 23 Mar 2011 19:07:46 +0000] ERROR: Connection refused connecting to localhost:4000 for /clients, retry 5/5 | |
ec2-46-137-13-24.eu-west-1.compute.amazonaws.com /usr/lib/ruby/g |