diff --git a/clients/rsk-mainnet-1.json b/clients/rsk-mainnet-1.json new file mode 100644 index 0000000..7422123 --- /dev/null +++ b/clients/rsk-mainnet-1.json @@ -0,0 +1,4 @@ +{ + "name": "rsk-mainnet-1", + "public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtavs6RQW6af9fWuEuhI1\nQa4Ff7Z1CfZ0fHz152UqUeUKatQ/psKVs5ULWDV/b69fSuNsUzkCny9OwtwyQB/F\n2U+vbv3/3As3z6i3V3q8q4ahCHd7tkMmxMLaWcdkfWbpupWTRkCEX+PSDKS0hdfp\n3EQKVA2FrqR0sSnnT+Q66kZw4/WJrNwtSLcps4D5OubG7xr/uUn3Vyv5qXvS/7kx\nGvMONs55qh64Gtc3FSFPEdVyZXasCMEWwXyadqzf+/qJtEYlK0Uy5E/u7CTsnmcH\n9TEiYVw0/6PomQ2HJfSlZVUUO007OliBHO9bWOwZ6qI5c53pt5KES0dyy6SQ4m+8\nawIDAQAB\n-----END PUBLIC KEY-----\n" +} \ No newline at end of file diff --git a/clients/rsk-testnet-2.json b/clients/rsk-testnet-2.json new file mode 100644 index 0000000..2739bd0 --- /dev/null +++ b/clients/rsk-testnet-2.json @@ -0,0 +1,4 @@ +{ + "name": "rsk-testnet-2", + "public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzG2bgL0n5Q7bTR4WYHOB\nZNOuRem/jjarU/bL0VKKn0JqD3PPDAnhq9gRn7H8SwyGoVFN60YGzu45O4c+SqN3\nCXN+FeFabigH2tKLxBz3kNDYTT/F1ErLLi/6ydrCV3tpddR5KTqLSOntojG8KNzc\nyG4rMV9ebCE1wDVxAFdEA+YDZS8YjP0nO5sLWFacA0ZTx27t5ugqZP1acjSvKzWs\nZ+ekX5Pbws/oUHyaqEEPdz7er4MTBm0bdkCHZbM7132oBcH/huJZhmTXFEdoy4ML\nhP4MWWSvwo66HDYjnaID82a8W1RJZZu2irbPHrfVlaFAh8VQk1T1kkUu0bMovT3V\nYQIDAQAB\n-----END PUBLIC KEY-----\n" +} \ No newline at end of file diff --git a/nodes/rsk-mainnet-1.json b/nodes/rsk-mainnet-1.json new file mode 100644 index 0000000..efc92a3 --- /dev/null +++ b/nodes/rsk-mainnet-1.json @@ -0,0 +1,57 @@ +{ + "name": "rsk-mainnet-1", + "normal": { + "knife_zero": { + "host": "10.1.1.137" + } + }, + "automatic": { + "fqdn": "rsk-mainnet-1", + "os": "linux", + "os_version": "5.4.0-1048-kvm", + "hostname": "rsk-mainnet-1", + "ipaddress": "192.168.122.233", + "roles": [ + "rsk_mainnet" + ], + "recipes": [ + "kosmos-base", + "kosmos-base::default", + "kosmos_rsk::rskj", + "apt::default", + "timezone_iii::default", + "timezone_iii::debian", + "ntp::default", + "ntp::apparmor", + "kosmos-base::systemd_emails", + "apt::unattended-upgrades", + "kosmos-base::firewall", + "kosmos-postfix::default", + "postfix::default", + "postfix::_common", + "postfix::_attributes", + "postfix::sasl_auth", + "hostname::default", + "firewall::default", + "chef-sugar::default" + ], + "platform": "ubuntu", + "platform_version": "20.04", + "cloud": null, + "chef_packages": { + "chef": { + "version": "17.6.18", + "chef_root": "/opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.6.18/lib", + "chef_effortless": null + }, + "ohai": { + "version": "17.6.0", + "ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.0.0/gems/ohai-17.6.0/lib/ohai" + } + } + }, + "run_list": [ + "recipe[kosmos-base]", + "role[rsk_mainnet]" + ] +} \ No newline at end of file diff --git a/nodes/rsk-testnet-2.json b/nodes/rsk-testnet-2.json new file mode 100644 index 0000000..5735317 --- /dev/null +++ b/nodes/rsk-testnet-2.json @@ -0,0 +1,57 @@ +{ + "name": "rsk-testnet-2", + "normal": { + "knife_zero": { + "host": "10.1.1.214" + } + }, + "automatic": { + "fqdn": "rsk-testnet-2", + "os": "linux", + "os_version": "5.4.0-1048-kvm", + "hostname": "rsk-testnet-2", + "ipaddress": "192.168.122.29", + "roles": [ + "rsk_testnet" + ], + "recipes": [ + "kosmos-base", + "kosmos-base::default", + "kosmos_rsk::rskj", + "apt::default", + "timezone_iii::default", + "timezone_iii::debian", + "ntp::default", + "ntp::apparmor", + "kosmos-base::systemd_emails", + "apt::unattended-upgrades", + "kosmos-base::firewall", + "kosmos-postfix::default", + "postfix::default", + "postfix::_common", + "postfix::_attributes", + "postfix::sasl_auth", + "hostname::default", + "firewall::default", + "chef-sugar::default" + ], + "platform": "ubuntu", + "platform_version": "20.04", + "cloud": null, + "chef_packages": { + "chef": { + "version": "17.6.18", + "chef_root": "/opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.6.18/lib", + "chef_effortless": null + }, + "ohai": { + "version": "17.6.0", + "ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.0.0/gems/ohai-17.6.0/lib/ohai" + } + } + }, + "run_list": [ + "recipe[kosmos-base]", + "role[rsk_testnet]" + ] +} \ No newline at end of file diff --git a/roles/parity.rb b/roles/parity.rb deleted file mode 100644 index 69e1f1a..0000000 --- a/roles/parity.rb +++ /dev/null @@ -1,6 +0,0 @@ -name 'parity' - -run_list %w( - recipe[kosmos-parity::from_package] - recipe[kosmos-parity::node_dev] -) diff --git a/roles/rsk_mainnet.rb b/roles/rsk_mainnet.rb new file mode 100644 index 0000000..cfa58c1 --- /dev/null +++ b/roles/rsk_mainnet.rb @@ -0,0 +1,11 @@ +name "rsk_mainnet" + +run_list %w( + kosmos_rsk::rskj +) + +override_attributes( + :rskj => { + :network => "mainnet" + } +) diff --git a/roles/rsk_testnet.rb b/roles/rsk_testnet.rb new file mode 100644 index 0000000..281b45d --- /dev/null +++ b/roles/rsk_testnet.rb @@ -0,0 +1,5 @@ +name "rsk_testnet" + +run_list %w( + kosmos_rsk::rskj +) diff --git a/site-cookbooks/kosmos_rsk/attributes/default.rb b/site-cookbooks/kosmos_rsk/attributes/default.rb index 48cc220..608edad 100644 --- a/site-cookbooks/kosmos_rsk/attributes/default.rb +++ b/site-cookbooks/kosmos_rsk/attributes/default.rb @@ -1,2 +1,2 @@ -node.default['rskj']['version'] = '2.2.0~focal' +node.default['rskj']['version'] = '3.0.1~focal' node.default['rskj']['network'] = 'testnet' diff --git a/site-cookbooks/kosmos_rsk/recipes/firewall.rb b/site-cookbooks/kosmos_rsk/recipes/firewall.rb new file mode 100644 index 0000000..b1c9bcf --- /dev/null +++ b/site-cookbooks/kosmos_rsk/recipes/firewall.rb @@ -0,0 +1,7 @@ +include_recipe 'firewall' + +firewall_rule 'rskj' do + port [4444,50505] + protocol :tcp + command :allow +end diff --git a/site-cookbooks/kosmos_rsk/recipes/rskj.rb b/site-cookbooks/kosmos_rsk/recipes/rskj.rb index 0ec4a5d..ea9a7ab 100644 --- a/site-cookbooks/kosmos_rsk/recipes/rskj.rb +++ b/site-cookbooks/kosmos_rsk/recipes/rskj.rb @@ -30,10 +30,4 @@ service "rsk" do action [:enable, :start] end -include_recipe 'firewall' - -firewall_rule 'rskj' do - port [4444,50505] - protocol :tcp - command :allow -end +include_recipe 'kosmos_rsk::firewall'