-
-
Save olg/109389 to your computer and use it in GitHub Desktop.
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
require 'rubygems' | |
require 'json' | |
my_ssh_keys = [ | |
'ssh-rsa blah1', | |
'ssh-rsa blah1' | |
] | |
other_guy_ssh_keys = [ | |
'ssh-rsa blah1' | |
] | |
dna = { | |
:fully_qualified_domain_name => "example.com", | |
:mysql => { :skip_networking => true }, | |
:apache => { :listen_ports => ["80", "443"] }, | |
:passenger => {:config => { | |
"PassengerUseGlobalQueue" => "on", | |
"PassengerEnabled" => "off" | |
}}, | |
:webapps => [ | |
{ | |
:name => "exampleapp", | |
:server_name => "staging.example.com", | |
:port => 80, | |
:authorized_keys => my_ssh_keys + other_guy_ssh_keys, | |
:env => "staging" | |
}, | |
{ | |
:name => "homepage", | |
:server_name => "example.com", | |
:server_aliases => ["www.example.com"], | |
:authorized_keys => my_ssh_keys + other_guy_ssh_keys | |
} | |
], | |
:gems => [ | |
"rake", | |
{:name => "mysql", :version => "2.7"}, | |
{:name => "rails", :version => "2.3.2"} | |
], | |
:recipes => [ | |
"base", | |
"hostname", | |
"openssh", | |
"git", | |
"mysql::server", | |
"apache2", "apache2::mod_rails", "apache2::mod_ssl", | |
"passenger", | |
"rsync", | |
"postfix", | |
"gems", | |
"webapps" | |
] | |
} | |
open(File.dirname(__FILE__) + "/dna.json", "w").write(dna.to_json) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment