]> git.openstreetmap.org Git - chef.git/commitdiff
Use upstream packages for promscale extension
authorTom Hughes <tom@compton.nu>
Thu, 17 Feb 2022 13:35:00 +0000 (13:35 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 17 Feb 2022 13:35:00 +0000 (13:35 +0000)
cookbooks/prometheus/files/default/postgresql-14-promscale.so [deleted file]
cookbooks/prometheus/recipes/server.rb

diff --git a/cookbooks/prometheus/files/default/postgresql-14-promscale.so b/cookbooks/prometheus/files/default/postgresql-14-promscale.so
deleted file mode 100755 (executable)
index 434655f..0000000
Binary files a/cookbooks/prometheus/files/default/postgresql-14-promscale.so and /dev/null differ
index 2df77a603056074e814997e8b78ed09172f41915..75ade71beb7b22176cdd3eca3c0006dd75c76fc9 100644 (file)
@@ -104,6 +104,7 @@ package %w[
 ]
 
 promscale_version = "0.7.1"
+promscale_extension_version = "0.3.0"
 
 database_version = node[:timescaledb][:database_version]
 database_cluster = "#{database_version}/main"
@@ -124,11 +125,17 @@ directory "/opt/promscale" do
   mode "755"
 end
 
-cookbook_file "/usr/lib/postgresql/#{database_version}/lib/promscale.so" do
-  source "postgresql-#{database_version}-promscale.so"
+remote_file "#{cache_dir}/promscale_extension.pg#{database_version}.x86_64.deb" do
+  source "https://github.com/timescale/promscale_extension/releases/download/#{promscale_extension_version}/promscale_extension-#{promscale_extension_version}.pg#{database_version}.x86_64.deb"
   owner "root"
   group "root"
   mode "644"
+  backup false
+end
+
+dpkg_package "promscale-extension-postgresql-#{database_version}" do
+  source "#{cache_dir}/promscale_extension.pg#{database_version}.x86_64.deb"
+  version "#{promscale_extension_version}-1"
 end
 
 directory "/opt/promscale/bin" do