Skip to content

Instantly share code, notes, and snippets.

View rberger's full-sized avatar

Robert J. Berger rberger

View GitHub Profile
#
# Cookbook Name:: myface
# Recipe:: default
#
# Copyright (C) 2012 Sean OMeara
#
# Apache 2 license
#
user 'myface'
#
# Cookbook Name:: myface
# Recipe:: default
#
# Copyright (C) 2012 Sean OMeara
#
# Apache 2 license
#
user 'myface'
/* A table for myface users */
CREATE TABLE users(
id CHAR (32) NOT NULL,
PRIMARY KEY(id),
user_name VARCHAR(64),
url VARCHAR(256),
email VARCHAR(128),
neck_beard INTEGER
);
# Managed by Chef for <%= node['hostname'] %>
<VirtualHost *:80>
ServerAdmin <%= node['apache']['contact'] %>
DocumentRoot /srv/apache/myface
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /srv/apache/myface>
#
# Cookbook Name:: myface
# Recipe:: database
#
# Copyright (C) 2013 Charles Johnson
#
# All rights reserved - Do Not Redistribute
#
include_recipe "mysql::server"
default['myface']['database']['host'] = 'localhost'
default['myface']['database']['username'] = 'root'
default['myface']['database']['password'] = node['mysql']['server_root_password']
default['myface']['database']['dbname'] = 'myface'
default['myface']['database']['seed_file'] = "/tmp/myface-init.sql"
<!--
Copyright 2013, Opscode, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
require File.expand_path('../support/helpers', __FILE__)
describe 'myface::database' do
include Helpers::Myface
# Example spec tests can be found at http://git.io/Fahwsw
# Verify that MySQL is installed & enabled:
it "Enables and starts the mysql daemon" do
@rberger
rberger / knife.rb
Created February 18, 2011 08:14 — forked from jbz/knife.rb
# This knife.rb orig. provided by jtimberman@opscode.com - but any mistakes are mine!
current_dir = File.dirname(__FILE__)
platform = "https://api.opscode.com/organizations"
require 'grit'
branch = Grit::Repo.new("#{current_dir}/..").head.name
case branch
@rberger
rberger / nginx_unicorn.rb
Created June 15, 2011 22:06 — forked from threetee/nginx_unicorn.rb
chef nginx_unicorn recipe (part of modified application cookbook)
app = node.run_state[:current_app]
#unicorn
include_recipe "application::unicorn"
#nginx
include_recipe "nginx::source"
#nginx/unicorn proxy
socket = "/tmp/unicorn_#{app['id']}.sock"