Bitcoin-related software upgrades #573
@@ -33,7 +33,6 @@
|
|||||||
"kosmos-bitcoin::c-lightning",
|
"kosmos-bitcoin::c-lightning",
|
||||||
"kosmos-bitcoin::lnd",
|
"kosmos-bitcoin::lnd",
|
||||||
"kosmos-bitcoin::lnd-scb-s3",
|
"kosmos-bitcoin::lnd-scb-s3",
|
||||||
"kosmos-bitcoin::boltz",
|
|
||||||
"kosmos-bitcoin::rtl",
|
"kosmos-bitcoin::rtl",
|
||||||
"kosmos-bitcoin::peerswap-lnd",
|
"kosmos-bitcoin::peerswap-lnd",
|
||||||
"kosmos_postgresql::hostsfile",
|
"kosmos_postgresql::hostsfile",
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ name "lnd"
|
|||||||
run_list %w(
|
run_list %w(
|
||||||
kosmos-bitcoin::lnd
|
kosmos-bitcoin::lnd
|
||||||
kosmos-bitcoin::lnd-scb-s3
|
kosmos-bitcoin::lnd-scb-s3
|
||||||
kosmos-bitcoin::boltz
|
|
||||||
kosmos-bitcoin::rtl
|
kosmos-bitcoin::rtl
|
||||||
kosmos-bitcoin::peerswap-lnd
|
kosmos-bitcoin::peerswap-lnd
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -59,17 +59,6 @@ node.default['lnd']['tor'] = {
|
|||||||
'skip-proxy-for-clearnet-targets' => 'true'
|
'skip-proxy-for-clearnet-targets' => 'true'
|
||||||
}
|
}
|
||||||
|
|
||||||
node.default['boltz']['repo'] = 'https://github.com/BoltzExchange/boltz-lnd.git'
|
|
||||||
node.default['boltz']['revision'] = 'v1.2.7'
|
|
||||||
node.default['boltz']['source_dir'] = '/opt/boltz'
|
|
||||||
node.default['boltz']['boltz_dir'] = "/home/#{node['bitcoin']['username']}/.boltz-lnd"
|
|
||||||
node.default['boltz']['grpc_host'] = '127.0.0.1'
|
|
||||||
node.default['boltz']['grpc_port'] = '9002'
|
|
||||||
node.default['boltz']['rest_disabled'] = 'false'
|
|
||||||
node.default['boltz']['rest_host'] = '127.0.0.1'
|
|
||||||
node.default['boltz']['rest_port'] = '9003'
|
|
||||||
node.default['boltz']['no_macaroons'] = 'false'
|
|
||||||
|
|
||||||
node.default['rtl']['repo'] = 'https://github.com/Ride-The-Lightning/RTL.git'
|
node.default['rtl']['repo'] = 'https://github.com/Ride-The-Lightning/RTL.git'
|
||||||
node.default['rtl']['revision'] = 'v0.15.2'
|
node.default['rtl']['revision'] = 'v0.15.2'
|
||||||
node.default['rtl']['host'] = '10.1.1.163'
|
node.default['rtl']['host'] = '10.1.1.163'
|
||||||
|
|||||||
@@ -1,87 +0,0 @@
|
|||||||
#
|
|
||||||
# Cookbook:: kosmos-bitcoin
|
|
||||||
# Recipe:: boltz
|
|
||||||
#
|
|
||||||
|
|
||||||
include_recipe "git"
|
|
||||||
include_recipe "kosmos-bitcoin::golang"
|
|
||||||
|
|
||||||
git node['boltz']['source_dir'] do
|
|
||||||
repository node['boltz']['repo']
|
|
||||||
revision node['boltz']['revision']
|
|
||||||
action :sync
|
|
||||||
notifies :run, 'bash[compile_and_install_boltz]', :immediately
|
|
||||||
end
|
|
||||||
|
|
||||||
bash "compile_and_install_boltz" do
|
|
||||||
cwd node['boltz']['source_dir']
|
|
||||||
code <<-EOH
|
|
||||||
go mod vendor && \
|
|
||||||
make build && \
|
|
||||||
make install
|
|
||||||
EOH
|
|
||||||
action :nothing
|
|
||||||
notifies :restart, "systemd_unit[boltzd.service]", :delayed
|
|
||||||
end
|
|
||||||
|
|
||||||
bitcoin_user = node['bitcoin']['username']
|
|
||||||
bitcoin_group = node['bitcoin']['usergroup']
|
|
||||||
boltz_dir = node['boltz']['boltz_dir']
|
|
||||||
lnd_dir = node['lnd']['lnd_dir']
|
|
||||||
|
|
||||||
directory boltz_dir do
|
|
||||||
owner bitcoin_user
|
|
||||||
group bitcoin_group
|
|
||||||
mode '0750'
|
|
||||||
action :create
|
|
||||||
end
|
|
||||||
|
|
||||||
template "#{boltz_dir}/boltz.toml" do
|
|
||||||
source "boltz.toml.erb"
|
|
||||||
owner bitcoin_user
|
|
||||||
group bitcoin_group
|
|
||||||
mode '0640'
|
|
||||||
variables lnd_grpc_host: '127.0.0.1',
|
|
||||||
lnd_grpc_port: '10009',
|
|
||||||
lnd_macaroon_path: "#{lnd_dir}/data/chain/bitcoin/mainnet/admin.macaroon",
|
|
||||||
lnd_tlscert_path: "#{lnd_dir}/tls.cert",
|
|
||||||
boltz_config: node['boltz']
|
|
||||||
notifies :restart, "systemd_unit[boltzd.service]", :delayed
|
|
||||||
end
|
|
||||||
|
|
||||||
systemd_unit 'boltzd.service' do
|
|
||||||
content({
|
|
||||||
Unit: {
|
|
||||||
Description: 'Boltz Daemon',
|
|
||||||
Documentation: ['https://lnd.docs.boltz.exchange'],
|
|
||||||
Requires: 'lnd.service',
|
|
||||||
After: 'lnd.service'
|
|
||||||
},
|
|
||||||
Service: {
|
|
||||||
User: bitcoin_user,
|
|
||||||
Group: bitcoin_group,
|
|
||||||
Type: 'simple',
|
|
||||||
ExecStart: "/opt/boltz/boltzd",
|
|
||||||
Restart: 'always',
|
|
||||||
RestartSec: '30',
|
|
||||||
TimeoutSec: '240',
|
|
||||||
LimitNOFILE: '128000',
|
|
||||||
PrivateTmp: true,
|
|
||||||
ProtectSystem: 'full',
|
|
||||||
NoNewPrivileges: true,
|
|
||||||
PrivateDevices: true,
|
|
||||||
MemoryDenyWriteExecute: true
|
|
||||||
},
|
|
||||||
Install: {
|
|
||||||
WantedBy: 'multi-user.target'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
verify false
|
|
||||||
triggers_reload true
|
|
||||||
action [:create, :enable, :start]
|
|
||||||
end
|
|
||||||
|
|
||||||
unless node.chef_environment == 'development'
|
|
||||||
node.override['backup']['archives']['boltz'] = [node['boltz']['boltz_dir']]
|
|
||||||
include_recipe 'backup'
|
|
||||||
end
|
|
||||||
@@ -46,12 +46,6 @@ rtl_config = {
|
|||||||
multiPassHashed: credentials["multiPassHashed"]
|
multiPassHashed: credentials["multiPassHashed"]
|
||||||
}
|
}
|
||||||
|
|
||||||
if node['boltz']
|
|
||||||
# TODO adapt for multi-node usage
|
|
||||||
rtl_config[:nodes][0][:Authentication][:boltzMacaroonPath] = "#{node['boltz']['boltz_dir']}/macaroons"
|
|
||||||
rtl_config[:nodes][0][:Settings][:boltzServerUrl] = "https://#{node['boltz']['rest_host']}:#{node['boltz']['rest_port']}"
|
|
||||||
end
|
|
||||||
|
|
||||||
git rtl_dir do
|
git rtl_dir do
|
||||||
user bitcoin_user
|
user bitcoin_user
|
||||||
group bitcoin_group
|
group bitcoin_group
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
[LND]
|
|
||||||
# Host of the gRPC interface of LND
|
|
||||||
host = "<%= @lnd_grpc_host %>"
|
|
||||||
|
|
||||||
# Port of the gRPC interface of LND
|
|
||||||
port = <%= @lnd_grpc_port %>
|
|
||||||
|
|
||||||
# Path to a macaroon file of LND
|
|
||||||
# The daemon needs to have permission to read various endpoints, generate addresses and pay invoices
|
|
||||||
macaroon = "<%= @lnd_macaroon_path %>"
|
|
||||||
|
|
||||||
# Path to the TLS certificate of LND
|
|
||||||
certificate = "<%= @lnd_tlscert_path %>"
|
|
||||||
|
|
||||||
[RPC]
|
|
||||||
# Host of the gRPC interface
|
|
||||||
host = "<%= @boltz_config['grpc_host'] %>"
|
|
||||||
|
|
||||||
# Port of the gRPC interface
|
|
||||||
port = <%= @boltz_config['grpc_port'] %>
|
|
||||||
|
|
||||||
# Whether the REST proxy for the gRPC interface should be disabled
|
|
||||||
restDisabled = <%= @boltz_config['rest_disabled'] %>
|
|
||||||
|
|
||||||
# Host of the REST proxy
|
|
||||||
restHost = "<%= @boltz_config['rest_host'] %>"
|
|
||||||
|
|
||||||
# Port of the REST proxy
|
|
||||||
restPort = <%= @boltz_config['rest_port'] %>
|
|
||||||
|
|
||||||
# Whether the macaroon authentication for the gRPC and REST interface should be disabled
|
|
||||||
noMacaroons = <%= @boltz_config['no_macaroons'] %>
|
|
||||||
Reference in New Issue
Block a user