mode "750"
variables :s3_key => wal_secrets["s3_key"]
end
+
+remote_file "/usr/local/bin/wal-g" do
+ action :create
+ source "https://github.com/wal-g/wal-g/releases/download/v1.1/wal-g-pg-ubuntu-20.04-amd64"
+ owner "root"
+ group "root"
+ mode "755"
+end
+
+template "/usr/local/bin/openstreetmap-wal-g" do
+ source "wal-g.erb"
+ owner "root"
+ group "postgres"
+ mode "750"
+ variables :s3_key => wal_secrets["s3_key"]
+end
--- /dev/null
+#!/bin/sh
+
+# DO NOT EDIT - This file is being maintained by Chef
+
+export WALE_S3_PREFIX="s3://openstreetmap-wal/"
+export AWS_ACCESS_KEY_ID="AKIAIQX2LTDOBIW4CZUQ"
+export AWS_SECRET_ACCESS_KEY="<%= @s3_key %>"
+export AWS_REGION="eu-west-2"
+
+exec /usr/local/bin/wal-g "$@" < /dev/null