- hardware
- hot
- incron
+ - irc
- kibana
- letsencrypt
- logstash
- name: incron
run_list:
- recipe[incron::default]
+ - name: irc
+ run_list:
+ - recipe[irc::default]
- name: kibana
run_list:
- recipe[kibana::default]
+++ /dev/null
-# Cgiirc Cookbook
-
-This cookbook installs and configures the `cgiirc` program that powers the
-web interface to the OSM IRC channels, found at irc.openstreetmap.org
+++ /dev/null
-# DO NOT EDIT - This file is being maintained by Chef
-
-# CGI:IRC configuration file.
-#
-# Check /usr/share/doc/cgiirc/examples/cgiirc.config.full.gz
-# for more details.
-
-# Configure defaults
-default_server = irc.oftc.net
-default_port = 6667
-default_channel = #osm,#osm-dev,#osm-ewg,#osm-cwg,#osm-ar,#osm-asia,#osm-au,#osm-br,#osm-bw,#osm-by,#osm-ca,#osm-ch,#osm-cz,#osm-de,#osm-dk,#osm-es,#osm-fi,#osm-fr,#osm-gb,#osm-gr,#osm-gsoc,#osm-ht,#osm-ie,#osm-it,#osm-ke,#osm-latam,#osm-local,#osm-lv,#osm-nl,#osm-no,#osm-nominatim,#osm-pl,#osm-pt,#osm-ru,#osm.se,#osm-strategic,#osm-ua,#osm-us,#osm-za,#osm-zh,#osmf-gm,#osrm,#openrailwaymap,#hot
-default_name = CGI:IRC User
-default_nick = CGI???
-
-# Path to images
-image_path = /images
-
-# Paths to CGI scripts
-script_nph = nph-irc.cgi
-script_form = client-perl.cgi
-script_login = irc.cgi
-
-# Access control file
-ip_access_file = ipaccess
+++ /dev/null
-# DO NOT EDIT - This file is being maintained by Chef
-
-# CGI:IRC ipaccess file. (For CGI:IRC versions from 0.5.3).
-#
-# Check /usr/share/doc/cgiirc/examples/ipaccess.example
-# for more details.
-
-<% @blocks.each do |name,addresses| -%>
-# Block <%= name %>
-<% addresses.each do |address| -%>
-<%= address %> 0
-<% end -%>
-
-<% end -%>
-# Allow everybody.
-0.0.0.0/0
--- /dev/null
+# Irc Cookbook
+
+This cookbook installs and configures the irc.openstreetmap.org web site.
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>irc.openstreetmap.org</title>
+ <link rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <h1>irc.openstreetmap.org</h1>
+ <form method="get" action="https://webchat.oftc.net/">
+ <table>
+ <tr>
+ <th>Nickname</th>
+ <td><input name="nick" type="text" /></td>
+ </tr>
+ <tr>
+ <th>Channel</th>
+ <td>
+ <select name="channels">
+ <option value="#osm">#osm</option>
+ <option value="#osm-dev">#osm-dev</option>
+ <option value="#osm-ewg">#osm-ewg</option>
+ <option value="#osm-cwg">#osm-cwg</option>
+ <option value="#osm-ar">#osm-ar</option>
+ <option value="#osm-asia">#osm-asia</option>
+ <option value="#osm-au">#osm-au</option>
+ <option value="#osm-br">#osm-br</option>
+ <option value="#osm-bw">#osm-bw</option>
+ <option value="#osm-by">#osm-by</option>
+ <option value="#osm-ca">#osm-ca</option>
+ <option value="#osm-ch">#osm-ch</option>
+ <option value="#osm-cz">#osm-cz</option>
+ <option value="#osm-de">#osm-de</option>
+ <option value="#osm-dk">#osm-dk</option>
+ <option value="#osm-es">#osm-es</option>
+ <option value="#osm-fi">#osm-fi</option>
+ <option value="#osm-fr">#osm-fr</option>
+ <option value="#osm-gb">#osm-gb</option>
+ <option value="#osm-gr">#osm-gr</option>
+ <option value="#osm-gsoc">#osm-gsoc</option>
+ <option value="#osm-ht">#osm-ht</option>
+ <option value="#osm-ie">#osm-ie</option>
+ <option value="#osm-it">#osm-it</option>
+ <option value="#osm-ke">#osm-ke</option>
+ <option value="#osm-latam">#osm-latam</option>
+ <option value="#osm-local">#osm-local</option>
+ <option value="#osm-lv">#osm-lv</option>
+ <option value="#osm-nl">#osm-nl</option>
+ <option value="#osm-no">#osm-no</option>
+ <option value="#osm-nominatim">#osm-nominatim</option>
+ <option value="#osm-pl">#osm-pl</option>
+ <option value="#osm-pt">#osm-pt</option>
+ <option value="#osm-ru">#osm-ru</option>
+ <option value="#osm.se">#osm.se</option>
+ <option value="#osm-strategic">#osm-strategic</option>
+ <option value="#osm-ua">#osm-ua</option>
+ <option value="#osm-us">#osm-us</option>
+ <option value="#osm-za">#osm-za</option>
+ <option value="#osm-zh">#osm-zh</option>
+ <option value="#osmf-gm">#osmf-gm</option>
+ <option value="#osrm">#osrm</option>
+ <option value="#openrailwaymap">#openrailwaymap</option>
+ <option value="#hot">#hot</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <th></th>
+ <td><input type="submit" value="Connect" /></td>
+ </tr>
+ </table>
+ </form>
+ </body>
+</html>
--- /dev/null
+h1 {
+ display: inline-block;
+ text-align: center;
+}
+
+form {
+ display: inline-block;
+ text-align: center;
+}
-name "cgiirc"
+name "irc"
maintainer "OpenStreetMap Administrators"
maintainer_email "admins@openstreetmap.org"
license "Apache-2.0"
-description "Installs and configures cgiirc"
+description "Configures irc.openstreetmap.org"
version "1.0.0"
supports "ubuntu"
#
-# Cookbook:: cgiirc
+# Cookbook:: irc
# Recipe:: default
#
# Copyright:: 2011, OpenStreetMap Foundation
include_recipe "apache"
-blocks = data_bag_item("cgiirc", "blocks")
-
-package "cgiirc"
+ssl_certificate "irc.openstreetmap.org" do
+ domains ["irc.openstreetmap.org", "irc.osm.org"]
+ notifies :reload, "service[apache2]"
+end
-template "/etc/cgiirc/cgiirc.config" do
- source "cgiirc.config.erb"
+directory "/srv/irc.openstreetmap.org" do
owner "root"
group "root"
- mode 0o644
+ mode 0755
end
-template "/etc/cgiirc/ipaccess" do
- source "ipaccess.erb"
+remote_directory "/srv/irc.openstreetmap.org/html" do
+ source "html"
owner "root"
group "root"
- mode 0o644
- variables :blocks => blocks["addresses"]
-end
-
-ssl_certificate "irc.openstreetmap.org" do
- domains ["irc.openstreetmap.org", "irc.osm.org"]
- notifies :reload, "service[apache2]"
+ mode 0o755
+ files_owner "root"
+ files_group "root"
+ files_mode 0o644
end
apache_site "irc.openstreetmap.org" do
template "apache.erb"
+ directory "/srv/irc.openstreetmap.org/html"
variables :aliases => ["irc.osm.org"]
end
CustomLog /var/log/apache2/<%= @name %>-access.log combined
ErrorLog /var/log/apache2/<%= @name %>-error.log
- DocumentRoot /usr/lib/cgi-bin/cgiirc
- DirectoryIndex irc.cgi
- Alias /images /usr/share/images/cgiirc
-
- <Directory "/usr/lib/cgi-bin/cgiirc">
- AddHandler cgi-script .cgi
- Require all granted
- </Directory>
-
- <Directory "/usr/share/images/cgiirc">
- Require all granted
- </Directory>
-
- <IfModule mod_deflate.c>
- RemoveOutputFilter DEFLATE
- SetEnv no-gzip
- </IfModule>
+ DocumentRoot <%= @directory %>
</VirtualHost>
<% unless @aliases.empty? -%>
<% @aliases.each do |alias_name| -%>
ServerAlias <%= alias_name %>
<% end -%>
- ServerAdmin webmaster@openstreetmap.org
+ ServerAdmin webmaster@openstreetmap.org
- CustomLog /var/log/apache2/<%= @name %>-access.log combined
- ErrorLog /var/log/apache2/<%= @name %>-error.log
+ CustomLog /var/log/apache2/<%= @name %>-access.log combined
+ ErrorLog /var/log/apache2/<%= @name %>-error.log
- RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
- RedirectPermanent / https://<%= @name %>/
+ RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+ RedirectPermanent / https://<%= @name %>/
</VirtualHost>
+
+<Directory <%= @directory %>>
+ Require all granted
+</Directory>
description "Role applied to all IRC gateways"
run_list(
- "recipe[cgiirc]"
+ "recipe[irc]"
)
--- /dev/null
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("apache2") do
+ it { should be_installed }
+end
+
+describe service("apache2") do
+ it { should be_enabled }
+ it { should be_running }
+end
+
+describe port(80) do
+ it { should be_listening.with("tcp") }
+end
+
+describe port(443) do
+ it { should be_listening.with("tcp") }
+end