Browse Source

WIP

pull/121/head
raucao 2 years ago
parent
commit
4889f40c6a
Signed by: raucao GPG Key ID: 9F88009D31D99C72
  1. 22
      environments/development.json
  2. 10
      site-cookbooks/kosmos-bitcoin/attributes/default.rb
  3. 5
      site-cookbooks/kosmos-bitcoin/recipes/snapd.rb

22
environments/development.json

@ -16,6 +16,28 @@
},
"kosmos-dirsrv": {
"master_hostname": "localhost"
},
"bitcoin": {
"conf": {
"testnet": 1,
"irc": 1,
"dnsseed": 1,
"upnp": 1,
"checkblocks": 10,
"checklevel": 1,
"txindex": 1,
"whitelist": "127.0.0.1",
"listen": 1,
"server": 1,
"rpcport": 8332,
"rpcssl": 0,
"rpcuser": "bitcoind",
"rpcbind": "127.0.0.1:8336",
"port": 8335,
"gen": 0,
"zmqpubrawblock": "tcp://127.0.0.1:8337",
"zmqpubrawtx": "tcp://127.0.0.1:8338"
}
}
}
}

10
site-cookbooks/kosmos-bitcoin/attributes/default.rb

@ -1,24 +1,22 @@
node.default['bitcoin']['username'] = 'bitcoind'
node.default['bitcoin']['usergroup'] = 'bitcoind'
node.default['bitcoin']['datadir'] = '/mnt/data/bitcoin'
node.default['bitcoin']['network'] = 'mainnet'
node.default['bitcoin']['conf'] = {
testnet: 0,
irc: 1,
dnsseed: 1,
upnp: 1,
checkblocks: 10,
checklevel: 1,
txindex: 1,
whitelist: "127.0.0.1",
whitelist: '127.0.0.1',
listen: 1,
server: 1,
rpcport: 8332,
rpcssl: 0,
rpcuser: 'bitcoind',
rpcbind: "127.0.0.1:8336",
port: 8335,
gen: 0,
zmqpubrawblock: "tcp://127.0.0.1:8337",
zmqpubrawtx: "tcp://127.0.0.1:8338"
zmqpubrawblock: 'tcp://127.0.0.1:8337',
zmqpubrawtx: 'tcp://127.0.0.1:8338'
}

5
site-cookbooks/kosmos-bitcoin/recipes/snapd.rb

@ -55,7 +55,7 @@ template "#{bitcoin_datadir}/bitcoin.conf" do
testnet_conf: node['bitcoin']['testnet_conf'],
regtest_conf: node['bitcoin']['regtest_conf']
action :create
# notifies :reload, "service[bitcoind]", :delayed
notifies :restart, "systemd_unit[bitcoind.service]", :delayed
end
directory bitcoin_snapdir do
@ -93,8 +93,7 @@ systemd_unit 'bitcoind.service' do
WantedBy: 'multi-user.target'
}
})
verify false
triggers_reload true
action :create
action [:create, :enable, :start]
end
Loading…
Cancel
Save