Browse Source

[COOK-1820] Remove deprecated recipes; their expiration date has come and gone.

Andrea Campi 7 years ago
parent
commit
311bba36c1

+ 0 - 67
examples/data_bags/apps/django_app.json

@@ -1,67 +0,0 @@
-{
-  "id": "my_app",
-  "server_roles": [
-    "application specific role(s), typically the name of the app, e.g., my_app",
-    "my_app"
-  ],
-  "type": {
-    "my_app": [
-      "recipes in this application cookbook to run for this role",
-      "django",
-      "gunicorn"
-    ]
-  },
-  "database_slave_role": [
-    "name of the role used by database slaves, typically named after the app, 'my_app_database_slave'",
-    "my_app_database_slave"
-  ],
-  "database_master_role": [
-    "name of the role used by database master, typically named after the app 'my_app_database_master'",
-    "my_app_database_master"
-  ],
-  "repository": "git@github.com:company/my_app.git",
-  "revision": {
-    "production": "commit hash, branch or tag to deploy"
-  },
-  "force": {
-    "production": "true or false w/o quotes to force deployment, see the rails.rb recipe"
-  },
-  "migrate": {
-    "production": "true or false boolean to force migration, see rails.rb recipe"
-  },
-  "databases": {
-    "production": {
-      "encoding": "utf8",
-      "username": "db_user",
-      "adapter": "mysql",
-      "port": "3306",
-      "password": "awesome_password",
-      "database": "db_name_production"
-    }
-  },
-  "mysql_root_password": {
-    "production": "password for the root user in mysql"
-  },
-  "mysql_debian_password": {
-    "production": "password for the debian-sys-maint user on ubuntu/debian"
-  },
-  "mysql_repl_password": {
-    "production": "password for the 'repl' user for replication."
-  },
-  "snapshots_to_keep": {
-    "production": "if using EBS, integer of the number of snapshots we're going to keep for this environment."
-  },
-  "deploy_key": "SSH private key used to deploy from a private git repository",
-  "deploy_to": "path to deploy, e.g. /srv/my_app",
-  "owner": "owner for the application files when deployed",
-  "group": "group for the application files when deployed",
-  "packages": {
-    "package_name": "specific packages required for installation at the OS level to run the app like libraries and specific version, e.g.",
-    "curl": "7.19.5-1ubuntu2"
-  },
-  "pips": {
-    "pip_name": "specific gems required for installation to run the application, and if a specific version is required, e.g.",
-    "django": "1.2"
-  },
-  "local_settings_file":"local_settings.py"
-}

+ 0 - 61
examples/data_bags/apps/java_app.json

@@ -1,61 +0,0 @@
-{
-  "id": "my_app",
-  "server_roles": [
-    "application specific role(s), typically the name of the app, e.g., my_app",
-    "my_app"
-  ],
-  "type": {
-    "my_app": [
-      "recipes in this application cookbook to run for this role",
-      "java_webapp",
-      "tomcat"
-    ]
-  },
-  "database_slave_role": [
-    "name of the role used by database slaves, typically named after the app, 'my_app_database_slave'",
-    "my_app_database_slave"
-  ],
-  "database_master_role": [
-    "name of the role used by database master, typically named after the app 'my_app_database_master'",
-    "my_app_database_master"
-  ],
-  "repository": "git@github.com:company/my_app.git",
-  "revision": {
-    "production": "commit hash, branch or tag to deploy"
-  },
-  "force": {
-    "production": "true or false w/o quotes to force deployment, see the rails.rb recipe"
-  },
-  "databases": {
-    "production": {
-      "max_active": "100",
-      "max_idle": "30",
-      "max_wait": "10000",
-      "username": "db_user",
-      "adapter": "mysql",
-      "driver": "com.mysql.jdbc.Driver",
-      "port": "3306",
-      "password": "awesome_password",
-      "database": "db_name_production"
-    }
-  },
-  "mysql_root_password": {
-    "production": "password for the root user in mysql"
-  },
-  "mysql_debian_password": {
-    "production": "password for the debian-sys-maint user on ubuntu/debian"
-  },
-  "mysql_repl_password": {
-    "production": "password for the 'repl' user for replication."
-  },
-  "snapshots_to_keep": {
-    "production": "if using EBS, integer of the number of snapshots we're going to keep for this environment."
-  },
-  "deploy_to": "path to deploy, e.g. /srv/my_app",
-  "owner": "owner for the application files when deployed",
-  "group": "group for the application files when deployed",
-  "packages": {
-    "package_name": "specific packages required for installation at the OS level to run the app like libraries and specific version, e.g.",
-    "curl": "7.19.5-1ubuntu2"
-  }
-}

+ 0 - 63
examples/data_bags/apps/php_app.json

@@ -1,63 +0,0 @@
-{
-  "id": "my_app",
-  "server_roles": [
-    "application specific role(s), typically the name of the app, e.g., my_app",
-    "my_app"
-  ],
-  "type": {
-    "my_app": [
-      "recipes in this application cookbook to run for this role",
-      "php",
-      "mod_php_apache2"
-    ]
-  },
-  "database_slave_role": [
-    "name of the role used by database slaves, typically named after the app, 'my_app_database_slave'",
-    "my_app_database_slave"
-  ],
-  "database_master_role": [
-    "name of the role used by database master, typically named after the app 'my_app_database_master'",
-    "my_app_database_master"
-  ],
-  "repository": "git@github.com:company/my_app.git",
-  "revision": {
-    "production": "commit hash, branch or tag to deploy"
-  },
-  "force": {
-    "production": "true or false w/o quotes to force deployment, see the rails.rb recipe"
-  },
-  "databases": {
-    "production": {
-      "reconnect": "true",
-      "encoding": "utf8",
-      "username": "db_user",
-      "adapter": "mysql",
-      "password": "awesome_password",
-      "database": "db_name_production"
-    }
-  },
-  "mysql_root_password": {
-    "production": "password for the root user in mysql"
-  },
-  "mysql_debian_password": {
-    "production": "password for the debian-sys-maint user on ubuntu/debian"
-  },
-  "mysql_repl_password": {
-    "production": "password for the 'repl' user for replication."
-  },
-  "snapshots_to_keep": {
-    "production": "if using EBS, integer of the number of snapshots we're going to keep for this environment."
-  },
-  "deploy_to": "path to deploy, e.g. /srv/my_app",
-  "owner": "owner for the application files when deployed",
-  "group": "group for the application files when deployed",
-  "packages": {
-    "package_name": "specific packages required for installation at the OS level to run the app like libraries and specific version, e.g.",
-    "curl": "7.19.5-1ubuntu2"
-  },
-  "pears": {
-    "pear_name": "specific gems required for installation to run the application, and if a specific version is required, e.g.",
-    "mongo": "1.1.4"
-  },
-  "local_settings_file": "some/realative/path/LocalSettings.php"
-}

+ 0 - 75
examples/data_bags/apps/rails_app.json

@@ -1,75 +0,0 @@
-{
-  "id": "my_app",
-  "server_roles": [
-    "application specific role(s), typically the name of the app, e.g., my_app",
-    "my_app"
-  ],
-  "type": {
-    "my_app": [
-      "recipes in this application cookbook to run for this role",
-      "rails",
-      "unicorn"
-    ]
-  },
-  "memcached_role": [
-    "name of the role used for the app-specific memcached server",
-    "my_app_memcached"
-  ],
-  "database_slave_role": [
-    "name of the role used by database slaves, typically named after the app, 'my_app_database_slave'",
-    "my_app_database_slave"
-  ],
-  "database_master_role": [
-    "name of the role used by database master, typically named after the app 'my_app_database_master'",
-    "my_app_database_master"
-  ],
-  "repository": "git@github.com:company/my_app.git",
-  "revision": {
-    "production": "commit hash, branch or tag to deploy"
-  },
-  "force": {
-    "production": "true or false w/o quotes to force deployment, see the rails.rb recipe"
-  },
-  "migrate": {
-    "production": "true or false boolean to force migration, see rails.rb recipe"
-  },
-  "databases": {
-    "production": {
-      "reconnect": "true",
-      "encoding": "utf8",
-      "username": "db_user",
-      "adapter": "mysql",
-      "password": "awesome_password",
-      "database": "db_name_production"
-    }
-  },
-  "mysql_root_password": {
-    "production": "password for the root user in mysql"
-  },
-  "mysql_debian_password": {
-    "production": "password for the debian-sys-maint user on ubuntu/debian"
-  },
-  "mysql_repl_password": {
-    "production": "password for the 'repl' user for replication."
-  },
-  "snapshots_to_keep": {
-    "production": "if using EBS, integer of the number of snapshots we're going to keep for this environment."
-  },
-  "deploy_key": "SSH private key used to deploy from a private git repository",
-  "deploy_to": "path to deploy, e.g. /srv/my_app",
-  "owner": "owner for the application files when deployed",
-  "group": "group for the application files when deployed",
-  "packages": {
-    "package_name": "specific packages required for installation at the OS level to run the app like libraries and specific version, e.g.",
-    "curl": "7.19.5-1ubuntu2"
-  },
-  "gems": {
-    "gem_name": "specific gems required for installation to run the application, and if a specific version is required, e.g.",
-    "rails": "2.3.5"
-  },
-  "memcached": {
-    "production": {
-      "namespace": "specify the memcache namespace, ie my_app_environment"
-    }
-  }
-}

+ 0 - 2
examples/environments

@@ -1,2 +0,0 @@
-name "production"
-description "Production environment"

+ 0 - 101
examples/templates/default/LocalSettings.php.erb

@@ -1,101 +0,0 @@
-<?php
-# This file was automatically generated by Chef.
-#
-# See includes/DefaultSettings.php for all configurable settings
-# and their default values, but don't forget to make changes in _this_
-# file, not there.
-#
-# Further documentation for configuration settings may be found at:
-# http://www.mediawiki.org/wiki/Manual:Configuration_settings
-
-# Protect against web entry
-if ( !defined( 'MEDIAWIKI' ) ) {
-	exit;
-}
-
-## Uncomment this to disable output compression
-# $wgDisableOutputCompression = true;
-
-## Basics
-$IP             = "<%= @path %>";
-
-## The URL base path to the directory containing the wiki;
-## defaults for all runtime URL paths are based off of this.
-## For more information on customizing the URLs please see:
-## http://www.mediawiki.org/wiki/Manual:Short_URL
-$wgScriptPath       = "";
-$wgScriptExtension  = ".php";
-
-## The relative URL path to the skins directory
-$wgStylePath        = "$wgScriptPath/skins";
-
-$wgLogo         ="http://chef-quick-starts.s3.amazonaws.com/mediawiki_opscode.png";
-
-## Database settings
-$wgDBtype       = "<%= @database['adapter'] %>";
-$wgDBserver     = "<%= @host %>";
-$wgDBname       = "<%= @database['database'] %>";
-$wgDBuser       = "<%= @database['username'] %>";
-$wgDBpassword   = "<%= @database['password'] %>";
-
-## Shared memory settings
-$wgMainCacheType    = CACHE_NONE;
-$wgMemCachedServers = array();
-
-## To enable image uploads, make sure the 'images' directory
-## is writable, then set this to true:
-$wgEnableUploads  = false;
-$wgUseImageMagick = true;
-$wgImageMagickConvertCommand = "/usr/bin/convert";
-
-# InstantCommons allows wiki to use images from http://commons.wikimedia.org
-$wgUseInstantCommons  = false;
-
-## If you use ImageMagick (or any other shell command) on a
-## Linux server, this will need to be set to the name of an
-## available UTF-8 locale
-$wgShellLocale = "en_US.utf8";
-
-## If you want to use image uploads under safe mode,
-## create the directories images/archive, images/thumb and
-## images/temp, and make them all writable. Then uncomment
-## this, if it's not already uncommented:
-#$wgHashedUploadDirectory = false;
-
-## If you have the appropriate support software installed
-## you can enable inline LaTeX equations:
-$wgUseTeX           = false;
-
-## Set $wgCacheDirectory to a writable directory on the web server
-## to make your wiki go slightly faster. The directory should not
-## be publically accessible from the web.
-#$wgCacheDirectory = "$IP/cache";
-
-# Site language code, should be one of ./languages/Language(.*).php
-$wgLanguageCode = "en";
-
-$wgSecretKey = "5bcf0c2322863d3ad09a001528c4a14492859a623bf574cdc773cd75ed7ce055";
-
-# Site upgrade key. Must be set to a string (default provided) to turn on the
-# web installer while LocalSettings.php is in place
-$wgUpgradeKey = "db81965ebefdff41";
-
-## Default skin: you can change the default skin. Use the internal symbolic
-## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook', 'vector':
-$wgDefaultSkin = "vector";
-
-## For attaching licensing metadata to pages, and displaying an
-## appropriate copyright notice / icon. GNU Free Documentation
-## License and Creative Commons licenses are supported so far.
-#$wgEnableCreativeCommonsRdf = true;
-$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
-$wgRightsUrl  = "";
-$wgRightsText = "";
-$wgRightsIcon = "";
-# $wgRightsCode = ""; # Not yet used
-
-# Path to the GNU diff3 utility. Used for conflict resolution.
-$wgDiff3 = "/usr/bin/diff3";
-
-# Enabled Extensions. Most extensions are enabled by including the base extension file here
-# but check specific extension documentation for more details

+ 0 - 76
examples/templates/default/wp-config.php.erb

@@ -1,76 +0,0 @@
-<?php
-/** 
- * The base configurations of the WordPress.
- *
- * This file has the following configurations: MySQL settings, Table Prefix,
- * Secret Keys, WordPress Language, and ABSPATH. You can find more information by
- * visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
- * wp-config.php} Codex page. You can get the MySQL settings from your web host.
- *
- * This file is used by the wp-config.php creation script during the
- * installation. You don't have to use the web site, you can just copy this file
- * to "wp-config.php" and fill in the values.
- *
- * @package WordPress
- */
-
-// ** MySQL settings - You can get this info from your web host ** //
-/** The name of the database for WordPress */
-define('DB_NAME', '<%= @database['database'] %>');
-
-/** MySQL database username */
-define('DB_USER', '<%= @database['username'] %>');
-
-/** MySQL database password */
-define('DB_PASSWORD', '<%= @database['password'] %>');
-
-/** MySQL hostname */
-define('DB_HOST', '<%= @host %>');
-
-/** Database Charset to use in creating database tables. */
-define('DB_CHARSET', 'utf8');
-
-/** The Database Collate type. Don't change this if in doubt. */
-define('DB_COLLATE', '');
-
-/**#@+
- * Authentication Unique Keys.
- *
- * Change these to different unique phrases!
- * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
- * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
- *
- * @since 2.6.0
- */
-define('AUTH_KEY', '<%= @app['wordpress']['auth_key'] %>');
-define('SECURE_AUTH_KEY', '<%= @app['wordpress']['secure_auth_key'] %>');
-define('LOGGED_IN_KEY', '<%= @app['wordpress']['logged_in_key'] %>');
-define('NONCE_KEY', '<%= @app['wordpress']['nonce_key'] %>');
-/**#@-*/
-
-/**
- * WordPress Database Table prefix.
- *
- * You can have multiple installations in one database if you give each a unique
- * prefix. Only numbers, letters, and underscores please!
- */
-$table_prefix  = 'wp_';
-
-/**
- * WordPress Localized Language, defaults to English.
- *
- * Change this to localize WordPress.  A corresponding MO file for the chosen
- * language must be installed to wp-content/languages. For example, install
- * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
- * language support.
- */
-define ('WPLANG', '');
-
-/* That's all, stop editing! Happy blogging. */
-
-/** WordPress absolute path to the Wordpress directory. */
-if ( !defined('ABSPATH') )
-	define('ABSPATH', dirname(__FILE__) . '/');
-
-/** Sets up WordPress vars and included files. */
-require_once(ABSPATH . 'wp-settings.php');

+ 0 - 30
recipes/default.rb

@@ -1,30 +0,0 @@
-#
-# Cookbook Name:: application
-# Recipe:: default
-#
-# Copyright 2009, 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,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-search(:apps) do |app|
-  (app["server_roles"] & node.run_list.roles).each do |app_role|
-    app["type"][app_role].each do |thing|
-      node.run_state[:current_app] = app
-      include_recipe "application::#{thing}"
-    end
-  end
-end
-
-node.run_state.delete(:current_app)
-

+ 0 - 196
recipes/django.rb

@@ -1,196 +0,0 @@
- #
-# Cookbook Name:: application
-# Recipe:: django
-#
-# Copyright 2011, 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,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-Chef::Log.warn "The application::django recipe is deprecated and will go away on Aug 1st. See the README for migration information."
-
-app = node.run_state[:current_app]
-
-include_recipe "python"
-
-###
-# You really most likely don't want to run this recipe from here - let the
-# default application recipe work it's mojo for you.
-###
-
-node.default[:apps][app['id']][node.chef_environment][:run_migrations] = false
-
-# the Django split-settings file name varies from project to project...+1 for standardization
-local_settings_full_path = app['local_settings_file'] || 'settings_local.py'
-local_settings_file_name = local_settings_full_path.split(/[\\\/]/).last
-
-## Create required directories
-
-directory app['deploy_to'] do
-  owner app['owner']
-  group app['group']
-  mode '0755'
-  recursive true
-end
-
-directory "#{app['deploy_to']}/shared" do
-  owner app['owner']
-  group app['group']
-  mode '0755'
-  recursive true
-end
-
-## Create a virtualenv for the app
-ve = python_virtualenv app['id'] do
-  path "#{app['deploy_to']}/shared/env"
-  action :create
-end
-
-## First, install any application specific packages
-if app['packages']
-  app['packages'].each do |pkg,ver|
-    package pkg do
-      action :install
-      version ver if ver && ver.length > 0
-    end
-  end
-end
-
-## Next, install any application specific gems
-if app['pips']
-  app['pips'].each do |pip,ver|
-    python_pip pip do
-      version ver if ver && ver.length > 0
-      virtualenv ve.path
-      action :install
-    end
-  end
-end
-
-if app.has_key?("deploy_key")
-  ruby_block "write_key" do
-    block do
-      f = ::File.open("#{app['deploy_to']}/id_deploy", "w")
-      f.print(app["deploy_key"])
-      f.close
-    end
-    not_if do ::File.exists?("#{app['deploy_to']}/id_deploy"); end
-  end
-
-  file "#{app['deploy_to']}/id_deploy" do
-    owner app['owner']
-    group app['group']
-    mode '0600'
-  end
-
-  template "#{app['deploy_to']}/deploy-ssh-wrapper" do
-    source "deploy-ssh-wrapper.erb"
-    owner app['owner']
-    group app['group']
-    mode "0755"
-    variables app.to_hash
-  end
-end
-
-if app["database_master_role"]
-  dbm = nil
-  # If we are the database master
-  if node.run_list.roles.include?(app["database_master_role"][0])
-    dbm = node
-  else
-  # Find the database master
-    results = search(:node, "role:#{app["database_master_role"][0]} AND chef_environment:#{node.chef_environment}", nil, 0, 1)
-    rows = results[0]
-    if rows.length == 1
-      dbm = rows[0]
-    end
-  end
-  
-  # we need the django version to render the correct type of settings.py file
-  django_version = 1.2
-  if app['pips'].has_key?('django') && !app['pips']['django'].strip.empty?
-    django_version = app['pips']['django'].to_f
-  end
-
-  # Assuming we have one...
-  if dbm
-    # local_settings.py
-    template "#{app['deploy_to']}/shared/#{local_settings_file_name}" do
-      source "settings.py.erb"
-      owner app["owner"]
-      group app["group"]
-      mode "644"
-      variables(
-        :host => (dbm.attribute?('cloud') ? dbm['cloud']['local_ipv4'] : dbm['ipaddress']),
-        :database => app['databases'][node.chef_environment],
-        :django_version => django_version
-      )
-    end
-  else
-    Chef::Log.warn("No node with role #{app["database_master_role"][0]}, #{local_settings_file_name} not rendered!")
-  end
-end
-
-## Then, deploy
-deploy_revision app['id'] do
-  revision app['revision'][node.chef_environment]
-  repository app['repository']
-  user app['owner']
-  group app['group']
-  deploy_to app['deploy_to']
-  action app['force'][node.chef_environment] ? :force_deploy : :deploy
-  ssh_wrapper "#{app['deploy_to']}/deploy-ssh-wrapper" if app['deploy_key']
-  shallow_clone true
-  purge_before_symlink([])
-  create_dirs_before_symlink([])
-  symlinks({})
-  before_migrate do
-    requirements_file = nil
-    # look for requirements.txt files in common locations
-    if ::File.exists?(::File.join(release_path, "requirements", "#{node.chef_environment}.txt"))
-      requirements_file = ::File.join(release_path, "requirements", "#{node.chef_environment}.txt")
-    elsif ::File.exists?(::File.join(release_path, "requirements.txt"))
-      requirements_file = ::File.join(release_path, "requirements.txt")
-    end
-    
-    if requirements_file
-      Chef::Log.info("Installing pips using requirements file: #{requirements_file}")
-      pip_cmd = File.join(ve.path, "bin", "pip")
-      execute "#{pip_cmd} install -r #{requirements_file}" do
-        ignore_failure true
-        cwd release_path
-      end
-    end
-  end
-
-  symlink_before_migrate({
-    local_settings_file_name => local_settings_full_path
-  })
-
-  if app['migrate'][node.chef_environment] && node[:apps][app['id']][node.chef_environment][:run_migrations]
-    migrate true
-    migration_command app['migration_command'] || "#{::File.join(ve.path, "bin", "python")} manage.py migrate"
-  else
-    migrate false
-  end
-  before_symlink do
-    ruby_block "remove_run_migrations" do
-      block do
-        if node.role?("#{app['id']}_run_migrations")
-          Chef::Log.info("Migrations were run, removing role[#{app['id']}_run_migrations]")
-          node.run_list.remove("role[#{app['id']}_run_migrations]")
-        end
-      end
-    end
-  end
-end

+ 0 - 57
recipes/gunicorn.rb

@@ -1,57 +0,0 @@
-#
-# Cookbook Name:: application
-# Recipe:: gunicorn 
-#
-# Copyright 2011, 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,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-Chef::Log.warn "The application::gunicorn recipe is deprecated and will go away on Aug 1st. See the README for migration information."
-
-app = node.run_state[:current_app] 
-
-ve = resources(:python_virtualenv => app['id'])
-node.default[:gunicorn][:virtualenv] = ve.path
-
-include_recipe "gunicorn"
-
-node.default[:gunicorn][:worker_timeout] = 60
-node.default[:gunicorn][:preload_app] = false
-node.default[:gunicorn][:worker_processes] = [node[:cpu][:total].to_i * 4, 8].min
-node.default[:gunicorn][:server_hooks] = {:pre_fork => 'import time;time.sleep(1)'}
-node.default[:gunicorn][:port] = '8080'
-
-gunicorn_config "/etc/gunicorn/#{app['id']}.py" do
-  listen "#{node[:ipaddress]}:#{node[:gunicorn][:port]}"
-  worker_timeout node[:gunicorn][:worker_timeout] 
-  preload_app node[:gunicorn][:preload_app] 
-  worker_processes node[:gunicorn][:worker_processes]
-  server_hooks node[:gunicorn][:server_hooks]
-  action :create
-end
- 
-runit_service app['id'] do
-  template_name 'gunicorn'
-  cookbook 'application'
-  options('app' => app, 'virtualenv' => ve.path)
-  run_restart false
-end
-
-if ::File.exists?(::File.join(app['deploy_to'], "current"))
-  d = resources(:deploy_revision => app['id'])
-  d.restart_command do
-    execute "/etc/init.d/#{app['id']} hup"
-  end
-end
-

+ 0 - 110
recipes/java_webapp.rb

@@ -1,110 +0,0 @@
-#
-# Cookbook Name:: application
-# Recipe:: java_webapp
-#
-# Copyright 2010-2011, 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,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-Chef::Log.warn "The application::java_webapp recipe is deprecated and will go away on Aug 1st. See the README for migration information."
-
-app = node.run_state[:current_app]
-
-###
-# You really most likely don't want to run this recipe from here - let the
-# default application recipe work it's mojo for you.
-###
-
-node.default[:apps][app['id']][node.chef_environment][:run_migrations] = false
-
-## First, install any application specific packages
-if app['packages']
-  app['packages'].each do |pkg,ver|
-    package pkg do
-      action :install
-      version ver if ver && ver.length > 0
-    end
-  end
-end
-
-directory app['deploy_to'] do
-  owner app['owner']
-  group app['group']
-  mode '0755'
-  recursive true
-end
-
-directory "#{app['deploy_to']}/releases" do
-  owner app['owner']
-  group app['group']
-  mode '0755'
-  recursive true
-end
-
-directory "#{app['deploy_to']}/shared" do
-  owner app['owner']
-  group app['group']
-  mode '0755'
-  recursive true
-end
-
-%w{ log pids system }.each do |dir|
-
-  directory "#{app['deploy_to']}/shared/#{dir}" do
-    owner app['owner']
-    group app['group']
-    mode '0755'
-    recursive true
-  end
-
-end
-
-if app["database_master_role"]
-  dbm = nil
-  # If we are the database master
-  if node.run_list.roles.include?(app["database_master_role"][0])
-    dbm = node
-  else
-  # Find the database master
-    results = search(:node, "role:#{app["database_master_role"][0]} AND chef_environment:#{node.chef_environment}", nil, 0, 1)
-    rows = results[0]
-    if rows.length == 1
-      dbm = rows[0]
-    end
-  end
-
-  # Assuming we have one...
-  if dbm
-    template "#{app['deploy_to']}/shared/#{app['id']}.xml" do
-      source "context.xml.erb"
-      owner app["owner"]
-      group app["group"]
-      mode "644"
-      variables(
-        :host => (dbm.attribute?('cloud') ? dbm['cloud']['local_ipv4'] : dbm['ipaddress']),
-        :app => app['id'],
-        :database => app['databases'][node.chef_environment],
-        :war => "#{app['deploy_to']}/releases/#{app['war'][node.chef_environment]['checksum']}.war"
-      )
-    end
-  end
-end
-
-## Then, deploy
-remote_file app['id'] do
-  path "#{app['deploy_to']}/releases/#{app['war'][node.chef_environment]['checksum']}.war"
-  source app['war'][node.chef_environment]['source']
-  mode "0644"
-  checksum app['war'][node.chef_environment]['checksum']
-end

+ 0 - 55
recipes/mod_php_apache2.rb

@@ -1,55 +0,0 @@
-#
-# Cookbook Name:: application
-# Recipe:: mod_php_apache2
-#
-# Copyright 2011, 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,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-Chef::Log.warn "The application::mod_php_apache2 recipe is deprecated and will go away on Aug 1st. See the README for migration information."
-
-app = node.run_state[:current_app]
-
-node.default['apache']['listen_ports'] = [ "8080" ]
-
-include_recipe "apache2"
-include_recipe "apache2::mod_rewrite"
-include_recipe "apache2::mod_deflate"
-include_recipe "apache2::mod_headers"
-include_recipe "apache2::mod_php5"
-
-server_aliases = [ "#{app['id']}.#{node['domain']}", node['fqdn'] ]
-
-if node.has_key?("cloud")
-  server_aliases << node['cloud']['public_hostname']
-end
-
-web_app app['id'] do
-  docroot "#{app['deploy_to']}/current"
-  template 'php.conf.erb'
-  server_name "#{app['id']}.#{node['domain']}"
-  server_aliases server_aliases
-  log_dir node['apache']['log_dir']
-end
-
-if ::File.exists?(::File.join(app['deploy_to'], "current"))
-  d = resources(:deploy_revision => app['id'])
-  d.restart_command do
-    service "apache2" do action :restart; end
-  end
-end
-
-apache_site "000-default" do
-  enable false
-end

+ 0 - 54
recipes/passenger_apache2.rb

@@ -1,54 +0,0 @@
-#
-# Cookbook Name:: application
-# Recipe:: passenger_apache2
-#
-# Copyright 2010, 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,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-Chef::Log.warn "The application::passenger_apache2 recipe is deprecated and will go away on Aug 1st. See the README for migration information."
-
-app = node.run_state[:current_app] 
-
-include_recipe "apache2"
-include_recipe "apache2::mod_ssl"
-include_recipe "apache2::mod_rewrite"
-include_recipe "passenger_apache2::mod_rails"
-
-server_aliases = [ "#{app['id']}.#{node['domain']}", node['fqdn'] ]
-
-if node.has_key?("cloud")
-  server_aliases << node['cloud']['public_hostname']
-end
-  
-web_app app['id'] do
-  docroot "#{app['deploy_to']}/current/public"
-  template "#{app['id']}.conf.erb"
-  cookbook "#{app['id']}"
-  server_name "#{app['id']}.#{node[:domain]}"
-  server_aliases server_aliases
-  log_dir node[:apache][:log_dir]
-  rails_env node.chef_environment
-end
-
-if ::File.exists?(::File.join(app['deploy_to'], "current"))
-  d = resources(:deploy_revision => app['id'])
-  d.restart_command do
-    service "apache2" do action :restart; end
-  end
-end
-
-apache_site "000-default" do
-  enable false
-end

+ 0 - 146
recipes/php.rb

@@ -1,146 +0,0 @@
-#
-# Cookbook Name:: application
-# Recipe:: php
-#
-# Copyright 2011, 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,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-Chef::Log.warn "The application::php recipe is deprecated and will go away on Aug 1st. See the README for migration information."
-
-app = node.run_state[:current_app]
-
-include_recipe "php"
-
-###
-# You really most likely don't want to run this recipe from here - let the
-# default application recipe work it's mojo for you.
-###
-
-node.default['apps'][app['id']][node.chef_environment]['run_migrations'] = false
-
-# the PHP projects have no standard local settings file name..or path in the project
-local_settings_full_path = app['local_settings_file'] || 'LocalSettings.php'
-local_settings_file_name = local_settings_full_path.split(/[\\\/]/).last
-
-## First, install any application specific packages
-if app['packages']
-  app['packages'].each do |pkg,ver|
-    package pkg do
-      action :install
-      version ver if ver && ver.length > 0
-    end
-  end
-end
-
-## Next, install any application specific gems
-if app['pears']
-  app['pears'].each do |pear,ver|
-    php_pear pear do
-      action :install
-      version ver if ver && ver.length > 0
-    end
-  end
-end
-
-directory app['deploy_to'] do
-  owner app['owner']
-  group app['group']
-  mode '0755'
-  recursive true
-end
-
-directory "#{app['deploy_to']}/shared" do
-  owner app['owner']
-  group app['group']
-  mode '0755'
-  recursive true
-end
-
-if app.has_key?("deploy_key")
-  ruby_block "write_key" do
-    block do
-      f = ::File.open("#{app['deploy_to']}/id_deploy", "w")
-      f.print(app["deploy_key"])
-      f.close
-    end
-    not_if do ::File.exists?("#{app['deploy_to']}/id_deploy"); end
-  end
-
-  file "#{app['deploy_to']}/id_deploy" do
-    owner app['owner']
-    group app['group']
-    mode '0600'
-  end
-
-  template "#{app['deploy_to']}/deploy-ssh-wrapper" do
-    source "deploy-ssh-wrapper.erb"
-    owner app['owner']
-    group app['group']
-    mode "0755"
-    variables app.to_hash
-  end
-end
-
-if app["database_master_role"]
-  dbm = nil
-  # If we are the database master
-  if node.run_list.roles.include?(app["database_master_role"][0])
-    dbm = node
-  else
-  # Find the database master
-    results = search(:node, "role:#{app["database_master_role"][0]} AND chef_environment:#{node.chef_environment}", nil, 0, 1)
-    rows = results[0]
-    if rows.length == 1
-      dbm = rows[0]
-    end
-  end
-
-  # Assuming we have one...
-  if dbm
-    template "#{app['deploy_to']}/shared/#{local_settings_file_name}" do
-      source "#{local_settings_file_name}.erb"
-      cookbook app["id"]
-      owner app["owner"]
-      group app["group"]
-      mode "644"
-      variables(
-        :path => "#{app['deploy_to']}/current",
-        :host => (dbm.attribute?('cloud') ? dbm['cloud']['local_ipv4'] : dbm['ipaddress']),
-        :database => app['databases'][node.chef_environment],
-        :app => app
-      )
-    end
-  else
-    Chef::Log.warn("No node with role #{app['database_master_role'][0]}, #{local_settings_file_name} not rendered!")
-  end
-end
-
-## Then, deploy
-deploy_revision app['id'] do
-  revision app['revision'][node.chef_environment]
-  repository app['repository']
-  user app['owner']
-  group app['group']
-  deploy_to app['deploy_to']
-  action app['force'][node.chef_environment] ? :force_deploy : :deploy
-  ssh_wrapper "#{app['deploy_to']}/deploy-ssh-wrapper" if app['deploy_key']
-  shallow_clone true
-  purge_before_symlink([])
-  create_dirs_before_symlink([])
-  symlinks({})
-  symlink_before_migrate({
-    local_settings_file_name => local_settings_full_path
-  })
-end

+ 0 - 218
recipes/rails.rb

@@ -1,218 +0,0 @@
-#
-# Cookbook Name:: application
-# Recipe:: rails
-#
-# Copyright 2009-2011, 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,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-Chef::Log.warn "The application::rails recipe is deprecated and will go away on Aug 1st. See the README for migration information."
-
-app = node.run_state[:current_app]
-
-# make the _default chef_environment look like the Rails production environment
-rails_env = (node.chef_environment =~ /_default/ ? "production" : node.chef_environment)
-node.run_state[:rails_env] = rails_env
-
-###
-# You really most likely don't want to run this recipe from here - let the
-# default application recipe work it's mojo for you.
-###
-
-node.default[:apps][app['id']][node.chef_environment][:run_migrations] = false
-
-## First, install any application specific packages
-if app['packages']
-  app['packages'].each do |pkg,ver|
-    package pkg do
-      action :install
-      version ver if ver && ver.length > 0
-    end
-  end
-end
-
-## Next, install any application specific gems
-if app['gems']
-  app['gems'].each do |gem,ver|
-    gem_package gem do
-      action :install
-      version ver if ver && ver.length > 0
-    end
-  end
-end
-
-directory app['deploy_to'] do
-  owner app['owner']
-  group app['group']
-  mode '0755'
-  recursive true
-end
-
-directory "#{app['deploy_to']}/shared" do
-  owner app['owner']
-  group app['group']
-  mode '0755'
-  recursive true
-end
-
-%w{ log pids system vendor_bundle }.each do |dir|
-
-  directory "#{app['deploy_to']}/shared/#{dir}" do
-    owner app['owner']
-    group app['group']
-    mode '0755'
-    recursive true
-  end
-
-end
-
-if app.has_key?("deploy_key")
-  ruby_block "write_key" do
-    block do
-      f = ::File.open("#{app['deploy_to']}/id_deploy", "w")
-      f.print(app["deploy_key"])
-      f.close
-    end
-    not_if do ::File.exists?("#{app['deploy_to']}/id_deploy"); end
-  end
-
-  file "#{app['deploy_to']}/id_deploy" do
-    owner app['owner']
-    group app['group']
-    mode '0600'
-  end
-
-  template "#{app['deploy_to']}/deploy-ssh-wrapper" do
-    source "deploy-ssh-wrapper.erb"
-    owner app['owner']
-    group app['group']
-    mode "0755"
-    variables app.to_hash
-  end
-end
-
-if app["database_master_role"]
-  dbm = nil
-  # If we are the database master
-  if node.run_list.roles.include?(app["database_master_role"][0])
-    dbm = node
-  else
-  # Find the database master
-    results = search(:node, "role:#{app["database_master_role"][0]} AND chef_environment:#{node.chef_environment}", nil, 0, 1)
-    rows = results[0]
-    if rows.length == 1
-      dbm = rows[0]
-    end
-  end
-
-  # Assuming we have one...
-  if dbm
-    template "#{app['deploy_to']}/shared/database.yml" do
-      source "database.yml.erb"
-      owner app["owner"]
-      group app["group"]
-      mode "644"
-      variables(
-        :host => (dbm.attribute?('cloud') ? dbm['cloud']['local_ipv4'] : dbm['ipaddress']),
-        :databases => app['databases'],
-        :rails_env => rails_env
-      )
-    end
-  else
-    Chef::Log.warn("No node with role #{app["database_master_role"][0]}, database.yml not rendered!")
-  end
-end
-
-if app["memcached_role"]
-  results = search(:node, "role:#{app["memcached_role"][0]} AND chef_environment:#{node.chef_environment} NOT hostname:#{node[:hostname]}")
-  if results.length == 0
-    if node.run_list.roles.include?(app["memcached_role"][0])
-      results << node
-    end
-  end
-  template "#{app['deploy_to']}/shared/memcached.yml" do
-    source "memcached.yml.erb"
-    owner app["owner"]
-    group app["group"]
-    mode "644"
-    variables(
-      :memcached_envs => app['memcached'],
-      :hosts => results.sort_by { |r| r.name }
-    )
-  end
-end
-
-## Then, deploy
-deploy_revision app['id'] do
-  revision app['revision'][node.chef_environment]
-  repository app['repository']
-  user app['owner']
-  group app['group']
-  deploy_to app['deploy_to']
-  environment 'RAILS_ENV' => rails_env
-  action app['force'][node.chef_environment] ? :force_deploy : :deploy
-  ssh_wrapper "#{app['deploy_to']}/deploy-ssh-wrapper" if app['deploy_key']
-  shallow_clone true
-  before_migrate do
-    if app['gems'].has_key?('bundler')
-      link "#{release_path}/vendor/bundle" do
-        to "#{app['deploy_to']}/shared/vendor_bundle"
-      end
-      common_groups = %w{development test cucumber staging production}
-      execute "bundle install --deployment --without #{(common_groups -([node.chef_environment])).join(' ')}" do
-        ignore_failure true
-        cwd release_path
-      end
-    elsif app['gems'].has_key?('bundler08')
-      execute "gem bundle" do
-        ignore_failure true
-        cwd release_path
-      end
-
-    elsif node.chef_environment && app['databases'].has_key?(node.chef_environment)
-      # chef runs before_migrate, then symlink_before_migrate symlinks, then migrations,
-      # yet our before_migrate needs database.yml to exist (and must complete before
-      # migrations).
-      #
-      # maybe worth doing run_symlinks_before_migrate before before_migrate callbacks,
-      # or an add'l callback.
-      execute "(ln -s ../../../shared/database.yml config/database.yml && rake gems:install); rm config/database.yml" do
-        ignore_failure true
-        cwd release_path
-      end
-    end
-  end
-
-  symlink_before_migrate({
-    "database.yml" => "config/database.yml",
-    "memcached.yml" => "config/memcached.yml"
-  })
-
-  if app['migrate'][node.chef_environment] && node[:apps][app['id']][node.chef_environment][:run_migrations]
-    migrate true
-    migration_command app['migration_command'] || "rake db:migrate"
-  else
-    migrate false
-  end
-  before_symlink do
-    ruby_block "remove_run_migrations" do
-      block do
-        if node.role?("#{app['id']}_run_migrations")
-          Chef::Log.info("Migrations were run, removing role[#{app['id']}_run_migrations]")
-          node.run_list.remove("role[#{app['id']}_run_migrations]")
-        end
-      end
-    end
-  end
-end

+ 0 - 41
recipes/tomcat.rb

@@ -1,41 +0,0 @@
-#
-# Cookbook Name:: application
-# Recipe:: tomcat 
-#
-# Copyright 2010, 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,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-Chef::Log.warn "The application::tomcat recipe is deprecated and will go away on Aug 1st. See the README for migration information."
-
-app = node.run_state[:current_app]
-
-include_recipe "tomcat"
-
-# remove ROOT application
-# TODO create a LWRP to enable/disable tomcat apps
-directory "#{node['tomcat']['webapp_dir']}/ROOT" do
-  recursive true
-  action :delete
-  not_if "test -L #{node['tomcat']['context_dir']}/ROOT.xml"
-end
-link "#{node['tomcat']['context_dir']}/ROOT.xml" do
-  to "#{app['deploy_to']}/shared/#{app['id']}.xml"
-  notifies :restart, resources(:service => "tomcat")
-end
-
-if ::File.symlink?(::File.join(node['tomcat']['context_dir'], "ROOT.xml"))
-  d = resources(:remote_file => app['id'])
-  d.notifies :restart, resources(:service => "tomcat")
-end

+ 0 - 60
recipes/unicorn.rb

@@ -1,60 +0,0 @@
-#
-# Cookbook Name:: application
-# Recipe:: unicorn 
-#
-# Copyright 2009, 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,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-Chef::Log.warn "The application::unicorn recipe is deprecated and will go away on Aug 1st. See the README for migration information."
-
-app = node.run_state[:current_app] 
-
-include_recipe "unicorn"
-
-node.default[:unicorn][:worker_timeout] = 60
-node.default[:unicorn][:preload_app] = false
-node.default[:unicorn][:worker_processes] = [node[:cpu][:total].to_i * 4, 8].min
-node.default[:unicorn][:preload_app] = false
-node.default[:unicorn][:before_fork] = 'sleep 1' 
-node.default[:unicorn][:port] = '8080'
-node.set[:unicorn][:options] = { :tcp_nodelay => true, :backlog => 100 }
-
-unicorn_config "/etc/unicorn/#{app['id']}.rb" do
-  listen({ node[:unicorn][:port] => node[:unicorn][:options] })
-  working_directory ::File.join(app['deploy_to'], 'current')
-  worker_timeout node[:unicorn][:worker_timeout] 
-  preload_app node[:unicorn][:preload_app] 
-  worker_processes node[:unicorn][:worker_processes]
-  before_fork node[:unicorn][:before_fork] 
-end
-
-runit_service app['id'] do
-  template_name 'unicorn'
-  cookbook 'application'
-  options(
-    :app => app,
-    :rails_env => node.run_state[:rails_env] || node.chef_environment,
-    :smells_like_rack => ::File.exists?(::File.join(app['deploy_to'], "current", "config.ru"))
-  )
-  run_restart false
-end
-
-if ::File.exists?(::File.join(app['deploy_to'], "current"))
-  d = resources(:deploy_revision => app['id'])
-  d.restart_command do
-    execute "/etc/init.d/#{app['id']} hup"
-  end
-end
-

+ 0 - 9
templates/default/context.xml.erb

@@ -1,9 +0,0 @@
-<Context docBase="<%= @war %>" path="/"
-        debug="5" reloadable="true" crossContext="true" allowLinking="true">
-  <Environment name="appEnvironment" value="<%= node.chef_environment %>"
-          type="java.lang.String" override="false"/>
-  <Resource name="jdbc/<%= @app %>" auth="Container" type="javax.sql.DataSource"
-               maxActive="<%= @database['max_active'] %>" maxIdle="<%= @database['max_idle'] %>" maxWait="<%= @database['max_wait'] %>"
-               username="<%= @database['username'] %>" password="<%= @database['password'] %>" driverClassName="<%= @database['driver'] %>"
-               url="jdbc:<%= @database['adapter'] %>://<%= @host %>:<%= @database['port'] %>/<%= @database['database'] %>"/>
-</Context>

+ 0 - 10
templates/default/database.yml.erb

@@ -1,10 +0,0 @@
-<%- @databases.each do |env, db| %>
-<%= (env =~ /_default/ ? "production" : env) %>:
-  adapter: <%= db['adapter'] %>
-  host: <%= @host %>
-  database: <%= db['database'] %>
-  username: <%= db['username'] %>
-  password: <%= db['password'] %>
-  encoding: <%= db.has_key?('encoding') ? db['encoding'] : 'utf8' %>
-  reconnect: true
-<%- end %>

+ 0 - 10
templates/default/memcached.yml.erb

@@ -1,10 +0,0 @@
-<%- @memcached_envs.each do |env, settings| %>
-<%= env %>:
-<%- settings.each do |k, v| %>
-  <%= k %>: <%= v %>
-<%- end %>
-  servers:
-<%- @hosts.each do |h| %>
-    - <%= h['ipaddress'] %>:<%= h['memcached']['port'] %>
-<%- end %>
-<%- end %>

+ 0 - 13
templates/default/myproj.conf.erb

@@ -1,13 +0,0 @@
-# nginx + passenger application vhost
-#
-# Generated by Chef for <%= node[:fqdn] %>
-# Local modifications will be overwritten.
-#
-server {
-  listen 80;
-  server_name <%= @server_name %><% @server_aliases.each do |a| %><%= " #{a}" %> <% end %>;
-  root <%= @docroot %>;
-  error_log <%= node[:nginx][:log_dir] %>/<%= @app %>-error.log;
-  access_log <%= node[:nginx][:log_dir] %>/<%= @app %>-access.log;
-  passenger_enabled on;
-}

+ 0 - 34
templates/default/php.conf.erb

@@ -1,34 +0,0 @@
-<VirtualHost *:8080>
-  ServerName <%= @params[:server_name] %>
-  ServerAlias <% @params[:server_aliases].each do |a| %><%= "#{a}" %> <% end %>
-  DocumentRoot <%= @params[:docroot] %>
-  RewriteEngine On
-  
-  <Directory <%= @params[:docroot] %>>
-    Options FollowSymLinks
-    AllowOverride None
-    Order allow,deny
-    Allow from all
-  </Directory>
-  
-  <Directory />
-    Options FollowSymLinks
-    AllowOverride None
-  </Directory>
-
-  <Location /server-status>
-    SetHandler server-status
-
-    Order Deny,Allow
-    Deny from all
-    Allow from 127.0.0.1
-  </Location>
-
-  LogLevel info
-  ErrorLog <%= node[:apache][:log_dir] %>/<%= @params[:name] %>-error.log
-  CustomLog <%= node[:apache][:log_dir] %>/<%= @params[:name] %>-access.log combined
-
-  RewriteEngine On
-  RewriteLog <%= node[:apache][:log_dir] %>/<%= @application_name %>-rewrite.log
-  RewriteLogLevel 0
-</VirtualHost>

+ 0 - 13
templates/default/rails_nginx_passenger.conf.erb

@@ -1,13 +0,0 @@
-# nginx + passenger application vhost
-#
-# Generated by Chef for <%= node[:fqdn] %>
-# Local modifications will be overwritten.
-#
-server {
-  listen 80;
-  server_name <%= @server_name %><% @server_aliases.each do |a| %><%= " #{a}" %> <% end %>;
-  root <%= @docroot %>;
-  error_log <%= node[:nginx][:log_dir] %>/<%= @app %>-error.log;
-  access_log <%= node[:nginx][:log_dir] %>/<%= @app %>-access.log;
-  passenger_enabled on;
-}

+ 0 - 19
templates/default/settings.py.erb

@@ -1,19 +0,0 @@
-<% if @django_version >= 1.2 -%>
-DATABASES = {
-    'default': {
-        'NAME': '<%= @database['database'] %>',
-        'ENGINE': 'django.db.backends.<%= @database['adapter'] %>',
-        'USER': '<%= @database['username'] %>',
-        'PASSWORD': '<%= @database['password'] %>',
-        'HOST': '<%= @host %>',
-        'PORT': '<%= @database['port']  %>'
-    }
-}
-<% else -%>
-DATABASE_ENGINE = '<%= @database['adapter'] %>'
-DATABASE_NAME = '<%= @database['database'] %>'
-DATABASE_USER = '<%= @database['username'] %>'
-DATABASE_PASSWORD = '<%= @database['password'] %>'
-DATABASE_HOST = '<%= @host %>'
-DATABASE_PORT = '<%= @database['port']  %>'
-<% end -%>

+ 0 - 2
templates/default/sv-gunicorn-log-run.erb

@@ -1,2 +0,0 @@
-#!/bin/sh
-exec svlogd -tt ./main

+ 0 - 10
templates/default/sv-gunicorn-run.erb

@@ -1,10 +0,0 @@
-#!/bin/bash
-# TODO make this more WSGI generic
-GUNICORN=<%= @options['virtualenv'] %>/bin/gunicorn_django
-ROOT=<%= @options['app']['deploy_to'] %>/current
-CONFIG=/etc/gunicorn/<%= @options['app']['id'] %>.py
-
-cd $ROOT
-
-exec 2>&1
-exec chpst -u <%= @options['app']['owner'] %>:<%= @options['app']['group'] %> $GUNICORN -c $CONFIG

+ 0 - 3
templates/default/sv-unicorn-log-run.erb

@@ -1,3 +0,0 @@
-#!/bin/sh
-exec svlogd -tt ./main
-

+ 0 - 7
templates/default/sv-unicorn-run.erb

@@ -1,7 +0,0 @@
-#!/bin/bash
-
-cd <%= @options[:app]['deploy_to'] %>/current
-
-exec 2>&1
-exec <%= node[:runit][:chpst_bin] %> -u <%= @options[:app]["owner"] %>:<%= @options[:app]["group"] %> <%= @options[:smells_like_rack] ? 'unicorn' : 'unicorn_rails' %> -E <%= @options[:rails_env] %> -c /etc/unicorn/<%= @options[:app]['id'] %>.rb
-