diff --git a/nodes/bitcoin-2.json b/nodes/bitcoin-2.json index eb83606..fc6a2c9 100644 --- a/nodes/bitcoin-2.json +++ b/nodes/bitcoin-2.json @@ -20,6 +20,8 @@ "kosmos-bitcoin::source", "kosmos-bitcoin::lnd", "kosmos-bitcoin::dotnet", + "kosmos-bitcoin::nbxplorer", + "kosmos-bitcoin::btcpay", "apt::default", "timezone_iii::default", "timezone_iii::debian", diff --git a/roles/btcpay.rb b/roles/btcpay.rb index 42017d8..05749c1 100644 --- a/roles/btcpay.rb +++ b/roles/btcpay.rb @@ -2,4 +2,6 @@ name "btcpay" run_list %w( kosmos-bitcoin::dotnet + kosmos-bitcoin::nbxplorer + kosmos-bitcoin::btcpay ) diff --git a/site-cookbooks/kosmos-bitcoin/attributes/default.rb b/site-cookbooks/kosmos-bitcoin/attributes/default.rb index 29e39f5..c0d59b2 100644 --- a/site-cookbooks/kosmos-bitcoin/attributes/default.rb +++ b/site-cookbooks/kosmos-bitcoin/attributes/default.rb @@ -32,3 +32,10 @@ node.default['lnd']['source_dir'] = '/opt/lnd' node.default['dotnet']['ms_packages_src_url'] = "https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb" node.default['dotnet']['ms_packages_src_checksum'] = "4df5811c41fdded83eb9e2da9336a8dfa5594a79dc8a80133bd815f4f85b9991" +node.default['nbxplorer']['repo'] = 'https://github.com/dgarage/NBXplorer' +node.default['nbxplorer']['revision'] = 'latest' +node.default['nbxplorer']['source_dir'] = '/opt/nbxplorer' + +node.default['btcpay']['repo'] = 'https://github.com/btcpayserver/btcpayserver' +node.default['btcpay']['revision'] = 'latest' +node.default['btcpay']['source_dir'] = '/opt/btcpay' diff --git a/site-cookbooks/kosmos-bitcoin/recipes/btcpay.rb b/site-cookbooks/kosmos-bitcoin/recipes/btcpay.rb new file mode 100644 index 0000000..bb91106 --- /dev/null +++ b/site-cookbooks/kosmos-bitcoin/recipes/btcpay.rb @@ -0,0 +1,23 @@ +# +# Cookbook:: kosmos-bitcoin +# Recipe:: btcpay +# + +build_essential + +include_recipe "git" + +git node['nbxplorer']['source_dir'] do + repository node['nbxplorer']['repo'] + revision node['nbxplorer']['revision'] + action :sync + notifies :run, 'bash[build_nbxplorer]', :immediately +end + +bash 'build_nbxplorer' do + cwd node['nbxplorer']['source_dir'] + code <<-EOH + ./build.sh + EOH + action :nothing +end diff --git a/site-cookbooks/kosmos-bitcoin/recipes/nbxplorer.rb b/site-cookbooks/kosmos-bitcoin/recipes/nbxplorer.rb new file mode 100644 index 0000000..7d80d3a --- /dev/null +++ b/site-cookbooks/kosmos-bitcoin/recipes/nbxplorer.rb @@ -0,0 +1,23 @@ +# +# Cookbook:: kosmos-bitcoin +# Recipe:: btcpay +# + +build_essential + +include_recipe "git" + +git node['btcpay']['source_dir'] do + repository node['btcpay']['repo'] + revision node['btcpay']['revision'] + action :sync + notifies :run, 'bash[build_btcpay]', :immediately +end + +bash 'build_btcpay' do + cwd node['btcpay']['source_dir'] + code <<-EOH + ./build.sh + EOH + action :nothing +end