Commit 034f07e870b8c0c709d2f6be11ead771b386eb6e

Authored by Antonio Terceiro
1 parent ae35908e
Exists in master and in 90 other branches 3.x, add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup, backup_not_prod, cdtc_configuration, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, dev-lappis, dev_env_minimal, disable_email_dev, docs, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_api, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, performance, prezento, r3, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove-unused-images, remove_backup_emails, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_colab_config, sisp_dev, sisp_dev_master, sisp_simple_version, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_minimal_env, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, stable-4.x, stable-devel, support_docs, syslog, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_software_api, update_softwares_boxes

Mailman web ui

config/roles/integration_server.rb
... ... @@ -3,4 +3,4 @@ description "Server that runs COLAB (user authentication, visual integration and
3 3  
4 4 # TODO colab and mailman-api should be able to run in separate hosts at some
5 5 # point in the future
6   -run_list 'recipe[mailman-api]', 'recipe[mailman]', 'recipe[colab]', 'recipe[basics::nginx]', 'recipe[colab::nginx]'
  6 +run_list 'recipe[mailman-api]', 'recipe[mailman]', 'recipe[mailman::webui]', 'recipe[colab]', 'recipe[basics::nginx]', 'recipe[colab::nginx]'
... ...
cookbooks/mailman/files/centos/mailman.repo 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +[isv_spb_mailman]
  2 +name=mailman (CentOS_7)
  3 +type=rpm-md
  4 +baseurl=http://download.opensuse.org/repositories/isv:/spb:/mailman/CentOS_7/
  5 +gpgcheck=1
  6 +gpgkey=file:///etc/yum.repos.d/softwarepublico.key
  7 +enabled=1
... ...
cookbooks/mailman/files/centos/spawn-fcgi 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +SOCKET=/var/run/fcgiwrap.socket
  2 +OPTIONS="-u nginx -g apache -s $SOCKET -S -M 0600 -C 32 -F 1 -P /var/run/spawn-fcgi.pid -- /usr/sbin/fcgiwrap"
... ...
cookbooks/mailman/recipes/webui.rb 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +if node['platform'] == 'centos'
  2 + cookbook_file '/etc/yum.repos.d/mailman.repo' do
  3 + owner 'root'
  4 + mode 0644
  5 + end
  6 +end
  7 +
  8 +package 'fcgiwrap'
  9 +package 'spawn-fcgi'
  10 +
  11 +hostname = node['config']['lists_hostname']
  12 +template "/etc/nginx/conf.d/#{hostname}.conf" do
  13 + source 'mailman.conf.erb'
  14 + owner 'root'
  15 + group 'root'
  16 + mode 0644
  17 + notifies :restart, 'service[nginx]'
  18 +end
  19 +
  20 +cookbook_file '/etc/sysconfig/spawn-fcgi' do
  21 + owner 'root'
  22 + group 'root'
  23 + mode 0644
  24 + notifies :restart, 'service[spawn-fcgi]'
  25 +end
  26 +
  27 +service 'spawn-fcgi' do
  28 + action [:enable, :start]
  29 + supports :restart => true
  30 +end
... ...
cookbooks/mailman/templates/centos/mailman.conf.erb 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +server {
  2 + server_name <%= node['config']['lists_hostname'] %>;
  3 + listen 80;
  4 +
  5 + location = / {
  6 + rewrite ^ /mailman/cgi-bin/listinfo permanent;
  7 + }
  8 +
  9 + location / {
  10 + rewrite ^ /mailman/cgi-bin$uri?$args;
  11 + }
  12 +
  13 + location /mailman/cgi-bin/ {
  14 + root /usr/lib/;
  15 + fastcgi_split_path_info (^/mailman/cgi-bin/[^/]*)(.*)$;
  16 + include /etc/nginx/fastcgi_params;
  17 + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  18 + fastcgi_param PATH_INFO $fastcgi_path_info;
  19 + fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  20 + fastcgi_intercept_errors on;
  21 + fastcgi_pass unix:/var/run/fcgiwrap.socket;
  22 + }
  23 + location /icons {
  24 + alias /usr/lib/mailman/icons;
  25 + }
  26 + location /pipermail {
  27 + alias /var/lib/mailman/archives/public;
  28 + autoindex on;
  29 + }
  30 +}
... ...
cookbooks/mailman/templates/centos/mm_cfg.py.erb
... ... @@ -20,6 +20,7 @@ DEFAULT_URL_HOST = &#39;&lt;%= node[&#39;config&#39;][&#39;external_hostname&#39;] %&gt;&#39;
20 20 DEFAULT_EMAIL_HOST = '<%= node['config']['lists_hostname'] %>'
21 21 MTA = None
22 22 POSTFIX_STYLE_VIRTUAL_DOMAINS = ['<%= node['config']['lists_hostname']%>']
  23 +DEFAULT_URL_PATTERN = 'http://%s/mailman/cgi-bin/'
23 24  
24 25 ###############################################################
25 26 # copied from default mailman config file
... ...