Add production environment, replication for garage

Also deploy a third node in a different data center
This commit is contained in:
Râu Cao
2022-11-24 20:01:18 +01:00
committed by Gitea
parent b5ff60214c
commit 20e6bdb7f9
8 changed files with 93 additions and 11 deletions

View File

@@ -1,9 +1,10 @@
node.default['garage']['version'] = '0.8.0'
node.default['garage']['checksum']['amd64'] = '66dd2ea1f677281a43e10eb619523b1b269f8fde9047ce8caa70958f3b13ca74'
node.default['garage']['s3_api_port'] = 3900
node.default['garage']['rpc_port'] = 3901
node.default['garage']['s3_web_port'] = 3902
node.default['garage']['admin_port'] = 3903
node.default['garage']['k2v_api_port'] = 3904
node.default['garage']['s3_api_root_domain'] = '.s3.garage.kosmos.org'
node.default['garage']['s3_web_root_domain'] = '.web.garage.kosmos.org'
node.default['garage']['version'] = '0.8.0'
node.default['garage']['checksum']['amd64'] = '66dd2ea1f677281a43e10eb619523b1b269f8fde9047ce8caa70958f3b13ca74'
node.default['garage']['s3_api_port'] = 3900
node.default['garage']['rpc_port'] = 3901
node.default['garage']['s3_web_port'] = 3902
node.default['garage']['admin_port'] = 3903
node.default['garage']['k2v_api_port'] = 3904
node.default['garage']['s3_api_root_domain'] = '.s3.garage.localhost'
node.default['garage']['s3_web_root_domain'] = '.web.garage.localhost'
node.default['garage']['replication_mode'] = 'none'

View File

@@ -30,7 +30,8 @@ template '/etc/garage.toml' do
s3_web_root_domain: node['garage']['s3_web_root_domain'] || '.web.garage.localhost',
k2v_api_port: node['garage']['k2v_api_port'],
admin_port: node['garage']['admin_port'],
admin_token: credentials['admin_token']
admin_token: credentials['admin_token'],
replication_mode: node['garage']['replication_mode']
notifies :restart, 'service[garage]', :delayed
end

View File

@@ -2,7 +2,7 @@ metadata_dir = "<%= @metadata_dir %>"
data_dir = "<%= @data_dir %>"
db_engine = "<%= @db_engine %>"
replication_mode = "none"
replication_mode = "<%= @replication_mode %>"
rpc_bind_addr = "[::]:<%= @rpc_port %>"
rpc_public_addr = "<%= @rpc_public_addr %>"