Upgrade RSKj to 5.3.0, deploy new nodes

Adapted the cookbook for new nodes running on Jammy.
This commit is contained in:
Râu Cao 2023-11-04 15:04:29 +01:00
parent 3d3156a031
commit 925a5da239
Signed by: raucao
GPG Key ID: 15E65F399D084BA9
10 changed files with 146 additions and 10 deletions

View File

@ -0,0 +1,4 @@
{
"name": "rsk-mainnet-3",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwdrYfy0Spmt8VETCdUgW\nHbxV3uYA3kn2swvOdIjIR29gNO+t6wWv6FHnV/pfefIweIPaNlr9VMoUejUKX809\ngzdsiVWh1T6s4Yzbbt+O8mF3my5RXiSvizda8c6U65vofBSL2WVzE1AW9v7lXRHX\nJ4auKrpgKWkNLU52QLIP9/X5YLUHQtpTnplO31eb+jSD185aN1qoIxugunxnWSgm\n2NgUPlVbNCFrhv0PVv4Ts10eX6smRX3LKyNBtRRXM3GIrQHlAYRohIpy3lt8tKm4\nE/v9qpXQHvqEmX9FH1/Sonea849cWX3LuxUYLT2XFpaNwUxJK56Ef0HsgZESaxL+\n3QIDAQAB\n-----END PUBLIC KEY-----\n"
}

View File

@ -0,0 +1,4 @@
{
"name": "rsk-testnet-4",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1NgmlPomxGRtu5oyro+m\ndQwBXwrhEuE73aLrUsqGOVSezph6LnETiEMFUIe1weoG+xdcykcUUMt7o1+nKs+E\nl8dxMIgbXAxdpI4n8gOpii70Sh30BDbh8+qZHsKBq32UmkCpz2ViVe/Vb3ViqB3e\n0GIkknPle5G4IC612O8EUkCenwcD1jSXYyug5zWI2T/TwnTuw4JdxfhkMgBM7Y2n\nR1YY6GwAMkK97wE/yBM74+Tiv/6lDy/JDbYmUVcQ55C937oodSWLAEM24EcOOtMA\nKfGumnthbdHzmHjONmLIegD3OJGYC2ulcB9qmaL/7cyIRhf6fEQrBolCH5881fxl\nxwIDAQAB\n-----END PUBLIC KEY-----\n"
}

View File

@ -30,7 +30,6 @@
"kosmos-base", "kosmos-base",
"kosmos-base::default", "kosmos-base::default",
"kosmos_kvm::host", "kosmos_kvm::host",
"kosmos_kvm::backup",
"kosmos_openresty", "kosmos_openresty",
"kosmos_openresty::default", "kosmos_openresty::default",
"kosmos_openresty::firewall", "kosmos_openresty::firewall",
@ -63,6 +62,9 @@
"kosmos_zerotier::controller", "kosmos_zerotier::controller",
"kosmos_zerotier::firewall", "kosmos_zerotier::firewall",
"kosmos_zerotier::zncui", "kosmos_zerotier::zncui",
"kosmos-ejabberd::firewall",
"kosmos-ipfs::firewall_swarm",
"sockethub::firewall",
"apt::default", "apt::default",
"timezone_iii::default", "timezone_iii::default",
"timezone_iii::debian", "timezone_iii::debian",
@ -111,6 +113,10 @@
"role[base]", "role[base]",
"role[kvm_host]", "role[kvm_host]",
"role[openresty_proxy]", "role[openresty_proxy]",
"role[zerotier_controller]" "role[zerotier_controller]",
"recipe[kosmos-ejabberd::firewall]",
"recipe[kosmos-ipfs::firewall_swarm]",
"recipe[kosmos_zerotier::firewall]",
"recipe[sockethub::firewall]"
] ]
} }

61
nodes/rsk-mainnet-3.json Normal file
View File

@ -0,0 +1,61 @@
{
"name": "rsk-mainnet-3",
"normal": {
"knife_zero": {
"host": "10.1.1.150"
}
},
"automatic": {
"fqdn": "rsk-mainnet-3",
"os": "linux",
"os_version": "5.15.0-1046-kvm",
"hostname": "rsk-mainnet-3",
"ipaddress": "192.168.122.233",
"roles": [
"base",
"kvm_guest",
"rskj_mainnet"
],
"recipes": [
"kosmos-base",
"kosmos-base::default",
"kosmos_kvm::guest",
"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",
"kosmos_rsk::firewall",
"firewall::default"
],
"platform": "ubuntu",
"platform_version": "22.04",
"cloud": null,
"chef_packages": {
"chef": {
"version": "18.3.0",
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib",
"chef_effortless": null
},
"ohai": {
"version": "18.1.4",
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.4/lib/ohai"
}
}
},
"run_list": [
"role[base]",
"role[kvm_guest]",
"role[rskj_mainnet]"
]
}

61
nodes/rsk-testnet-4.json Normal file
View File

@ -0,0 +1,61 @@
{
"name": "rsk-testnet-4",
"normal": {
"knife_zero": {
"host": "10.1.1.126"
}
},
"automatic": {
"fqdn": "rsk-testnet-4",
"os": "linux",
"os_version": "5.15.0-1045-kvm",
"hostname": "rsk-testnet-4",
"ipaddress": "192.168.122.235",
"roles": [
"base",
"kvm_guest",
"rskj_testnet"
],
"recipes": [
"kosmos-base",
"kosmos-base::default",
"kosmos_kvm::guest",
"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",
"kosmos_rsk::firewall",
"firewall::default"
],
"platform": "ubuntu",
"platform_version": "22.04",
"cloud": null,
"chef_packages": {
"chef": {
"version": "18.3.0",
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib",
"chef_effortless": null
},
"ohai": {
"version": "18.1.4",
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.4/lib/ohai"
}
}
},
"run_list": [
"role[base]",
"role[kvm_guest]",
"role[rskj_testnet]"
]
}

View File

@ -9,7 +9,6 @@ default_attributes 'rskj' => {
default_run_list = %w( default_run_list = %w(
kosmos_rsk::rskj kosmos_rsk::rskj
kosmos_rsk::nginx
) )
env_run_lists( env_run_lists(

View File

@ -1,4 +1,4 @@
node.default['rskj']['version'] = '4.4.0~focal' node.default['rskj']['version'] = '5.3.0~jammy'
node.default['rskj']['network'] = 'testnet' node.default['rskj']['network'] = 'testnet'
node.default['rskj']['nginx']['domain'] = nil node.default['rskj']['nginx']['domain'] = nil

View File

@ -1,6 +1,7 @@
--- ---
driver: driver:
name: dokken name: dokken
chef_version: 18.2.7
pull_platform_image: false pull_platform_image: false
pull_chef_image: false pull_chef_image: false
memory_limit: 2147483648 # 2GB memory_limit: 2147483648 # 2GB
@ -18,7 +19,7 @@ transport:
provisioner: provisioner:
name: dokken name: dokken
clean_dokken_sandbox: false # clean_dokken_sandbox: false
# You may wish to disable always updating cookbooks in CI or other testing environments. # You may wish to disable always updating cookbooks in CI or other testing environments.
# For example: # For example:
# always_update_cookbooks: <%= !ENV['CI'] %> # always_update_cookbooks: <%= !ENV['CI'] %>
@ -33,9 +34,9 @@ verifier:
name: inspec name: inspec
platforms: platforms:
- name: ubuntu-20.04 - name: ubuntu-22.04
driver: driver:
image: dokken/ubuntu-20.04 image: dokken/ubuntu-22.04
privileged: true privileged: true
pid_one_command: /usr/lib/systemd/systemd pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions: intermediate_instructions:

View File

@ -3,8 +3,8 @@ maintainer 'Kosmos Developers'
maintainer_email 'ops@kosmos.org' maintainer_email 'ops@kosmos.org'
license 'MIT' license 'MIT'
description 'Installs/configures RSKj and related software' description 'Installs/configures RSKj and related software'
version '0.3.0' version '0.4.0'
chef_version '>= 15.0' chef_version '>= 18.2'
issues_url 'https://gitea.kosmos.org/kosmos/chef/issues' issues_url 'https://gitea.kosmos.org/kosmos/chef/issues'
source_url 'https://gitea.kosmos.org/kosmos/chef' source_url 'https://gitea.kosmos.org/kosmos/chef'

View File

@ -9,7 +9,7 @@ end
describe package('rskj') do describe package('rskj') do
it { should be_installed } it { should be_installed }
its('version') { should eq '4.4.0~focal' } its('version') { should eq '5.3.0~jammy' }
end end
describe service('rsk') do describe service('rsk') do