Get the JAR files from github
wget https://github.com/downloads/dtolabs/rundeck/rundeck-launcher-1.1.0.jar --no-check-certificate
Install Java
sudo apt-get install openjdk-6-jre
{ | |
"webapp": { | |
"web_server": "apache2", | |
"vhosts": [ | |
{ "id": "production", | |
"host_name": "main.example.com", | |
"non_ssl_server": true, | |
"www_redirect": false, | |
"ssl_server": true, | |
"ssl_www_redirect": false |
{ | |
"webapp": { | |
"web_server": "apache2", | |
"vhosts": [ | |
{ "id": "production", | |
"host_name": "main.example.com", | |
"non_ssl_server": true, | |
"www_redirect": false, | |
"ssl_server": true, | |
"ssl_www_redirect": false |
### Chef Solo | |
# | |
# | |
### Opscode Hosted Chef Server | |
# | |
# export KNIFE_USER="jdoe" | |
# export KNIFE_ORGNAME="acmeco" | |
# | |
# * Your Opscode client key should be at `~/.chef.d/opscode-jdoe.pem`. | |
# * Your Opscode validation key should be at `~/.chef.d/opscode-acmeco-validator.pem`. |
{ | |
"name": "base", | |
"description": "Basic role for any client", | |
"json_class": "Chef::Role", | |
"default_attributes": { | |
"authorization": { | |
"sudo": { | |
"groups": [ | |
"sysadmin" | |
], |
include_recipe "mysql::client" | |
node[:websites].each do |website| | |
db_website = search(:websites, "id:#{website} AND status:enabled").first | |
puts "apptype: #{db_website}" | |
case db_website["apptype"] | |
when "php", "dp", "wp" | |
document_root="/var/www/#{db_website["client"]}/#{db_website["id"]}" | |
package "php" | |
include_recipe "apache2::mod_php5" |
define :php_app, :docroot, :canonical_hostname => nil, :template => "php/php.conf.erb" do | |
application_name = params[:name] | |
include_recipe "apache2" | |
include_recipe "apache2::mod_rewrite" | |
include_recipe "apache2::mod_deflate" | |
include_recipe "apache2::mod_headers" | |
template "/etc/apache2/sites-available/#{params[:name]}.conf" do |
module SimpleReport | |
class UpdatedResources < Chef::Handler | |
def report | |
Chef::Log.info "Resources updated this run:" | |
run_status.updated_resources.each {|r| Chef::Log.info " #{r.to_s}"} | |
end | |
end | |
end |
name "development" | |
description "The development environment" | |
# Using a role because chef-solo doesn't support environments. | |
override_attributes "app_environment" => "development", | |
override_attributes "mysql" => { | |
:allow_remote_root => true, | |
:server_root_password => "", |
service_link 'apache' do | |
version [node[:apache][:version], node[:apache][:worker]].join('-') | |
end | |
directory "/etc/httpd" do | |
owner "root" | |
group "root" | |
mode 0755 | |
action :create | |
not_if { File.exists?('/etc/httpd') } |