From 541599434deaf56b8118c12d3e4d7ea032a0f82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Tue, 9 May 2017 00:04:39 +0200 Subject: [PATCH] Update the mainnet recipe --- .../kosmos-parity/recipes/node_mainnet.rb | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/site-cookbooks/kosmos-parity/recipes/node_mainnet.rb b/site-cookbooks/kosmos-parity/recipes/node_mainnet.rb index c7ef644..924c1ab 100644 --- a/site-cookbooks/kosmos-parity/recipes/node_mainnet.rb +++ b/site-cookbooks/kosmos-parity/recipes/node_mainnet.rb @@ -7,6 +7,13 @@ # All rights reserved - Do Not Redistribute # +# Sets up a parity node running on the mainnet chain on port 8547 (behind +# nginx, with HTTPS) + +rpc_proxy_port = 8547 +rpc_port = 18547 +dapps_port = 8182 + credentials = Chef::EncryptedDataBagItem.load('credentials', 'parity') parity_node "mainnet" do @@ -17,14 +24,33 @@ parity_node "mainnet" do }, network: { port: 30305, + warp: true, }, rpc: { - port: 8547, + port: rpc_port, + cors: "*", + apis: ["web3", "net", "traces", "rpc", "eth"], + hosts: ["all"], }, dapps: { - port: 8092, + port: dapps_port, }, ui: { - port: 8182, + disable: true, + }, + websockets: { + disable: true, } + 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_mainnet" do + port rpc_proxy_port + protocol :tcp + command :allow + end end