From: Tom Hughes Date: Thu, 28 Jul 2016 17:41:33 +0000 (+0100) Subject: Merge remote-tracking branch 'github/pull/74' X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/5dbcbc9fc104320252388249ad1fbb9984bb5339?hp=0901083e8a05bbeff9057698e1eb981e55e8ceab Merge remote-tracking branch 'github/pull/74' --- diff --git a/cookbooks/db/recipes/base.rb b/cookbooks/db/recipes/base.rb index 17dd43d11..ae0b21604 100644 --- a/cookbooks/db/recipes/base.rb +++ b/cookbooks/db/recipes/base.rb @@ -32,8 +32,14 @@ directory "/srv/www.openstreetmap.org" do mode 0o2775 end +ruby_version = if node[:lsb][:release].to_f >= 16.04 + "2.3" + else + "2.1" + end + rails_port "www.openstreetmap.org" do - ruby "2.1" + ruby ruby_version directory "/srv/www.openstreetmap.org/rails" user "rails" group "rails" @@ -47,11 +53,28 @@ rails_port "www.openstreetmap.org" do file_column_root "/store/rails" end -execute "/srv/www.openstreetmap.org/rails/db/functions/Makefile" do +db_version = node[:db][:cluster].split("/").first +pg_config = "/usr/lib/postgresql/#{db_version}/bin/pg_config" +function_directory = "/srv/www.openstreetmap.org/rails/db/functions/#{db_version}" + +directory function_directory do + owner "rails" + group "rails" + mode 0o755 +end + +execute function_directory do action :nothing - command "make" + command "make PG_CONFIG=#{pg_config} DESTDIR=#{function_directory}" cwd "/srv/www.openstreetmap.org/rails/db/functions" user "rails" group "rails" + subscribes :run, "directory[#{function_directory}]" subscribes :run, "git[/srv/www.openstreetmap.org/rails]" end + +link "/usr/lib/postgresql/#{db_version}/lib/libpgosm.so" do + to "#{function_directory}/libpgosm.so" + owner "root" + group "root" +end diff --git a/cookbooks/foundation/recipes/dwg.rb b/cookbooks/foundation/recipes/dwg.rb new file mode 100644 index 000000000..3fde37b17 --- /dev/null +++ b/cookbooks/foundation/recipes/dwg.rb @@ -0,0 +1,46 @@ +# +# Cookbook Name:: foundation +# Recipe:: dwg +# +# Copyright 2016, 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 "mediawiki" + +passwords = data_bag_item("foundation", "passwords") + +mediawiki_site "dwg.osmfoundation.org" do + sitename "OSMF Data Working Group Wiki" + metanamespace "OSMFDWG" + directory "/srv/dwg.osmfoundation.org" + ssl_enabled true + database_name "dwg-wiki" + database_user "dwg-wikiuser" + database_password passwords["dwg"]["database"] + admin_password passwords["dwg"]["admin"] + logo "/Wiki.png" + email_contact "webmaster@openstreetmap.org" + email_sender "webmaster@openstreetmap.org" + email_sender_name "OSMF Board Wiki" + private true + recaptcha_public_key "6LflIQATAAAAAMXyDWpba-FgipVzE-aGF4HIR59N" + recaptcha_private_key passwords["dwg"]["recaptcha"] +end + +cookbook_file "/srv/dwg.osmfoundation.org/Wiki.png" do + owner node[:mediawiki][:user] + group node[:mediawiki][:group] + mode 0o644 +end diff --git a/cookbooks/imagery/README.md b/cookbooks/imagery/README.md index d57898abe..151d7b461 100644 --- a/cookbooks/imagery/README.md +++ b/cookbooks/imagery/README.md @@ -1,3 +1,3 @@ # Imagery Cookbook -This installs various packages needed for aerial imagery processing. +This installs and configures various imagery sites and imagery layers. diff --git a/cookbooks/imagery/templates/default/nginx_imagery_layer_fragment.conf.erb b/cookbooks/imagery/templates/default/nginx_imagery_layer_fragment.conf.erb index 2160836e5..e527f1250 100644 --- a/cookbooks/imagery/templates/default/nginx_imagery_layer_fragment.conf.erb +++ b/cookbooks/imagery/templates/default/nginx_imagery_layer_fragment.conf.erb @@ -8,13 +8,14 @@ location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" { include fastcgi_params; fastcgi_param REQUEST_METHOD "GET"; fastcgi_param HTTP_PROXY ""; + fastcgi_read_timeout 300s; # Caching fastcgi_cache "fastcgi_cache_zone"; fastcgi_cache_key "<%= @layer %><%= @revision %> $request_method $1 $2 $3"; fastcgi_keep_conn on; fastcgi_cache_lock on; - fastcgi_cache_lock_timeout 30s; + fastcgi_cache_lock_timeout 60s; fastcgi_cache_valid 200 21d; fastcgi_cache_use_stale error timeout updating http_500 http_503; diff --git a/cookbooks/postgresql/providers/user.rb b/cookbooks/postgresql/providers/user.rb index 5a1402d40..5df0f3847 100644 --- a/cookbooks/postgresql/providers/user.rb +++ b/cookbooks/postgresql/providers/user.rb @@ -17,6 +17,8 @@ # limitations under the License. # +require "shellwords" + use_inline_resources def load_current_resource @@ -35,7 +37,7 @@ def load_current_resource end action :create do - password = new_resource.password ? "ENCRYPTED PASSWORD '#{new_resource.password}'" : "" + password = new_resource.password ? "ENCRYPTED PASSWORD '#{new_resource.password.shellescape}'" : "" superuser = new_resource.superuser ? "SUPERUSER" : "NOSUPERUSER" createdb = new_resource.createdb ? "CREATEDB" : "NOCREATEDB" createrole = new_resource.createrole ? "CREATEROLE" : "NOCREATEROLE" diff --git a/cookbooks/switch2osm/README.md b/cookbooks/switch2osm/README.md index 205739199..7275bd44d 100644 --- a/cookbooks/switch2osm/README.md +++ b/cookbooks/switch2osm/README.md @@ -1,34 +1,4 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# switch2osm cookbook -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 +This cookbook installs and configures the wordpress website that powers +[www.switch2osm.org](http://www.switch2osm.org) diff --git a/cookbooks/sysctl/README.md b/cookbooks/sysctl/README.md index 205739199..c154b579f 100644 --- a/cookbooks/sysctl/README.md +++ b/cookbooks/sysctl/README.md @@ -1,34 +1,5 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# sysctl cookbook -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 +This cookbook allows various sysctl settings to be controlled via attributes. +Settings can be added to node[:sysctl] attribute, and these are both updated +via `/proc/sys` and added to a template in `/etc/sysctl.d/` diff --git a/cookbooks/sysfs/README.md b/cookbooks/sysfs/README.md index 205739199..f7a221b22 100644 --- a/cookbooks/sysfs/README.md +++ b/cookbooks/sysfs/README.md @@ -1,34 +1,4 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# sysfs cookbook -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 +This cookbook installs and configures sysfs, which allows various kernel +configuration parameters to be tuned via node attributes. diff --git a/cookbooks/taginfo/README.md b/cookbooks/taginfo/README.md index 205739199..d116c60e0 100644 --- a/cookbooks/taginfo/README.md +++ b/cookbooks/taginfo/README.md @@ -1,34 +1,5 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# taginfo cookbook -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 +This cookbook installs and configures taginfo websites. The OSMF use this +cookbook to manage a global taginfo instance at +[taginfo.openstreetmap.org](http://taginfo.openstreetmap.org) diff --git a/cookbooks/thinkup/README.md b/cookbooks/thinkup/README.md index 205739199..0fc9b1f7a 100644 --- a/cookbooks/thinkup/README.md +++ b/cookbooks/thinkup/README.md @@ -1,34 +1,5 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# thinkup cookbook -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 +This cookbook installs and configures the +[thinkup.openstreetmap.org](http://thinkup.openstreetmap.org) social media +tracking website. diff --git a/cookbooks/tile/README.md b/cookbooks/tile/README.md index 205739199..c439d2fb4 100644 --- a/cookbooks/tile/README.md +++ b/cookbooks/tile/README.md @@ -1,34 +1,4 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# tile cookbook -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 +This cookbook installs and configures the mod_tile+renderd based tileservers +that power tile.openstreetmap.org diff --git a/cookbooks/tilecache/README.md b/cookbooks/tilecache/README.md index 205739199..496674686 100644 --- a/cookbooks/tilecache/README.md +++ b/cookbooks/tilecache/README.md @@ -1,34 +1,4 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# tilecache cookbook -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 +This cookbook installs and configures the tile caches for the +tile.openstreetmap.org tileservers. diff --git a/cookbooks/tilelog/README.md b/cookbooks/tilelog/README.md index 31f6f4d3b..1a6b5e720 100644 --- a/cookbooks/tilelog/README.md +++ b/cookbooks/tilelog/README.md @@ -1,9 +1,8 @@ -tilelog Cookbook -================ +# tilelog Cookbook + This cookbook contains the tile log processing / analysis tools. This includes creating the tile log summaries of the number of tiles downloaded from the tile caches. -Requirements ------------- +## Requirements #### cookbooks - `tools` - tilelog needs the OSM tools cookbook. @@ -18,9 +17,7 @@ Requirements - `libboost-system-dev` - a dependency of the analysis tool. - `libboost-program-options-dev` - a dependency of the analysis tool. - -Attributes ----------- +## Attributes #### tilelog::default @@ -50,8 +47,8 @@ Attributes
-Usage ------ +## Usage + #### tilelog::default TODO: Write usage instructions for each cookbook. @@ -67,8 +64,8 @@ Just include `tilelog` in your node's `run_list`: } ``` -License and Authors -------------------- +## License and Authors + Released under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0). Authors: Matt Amos diff --git a/cookbooks/tools/README.md b/cookbooks/tools/README.md index 205739199..9e7255e02 100644 --- a/cookbooks/tools/README.md +++ b/cookbooks/tools/README.md @@ -1,34 +1,4 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# tools cookbook -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 +This cookbook installs a variety of system administration tools, and removes +a few unnecessary ones. diff --git a/cookbooks/trac/README.md b/cookbooks/trac/README.md index 205739199..ccd6f1337 100644 --- a/cookbooks/trac/README.md +++ b/cookbooks/trac/README.md @@ -1,34 +1,4 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# trac cookbook -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 +This cookbook installs and configures the trac project management website found +at [trac.openstreetmap.org](trac.openstreetmap.org). diff --git a/cookbooks/web/README.md b/cookbooks/web/README.md index 205739199..2d881fc3e 100644 --- a/cookbooks/web/README.md +++ b/cookbooks/web/README.md @@ -1,34 +1,13 @@ -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 +# web cookbook + +This cookbook installs and configures the web frontend machines that power +[www.openstreetmap.org](http://www.openstreetmap.org). There are several recipes + +* `web::backend` - sets up the backend servers, used for processing longer-running requests +* `web::base` - sets up common storage configuration between all the machines +* `web::cgimap` - builds and configures [cgimap](https://github.com/openstreetmap/cgimap) +* `web::cleanup` - configures a cleanup script to be run daily +* `web::frontend` - sets up the frontend servers, that handle all inbound requests +* `web::gpx` - sets up the GPX importer +* `web::rails` - installs and configures the [openstreetmap-website](https://github.com/openstreetmap/openstreetmap-website) rails app +* `web::statistics` - sets up the scripts for generating the [statistics page](http://www.openstreetmap.org/stats/data_stats.html) for OSM contributions diff --git a/cookbooks/wiki/README.md b/cookbooks/wiki/README.md index 205739199..faa672347 100644 --- a/cookbooks/wiki/README.md +++ b/cookbooks/wiki/README.md @@ -1,34 +1,4 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# wiki cookbook -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 +This cookbook installs and configures the mediawiki instance that powers +[wiki.openstreetmap.org](https://wiki.openstreetmap.org) diff --git a/cookbooks/wordpress/README.md b/cookbooks/wordpress/README.md index 205739199..e3ab3250a 100644 --- a/cookbooks/wordpress/README.md +++ b/cookbooks/wordpress/README.md @@ -1,34 +1,4 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# wordpress cookbook -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 +This cookbook contains recipes, providers and libraries to install and configure +wordpress. It is used as a base cookbook by other wordpress site-specific cookbooks. diff --git a/cookbooks/xinetd/README.md b/cookbooks/xinetd/README.md index 205739199..f2dfdc58c 100644 --- a/cookbooks/xinetd/README.md +++ b/cookbooks/xinetd/README.md @@ -1,34 +1,5 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# xinetd cookbook -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 +This cookbook installs and manages the +[xinetd](https://en.wikipedia.org/wiki/Xinetd) service, which acts as +an internet daemon. diff --git a/cookbooks/yournavigation/README.md b/cookbooks/yournavigation/README.md index 205739199..e5755e671 100644 --- a/cookbooks/yournavigation/README.md +++ b/cookbooks/yournavigation/README.md @@ -1,34 +1,6 @@ -Cookbook -======== -TODO: Enter the cookbook description here. +# yournavigation cookbook -e.g. -This cookbook makes your favorite breakfast sandwich. +This cookbook builds and environment suitable for running gosmore as part of the +[YOURS](http://wiki.openstreetmap.org/wiki/YOURS) routing service. -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 +Note that the installation and configuration of gosmore itself is not covered by the cookbook. diff --git a/roles/foundation.rb b/roles/foundation.rb index 52c38f765..4926edeb2 100644 --- a/roles/foundation.rb +++ b/roles/foundation.rb @@ -29,5 +29,6 @@ run_list( "role[crm]", "role[elasticsearch]", "recipe[foundation::wiki]", - "recipe[foundation::board]" + "recipe[foundation::board]", + "recipe[foundation::dwg]" ) diff --git a/roles/karm.rb b/roles/karm.rb index 6d2f15e79..897b10d80 100644 --- a/roles/karm.rb +++ b/roles/karm.rb @@ -2,6 +2,12 @@ name "karm" description "Master role applied to karm" default_attributes( + :apt => { + :sources => ["postgresql"] + }, + :db => { + :cluster => "9.1/main" + }, :networking => { :interfaces => { :internal_ipv4 => { @@ -13,6 +19,25 @@ default_attributes( } } }, + :postgresql => { + :settings => { + :defaults => { + :shared_buffers => "64GB", + :work_mem => "64MB", + :maintenance_work_mem => "1GB", + :effective_cache_size => "180GB" + } + } + }, + :sysctl => { + :postgres => { + :comment => "Increase shared memory for postgres", + :parameters => { + "kernel.shmmax" => 66 * 1024 * 1024 * 1024, + "kernel.shmall" => 66 * 1024 * 1024 * 1024 / 4096 + } + } + }, :sysfs => { :md_tune => { :comment => "Enable request merging for NVMe devices", @@ -29,5 +54,6 @@ default_attributes( ) run_list( - "role[ic]" + "role[ic]", + "role[db-master]" )