3 Commits

Author SHA1 Message Date
a5f2c3d257 Automatically determine OS package name
Co-authored-by: Greg Karékinian <greg@karekinian.com>
2026-04-12 14:31:13 +04:00
b0cdeac30e Add new RSK testnet VM 2026-04-12 08:52:24 +04:00
1c6bf34386 Upgrade rskj to v9.0.1 and Ubuntu 24.04 2026-04-11 19:16:19 +04:00
9 changed files with 85 additions and 9 deletions

View File

@@ -0,0 +1,4 @@
{
"name": "rsk-testnet-6",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl1p4+F536/peA4XWMJtm\njggPl6yJb42V5bg3kDa8SHoIoQgXn59d3BclZ1Oz2+JhFd3Rrn4FN3Z1wzGpP+gA\nnxQOfgRG1ucahh7Nxaw3IdoHm7r/EdEOc9FrxvGJ+09YnmLfzn4iVQpsUiOiNVS7\n0LXtMXYtsjD+o6BTbOhGU8FMmGhMhQfXFVgoDdTiM/Q62zPw8Vtpa3yFpFJAu+dA\n+mm5h5W6FnaWJXM2arn3PxDOt+JQSWp5PYG4goU1FFreU9iFuoeGEfLy8unlbbXt\ne96QhNuCkOA15xqta0Z3oL7IlXWns7dLgZYlpZT9zaExIs3AEDaQcleacQPzXKSG\nswIDAQAB\n-----END PUBLIC KEY-----\n"
}

60
nodes/rsk-testnet-6.json Normal file
View File

@@ -0,0 +1,60 @@
{
"name": "rsk-testnet-6",
"normal": {
"knife_zero": {
"host": "10.1.1.20"
}
},
"automatic": {
"fqdn": "rsk-testnet-6",
"os": "linux",
"os_version": "6.8.0-107-generic",
"hostname": "rsk-testnet-6",
"ipaddress": "192.168.122.231",
"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",
"kosmos-base::journald_conf",
"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": "24.04",
"cloud": null,
"chef_packages": {
"chef": {
"version": "18.10.17",
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.10.17/lib",
"chef_effortless": null
},
"ohai": {
"version": "18.2.13",
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.2.13/lib/ohai"
}
}
},
"run_list": [
"role[base]",
"role[kvm_guest]",
"role[rskj_testnet]"
]
}

View File

@@ -1,5 +1,8 @@
source 'https://supermarket.chef.io' source 'https://supermarket.chef.io'
cookbook 'kosmos-nginx', path: '../../site-cookbooks/kosmos-nginx' cookbook 'kosmos_openresty', path: '../../site-cookbooks/kosmos_openresty'
cookbook 'kosmos-base', path: '../../site-cookbooks/kosmos-base'
cookbook 'openresty', path: '../../site-cookbooks/openresty'
cookbook 'kosmos-postfix', path: '../../site-cookbooks/kosmos-postfix'
metadata metadata

View File

@@ -1,4 +1,4 @@
node.default['rskj']['version'] = '7.0.0~jammy' node.default['rskj']['version'] = "9.0.1~#{node['lsb']['codename']}"
node.default['rskj']['network'] = 'testnet' node.default['rskj']['network'] = 'testnet'
node.default['rskj']['nginx']['domain'] = nil node.default['rskj']['nginx']['domain'] = nil

View File

@@ -34,9 +34,9 @@ verifier:
name: inspec name: inspec
platforms: platforms:
- name: ubuntu-22.04 - name: ubuntu-24.04
driver: driver:
image: dokken/ubuntu-22.04 image: dokken/ubuntu-24.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,7 +3,7 @@ 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.4.0' version '0.5.0'
chef_version '>= 18.2' 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

@@ -20,10 +20,19 @@ apt_repository 'rskj' do
end end
apt_package 'openjdk-17-jdk' apt_package 'openjdk-17-jdk'
apt_package 'debconf-utils'
execute 'preseed-rskj-license' do
command 'echo "rskj shared/accepted-rsk-license-v1-1 boolean true" | debconf-set-selections'
not_if 'debconf-get-selections | grep -q "shared/accepted-rsk-license-v1-1.*true"'
end
execute 'preseed-rskj-config' do
command "echo \"rskj shared/config select #{node['rskj']['network']}\" | debconf-set-selections"
not_if "debconf-get-selections | grep -q \"shared/config.*#{node['rskj']['network']}\""
end
apt_package 'rskj' do apt_package 'rskj' do
response_file 'rskj-preseed.cfg.erb'
response_file_variables network: node['rskj']['network']
options '--assume-yes' options '--assume-yes'
version node['rskj']['version'] version node['rskj']['version']
end end

View File

@@ -1,6 +1,6 @@
#_preseed_V1 #_preseed_V1
# Do you agree to the terms of the applicable licenses? # Do you agree to the terms of the applicable licenses?
rskj shared/accepted-rsk-license-v1-1 select true rskj shared/accepted-rsk-license-v1-1 boolean true
# Choose a configuration environment to run your node. # Choose a configuration environment to run your node.
# Choices: mainnet, testnet, regtest # Choices: mainnet, testnet, regtest
rskj shared/config select <%= @network %> rskj shared/config select <%= @network %>

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 '7.0.0~jammy' } its('version') { should eq '9.0.1~noble' }
end end
describe service('rsk') do describe service('rsk') do