57 lines
1.2 KiB
Ruby
57 lines
1.2 KiB
Ruby
#
|
|
# Cookbook Name:: kosmos-parity
|
|
# Recipe:: node_dev
|
|
#
|
|
# Copyright 2017, Kosmos
|
|
#
|
|
# All rights reserved - Do Not Redistribute
|
|
#
|
|
|
|
# Sets up a parity node running on the dev chain on port 8545 (behind nginx,
|
|
# with HTTPS)
|
|
|
|
rpc_proxy_port = 8545
|
|
rpc_port = 18545
|
|
|
|
parity_node "dev" do
|
|
password "parityparity"
|
|
config parity: {
|
|
chain: "dev",
|
|
no_download: true, # Don't Download Updates
|
|
},
|
|
network: {
|
|
port: 30303,
|
|
warp: true,
|
|
},
|
|
rpc: {
|
|
port: rpc_port,
|
|
cors: "*",
|
|
apis: ["web3", "net", "traces", "rpc", "eth"],
|
|
hosts: ["all"],
|
|
},
|
|
dapps: {
|
|
disable: true,
|
|
},
|
|
ui: {
|
|
disable: true,
|
|
},
|
|
websockets: {
|
|
disable: true,
|
|
},
|
|
mining: {
|
|
reseal_min_period: 0,
|
|
}
|
|
rpc_proxy_port rpc_proxy_port
|
|
end
|
|
|
|
# The firewall_rule doesn't appear to work inside a resource, that's why we're
|
|
# doing it here
|
|
unless node.chef_environment == "development"
|
|
include_recipe 'firewall'
|
|
firewall_rule "parity_dev" do
|
|
port rpc_proxy_port
|
|
protocol :tcp
|
|
command :allow
|
|
end
|
|
end
|