]> git.openstreetmap.org Git - chef.git/commitdiff
Add basic en.openstreetmap.town redirect service
authorGrant Slater <github@firefishy.com>
Tue, 28 Nov 2023 03:41:49 +0000 (03:41 +0000)
committerGrant Slater <github@firefishy.com>
Tue, 28 Nov 2023 03:41:49 +0000 (03:41 +0000)
.github/workflows/test-kitchen.yml
.kitchen.yml
cookbooks/foundation/recipes/mastodon.rb [new file with mode: 0644]
roles/naga.rb
test/integration/foundation-mastodon/inspec/apache_spec.rb [new file with mode: 0644]

index 95cbdc8781fee8595f5443d8840e962371778290..1b8541af5fcac1167398c44001a367007d7d4cc8 100644 (file)
@@ -42,6 +42,7 @@ jobs:
           - fail2ban
           - foundation-board
           - foundation-dwg
+          - foundation-mastodon
           - foundation-mwg
           - foundation-owg
           - foundation-welcome
index 5795b9c7fda8b38273c0f331c1302b603e94d5e9..cb1c2ffde050cb678aa9e1398e3041260ab53849 100644 (file)
@@ -86,6 +86,9 @@ suites:
   - name: blogs
     run_list:
       - recipe[blogs::default]
+  - name: chef
+    run_list:
+      - recipe[chef::default]
   - name: civicrm
     run_list:
       - recipe[civicrm::default]
@@ -153,6 +156,9 @@ suites:
   - name: foundation-dwg
     run_list:
       - recipe[foundation::dwg]
+  - name: foundation-mastodon
+    run_list:
+      - recipe[foundation::mastodon]
   - name: foundation-mwg
     run_list:
       - recipe[foundation::mwg]
diff --git a/cookbooks/foundation/recipes/mastodon.rb b/cookbooks/foundation/recipes/mastodon.rb
new file mode 100644 (file)
index 0000000..a1b2901
--- /dev/null
@@ -0,0 +1,25 @@
+#
+# Cookbook:: foundation
+# Recipe:: mastodon
+#
+# Copyright:: 2023, 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
+#
+#     https://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 "podman::apache"
+
+podman_site "en.openstreetmap.town" do
+  image "ghcr.io/openstreetmap/owg-website:latest"
+  aliases ["operations.openstreetmap.org", "operations.osm.org"]
+end
index 6ed3323f46d6e69913c03226c98bca2322931df8..4b8587fd9e294571528f34a183f9f024f969b71b 100644 (file)
@@ -40,6 +40,7 @@ run_list(
   "role[blogs]",
   "role[munin]",
   "role[switch2osm]",
+  "recipe[foundation::mastodon]",
   "recipe[foundation::owg]",
   "recipe[foundation::welcome]",
   "recipe[stateofthemap::container]",
diff --git a/test/integration/foundation-mastodon/inspec/apache_spec.rb b/test/integration/foundation-mastodon/inspec/apache_spec.rb
new file mode 100644 (file)
index 0000000..8006330
--- /dev/null
@@ -0,0 +1,18 @@
+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 }
+  its("protocols") { should cmp "tcp" }
+end
+
+describe port(443) do
+  it { should be_listening }
+  its("protocols") { should cmp "tcp" }
+end