Fix/refactor bitcoind recipe, upgrade bitcoind to 0.21 #298
| @ -1,5 +1,5 @@ | ||||
| node.default['bitcoin']['version']   = '0.20.1' | ||||
| node.default['bitcoin']['checksum']  = '4bbd62fd6acfa5e9864ebf37a24a04bc2dcfe3e3222f056056288d854c53b978' | ||||
| node.default['bitcoin']['version']   = '0.21.0' | ||||
| node.default['bitcoin']['checksum']  = '1a91202c62ee49fb64d57a52b8d6d01cd392fffcbef257b573800f9289655f37' | ||||
| node.default['bitcoin']['username']  = 'satoshi' | ||||
| node.default['bitcoin']['usergroup'] = 'bitcoin' | ||||
| node.default['bitcoin']['network']   = 'mainnet' | ||||
| @ -35,7 +35,7 @@ node.default['c-lightning']['log_level'] = 'info' | ||||
| node.default['c-lightning']['public_ip'] = '148.251.237.73' | ||||
| 
 | ||||
| node.default['lnd']['repo'] = 'https://github.com/lightningnetwork/lnd' | ||||
| node.default['lnd']['revision'] = 'v0.11.1-beta' | ||||
| node.default['lnd']['revision'] = 'v0.12.0-beta' | ||||
| node.default['lnd']['source_dir'] = '/opt/lnd' | ||||
| node.default['lnd']['lnd_dir'] = "/home/#{node['bitcoin']['username']}/.lnd" | ||||
| node.default['lnd']['alias'] = 'ln2.kosmos.org' | ||||
|  | ||||
| @ -24,6 +24,7 @@ end | ||||
| bash "compile_c-lightning" do | ||||
|   cwd node['c-lightning']['source_dir'] | ||||
|   code <<-EOH | ||||
|     systemctl stop lightningd.service | ||||
|     ./configure | ||||
|     make | ||||
|     make install | ||||
|  | ||||
| @ -37,23 +37,25 @@ ark 'bitcoind' do | ||||
|   url "https://bitcoincore.org/bin/bitcoin-core-#{node['bitcoin']['version']}/bitcoin-#{node['bitcoin']['version']}.tar.gz" | ||||
|   checksum node['bitcoin']['checksum'] | ||||
|   action :put | ||||
|   notifies :run, 'execute[compile_bitcoin-core_dependencies]', :immediately | ||||
| end | ||||
| 
 | ||||
| execute "Compile bitcoin-core dependencies" do | ||||
| execute "compile_bitcoin-core_dependencies" do | ||||
|   cwd "/usr/local/bitcoind/depends" | ||||
|   command "make NO_QT=1" | ||||
|   not_if { ::File.directory?("/usr/local/bitcoind/depends/x86_64-pc-linux-gnu") } | ||||
|   action :nothing | ||||
|   notifies :run, 'bash[compile_bitcoin-core]', :immediately | ||||
| end | ||||
| 
 | ||||
| execute "Configure, compile bitcoin-core" do | ||||
| bash "compile_bitcoin-core" do | ||||
|   cwd "/usr/local/bitcoind" | ||||
|   # FIXME only executes first array item? | ||||
|   command [ | ||||
|     "./autogen.sh", | ||||
|     "./configure --prefix=$PWD/depends/x86_64-pc-linux-gnu", | ||||
|     "make" | ||||
|   ] | ||||
|   not_if { ::File.exist?("/usr/local/bitcoind/src/bitcoind") } | ||||
|   code <<-EOH | ||||
|     ./autogen.sh | ||||
|     ./configure --prefix=$PWD/depends/x86_64-pc-linux-gnu | ||||
|     make | ||||
|   EOH | ||||
|   action :nothing | ||||
|   notifies :restart, "systemd_unit[bitcoind.service]", :delayed | ||||
| end | ||||
| 
 | ||||
| link "/usr/local/bin/bitcoind" do | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user