chef/site-cookbooks/kosmos-parity/recipes/default.rb
Greg Karékinian e2b483eb3f Generate the config files using a TOML parser
Now we don't need to change both the template and the resources to add
options
2017-05-03 09:53:45 +02:00

88 lines
1.6 KiB
Ruby

#
# Cookbook Name:: kosmos-parity
# Recipe:: default
#
# Copyright 2017, Kosmos
#
# All rights reserved - Do Not Redistribute
#
group "parity" do
gid 72748
end
user "parity" do
system true
manage_home true
comment "parity user"
uid 72748
gid 72748
end
parity_version = node['kosmos-parity']['version']
parity_package_path = "#{Chef::Config[:file_cache_path]}/parity_#{parity_version}_amd64.deb"
remote_file parity_package_path do
source "https://d1h4xl4cr1h0mo.cloudfront.net/v#{parity_version}/x86_64-unknown-linux-gnu/parity_#{parity_version}_amd64.deb"
checksum node['kosmos-parity']['checksum']
mode 0750
notifies :install, "dpkg_package[parity]", :immediately
end
dpkg_package "parity" do
source parity_package_path
end
parity_node "dev" do
config parity: {
chain: "dev",
},
network: {
port: 30303,
},
rpc: {
port: 8545,
},
dapps: {
port: 8090,
},
ui: {
port: 8180,
}
end
parity_node "testnet" do
config parity: {
chain: "ropsten",
},
network: {
port: 30304,
},
rpc: {
port: 8546,
},
dapps: {
port: 8091,
},
ui: {
port: 8181,
}
end
parity_node "mainnet" do
config parity: {
chain: "homestead",
},
network: {
port: 30305,
},
rpc: {
port: 8547,
},
dapps: {
port: 8092,
},
ui: {
port: 8182,
}
end