From f54869b461cdda92cdcf3b50161b36906a5605eb Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 1 Mar 2026 20:45:08 +0000 Subject: [PATCH] Drop unused kibana role and cookbook --- .github/workflows/test-kitchen.yml | 1 - .kitchen.yml | 3 - cookbooks/kibana/README.md | 3 - cookbooks/kibana/attributes/default.rb | 4 - cookbooks/kibana/metadata.rb | 11 -- cookbooks/kibana/recipes/default.rb | 110 ------------------ cookbooks/kibana/templates/default/apache.erb | 35 ------ roles/kibana.rb | 6 - test/data_bags/accounts/kibana.json | 6 - 9 files changed, 179 deletions(-) delete mode 100644 cookbooks/kibana/README.md delete mode 100644 cookbooks/kibana/attributes/default.rb delete mode 100644 cookbooks/kibana/metadata.rb delete mode 100644 cookbooks/kibana/recipes/default.rb delete mode 100644 cookbooks/kibana/templates/default/apache.erb delete mode 100644 roles/kibana.rb delete mode 100644 test/data_bags/accounts/kibana.json diff --git a/.github/workflows/test-kitchen.yml b/.github/workflows/test-kitchen.yml index 99239de9d..9127253d3 100644 --- a/.github/workflows/test-kitchen.yml +++ b/.github/workflows/test-kitchen.yml @@ -64,7 +64,6 @@ jobs: - ideditor - imagery-tiler - irc - - kibana - letsencrypt - mail - mailman diff --git a/.kitchen.yml b/.kitchen.yml index 3728d9eca..20955b588 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -274,9 +274,6 @@ suites: - name: irc run_list: - recipe[irc::default] - - name: kibana - run_list: - - recipe[kibana::default] - name: letsencrypt run_list: - recipe[letsencrypt::default] diff --git a/cookbooks/kibana/README.md b/cookbooks/kibana/README.md deleted file mode 100644 index 8f1644f44..000000000 --- a/cookbooks/kibana/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kibana Cookbook - -This cookbook installs Kibana, a web-based interface to elasticsearch. diff --git a/cookbooks/kibana/attributes/default.rb b/cookbooks/kibana/attributes/default.rb deleted file mode 100644 index bb431975a..000000000 --- a/cookbooks/kibana/attributes/default.rb +++ /dev/null @@ -1,4 +0,0 @@ -default[:kibana][:version] = "4.1.1" -default[:kibana][:sites] = {} - -default[:accounts][:users][:kibana][:status] = :role diff --git a/cookbooks/kibana/metadata.rb b/cookbooks/kibana/metadata.rb deleted file mode 100644 index ec3e6f4c6..000000000 --- a/cookbooks/kibana/metadata.rb +++ /dev/null @@ -1,11 +0,0 @@ -name "kibana" -maintainer "OpenStreetMap Administrators" -maintainer_email "admins@openstreetmap.org" -license "Apache-2.0" -description "Installs and configures a kibana server" - -version "1.0.0" -supports "ubuntu" -depends "accounts" -depends "apache" -depends "systemd" diff --git a/cookbooks/kibana/recipes/default.rb b/cookbooks/kibana/recipes/default.rb deleted file mode 100644 index 2085cdce2..000000000 --- a/cookbooks/kibana/recipes/default.rb +++ /dev/null @@ -1,110 +0,0 @@ -# -# Cookbook:: kibana -# Recipe:: default -# -# Copyright:: 2015, 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. -# - -require "yaml" - -include_recipe "accounts" -include_recipe "apache" - -apache_module "proxy_http" - -version = node[:kibana][:version] - -remote_file "#{Chef::Config[:file_cache_path]}/kibana-#{version}.tar.gz" do - source "https://download.elastic.co/kibana/kibana/kibana-#{version}-linux-x64.tar.gz" - not_if { ::File.exist?("/opt/kibana-#{version}/bin/kibana") } -end - -directory "/opt/kibana-#{version}" do - owner "root" - group "root" - mode "755" -end - -archive_file "#{Chef::Config[:file_cache_path]}/kibana-#{version}.tar.gz" do - destination "/opt/kibana-#{version}" - overwrite true - strip_components 1 - owner "root" - group "root" - not_if { ::File.exist?("/opt/kibana-#{version}/bin/kibana") } -end - -directory "/etc/kibana" do - owner "root" - group "root" - mode "755" -end - -directory "/var/run/kibana" do - owner "kibana" - group "kibana" - mode "755" -end - -directory "/var/log/kibana" do - owner "kibana" - group "kibana" - mode "755" -end - -systemd_service "kibana@" do - description "Kibana server" - after "network.target" - user "kibana" - exec_start "/opt/kibana-#{version}/bin/kibana -c /etc/kibana/%i.yml" - private_tmp true - private_devices true - protect_system "full" - protect_home true - no_new_privileges true - restart "on-failure" -end - -node[:kibana][:sites].each do |name, details| - file "/etc/kibana/#{name}.yml" do - content YAML.dump(YAML.safe_load_file("/opt/kibana-#{version}/config/kibana.yml").merge( - "port" => details[:port], - "host" => "127.0.0.1", - "elasticsearch_url" => details[:elasticsearch_url], - "pid_file" => "/var/run/kibana/#{name}.pid", - "log_file" => "/var/log/kibana/#{name}.log" - )) - owner "root" - group "root" - mode "644" - notifies :restart, "service[kibana@#{name}]" - end - - service "kibana@#{name}" do - action [:enable, :start] - supports :status => true, :restart => true, :reload => false - subscribes :restart, "systemd_service[kibana@]" - end - - ssl_certificate details[:site] do - domains details[:site] - notifies :reload, "service[apache2]" - end - - apache_site details[:site] do - template "apache.erb" - variables details.merge(:passwd => "/etc/kibana/#{name}.passwd") - end -end diff --git a/cookbooks/kibana/templates/default/apache.erb b/cookbooks/kibana/templates/default/apache.erb deleted file mode 100644 index 2121eeda2..000000000 --- a/cookbooks/kibana/templates/default/apache.erb +++ /dev/null @@ -1,35 +0,0 @@ -# DO NOT EDIT - This file is being maintained by Chef - - - ServerName <%= @site %> - ServerAdmin webmaster@openstreetmap.org - - CustomLog /var/log/apache2/<%= @site %>-access.log combined_extended - ErrorLog /var/log/apache2/<%= @site %>-error.log - - RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/ - Redirect permanent / https://<%= @site %>/ - - - - ServerName <%= @site %> - ServerAdmin webmaster@openstreetmap.org - - CustomLog /var/log/apache2/<%= @site %>-access.log combined_extended - ErrorLog /var/log/apache2/<%= @site %>-error.log - - SSLEngine on - SSLProxyEngine on - SSLCertificateFile /etc/ssl/certs/<%= @site %>.pem - SSLCertificateKeyFile /etc/ssl/private/<%= @site %>.key - - ProxyPass / http://127.0.0.1:<%= @port %>/ - - - AuthType basic - AuthName <%= @site %> - AuthBasicProvider file - AuthUserFile "<%= @passwd %>" - Require valid-user - - diff --git a/roles/kibana.rb b/roles/kibana.rb deleted file mode 100644 index d45d4e53f..000000000 --- a/roles/kibana.rb +++ /dev/null @@ -1,6 +0,0 @@ -name "kibana" -description "Role applied to all kibana servers" - -run_list( - "recipe[kibana]" -) diff --git a/test/data_bags/accounts/kibana.json b/test/data_bags/accounts/kibana.json deleted file mode 100644 index 1d2fc538b..000000000 --- a/test/data_bags/accounts/kibana.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "id": "kibana", - "uid": "521", - "comment": "Kibana", - "manage_home": false -} -- 2.39.5