Migrate ejabberd uploads to mod_s3_upload and Garage
In addition to installing and configuring the new module, this also enables public access to the S3 API via `bucket-name.s3.kosmos.org` as well as Web access on `bucket-name.web.s3.kosmos.org` (when enabled). Also includes some drive-by improvements to Chef attribute naming and usage. Co-authored-by: Greg Karékinian <greg@karekinian.com>
This commit is contained in:
@@ -77,7 +77,6 @@ listen:
|
||||
request_handlers:
|
||||
"/ws": ejabberd_http_ws
|
||||
"/bosh": mod_bosh
|
||||
"/upload": mod_http_upload
|
||||
"/admin": ejabberd_web_admin
|
||||
custom_headers:
|
||||
"Access-Control-Allow-Origin": "*"
|
||||
@@ -261,6 +260,22 @@ modules:
|
||||
mod_stream_mgmt: {}
|
||||
mod_s2s_dialback: {}
|
||||
mod_http_api: {}
|
||||
mod_muc_rtbl: {}
|
||||
mod_s3_upload:
|
||||
region: <%= @mod_s3_upload[:region] %>
|
||||
bucket_url: <%= @mod_s3_upload[:bucket_url] %>
|
||||
download_url: <%= @mod_s3_upload[:download_url] %>
|
||||
access_key_id: <%= @mod_s3_upload[:key_id] %>
|
||||
access_key_secret: <%= @mod_s3_upload[:secret_key] %>
|
||||
max_size: 104857600
|
||||
put_ttl: 600
|
||||
set_public: true
|
||||
service_name: 'S3 Upload'
|
||||
access: local
|
||||
hosts:
|
||||
<% @hosts.each do |host| -%>
|
||||
- "upload.<%= host[:name] %>"
|
||||
<% end -%>
|
||||
|
||||
allow_contrib_modules: true
|
||||
|
||||
|
||||
@@ -21,5 +21,5 @@ host_config:
|
||||
|
||||
append_host_config:
|
||||
"<%= @host[:name] %>":
|
||||
<%= @host[:append_host_config].chomp %>
|
||||
<%= @host[:append_host_config].chomp %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user