key "8D0DC64F"
end
-apt_source "aw-drupal" do
- url "http://ppa.launchpad.net/aw/drupal/ubuntu"
- key "7D5AE8F6"
-end
-
apt_source "openstreetmap" do
url "http://ppa.launchpad.net/osmadmins/ppa/ubuntu"
key "0AC4F2CB"
+++ /dev/null
-Cookbook
-========
-TODO: Enter the cookbook description here.
-
-e.g.
-This cookbook makes your favorite breakfast sandwich.
-
-Requirements
-------------
-TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.
-
-Attributes
-----------
-TODO: List you cookbook attributes here.
-
-Usage
------
-TODO: Write usage instructions for each cookbook.
-
-Contributing
-------------
-TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
-
-e.g.
-1. Fork the repository on Github
-2. Create a named feature branch (like `add_component_x`)
-3. Write your change
-4. Write tests for your change (if applicable)
-5. Run the tests, ensuring they all pass
-6. Submit a Pull Request using Github
-
-License and Authors
--------------------
-Authors: TODO: List authors
+++ /dev/null
-default[:apt][:sources] |= [ "aw-drupal" ]
+++ /dev/null
-#
-# Cookbook Name:: drupal
-# Definition:: drupal_site
-#
-# Copyright 2011, OpenStreetMap Foundation
-#
-# 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.
-#
-
-define :drupal_site, :action => [ :create ], :variables => {} do
- site_name = params[:name]
- site_action = params[:action]
- site_title = params[:title] || site_name
- short_name = site_name.sub(/\..*$/, "")
- db_name = params[:database_name] || short_name
- db_username = params[:database_username] || short_name
- db_password = params[:database_password]
- db_url = "mysql://#{db_username}:#{db_password}@localhost/#{db_name}"
- admin_username = params[:admin_username] || "admin"
- admin_password = params[:admin_password]
- admin_email = params[:admin_email] || "webmaster@openstreetmap.org"
- ssl = params[:ssl] || false
-
- if site_action.include?(:create)
- directory "/data/#{site_name}" do
- owner "www-data"
- group "www-data"
- mode "0775"
- recursive true
- end
-
- directory "/data/#{site_name}/files" do
- owner "www-data"
- group "www-data"
- mode "0775"
- end
-
- directory "/data/#{site_name}/private" do
- owner "www-data"
- group "www-data"
- mode "0775"
- end
-
- directory "/etc/drupal/7/sites/#{site_name}" do
- owner "root"
- group "root"
- mode "0555"
- end
-
- link "/etc/drupal/7/sites/#{site_name}/files" do
- to "/data/#{site_name}/files"
- end
-
- link "/etc/drupal/7/sites/#{site_name}/private" do
- to "/data/#{site_name}/private"
- end
-
- execute "drupal-site-install-#{short_name}" do
- command "drush site-install --account-name=#{admin_username} --account-pass=#{admin_password} --account-mail=#{admin_email} --db-url=#{db_url} --site-name=#{site_title} --site-mail=webmaster@openstreetmap.org --sites-subdir=#{site_name} --yes"
- cwd "/usr/share/drupal7"
- user "root"
- group "root"
- creates "/etc/drupal/7/sites/#{site_name}/settings.php"
- end
-
- apache_site site_name do
- cookbook "drupal"
- template ssl ? "apache-ssl.erb" : "apache.erb"
- end
- elsif site_action.include?(:delete)
- end
-end
+++ /dev/null
-name "drupal"
-maintainer "OpenStreetMap Administrators"
-maintainer_email "admins@openstreetmap.org"
-license "Apache 2.0"
-description "Installs and configures Drupal"
-long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "1.0.0"
-depends "apache"
+++ /dev/null
-#
-# Cookbook Name:: drupal
-# Recipe:: default
-#
-# Copyright 2011, OpenStreetMap Foundation
-#
-# 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.
-#
-
-include_recipe "apache::ssl"
-
-package "drupal7"
-package "drush"
-
-apache_module "php5"
+++ /dev/null
-# DO NOT EDIT - This file is being maintained by Chef
-
-<VirtualHost *:80>
- ServerName <%= @name %>
- ServerAdmin webmaster@openstreetmap.org
-
- CustomLog /var/log/apache2/<%= @name %>-access.log combined
- ErrorLog /var/log/apache2/<%= @name %>-error.log
-
- RedirectPermanent / https://<%= @name %>/
-</VirtualHost>
-
-<VirtualHost *:443>
- ServerName <%= @name %>
- ServerAdmin webmaster@openstreetmap.org
-
- CustomLog /var/log/apache2/<%= @name %>-access.log combined
- ErrorLog /var/log/apache2/<%= @name %>-error.log
-
- DocumentRoot /usr/share/drupal7
-
- SSLEngine on
-</VirtualHost>
+++ /dev/null
-# DO NOT EDIT - This file is being maintained by Chef
-
-<VirtualHost *:80>
- ServerName <%= @name %>
- ServerAdmin webmaster@openstreetmap.org
-
- CustomLog /var/log/apache2/<%= @name %>-access.log combined
- ErrorLog /var/log/apache2/<%= @name %>-error.log
-
- DocumentRoot /usr/share/drupal7
-</VirtualHost>