Merge branch 'master' into feature/postgresql_migration

This commit is contained in:
2026-04-12 18:15:01 +04:00
13 changed files with 146 additions and 14 deletions

View File

@@ -18,6 +18,8 @@ server {
client_max_body_size 121M;
proxy_intercept_errors on;
location ~ ^/(avatars|repo-avatars)/.*$ {
proxy_buffers 1024 8k;
proxy_pass http://_gitea_web;
@@ -52,5 +54,18 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
error_page 404 = @slow_404;
}
# Slow down 404 responses to make scraping random URLs less attractive
location @slow_404 {
internal;
default_type text/plain;
content_by_lua_block {
ngx.sleep(10)
ngx.status = 404
ngx.say("Not Found")
ngx.exit(ngx.HTTP_NOT_FOUND)
}
}
}

View File

@@ -1,9 +1,9 @@
release = "20260320"
img_filename = "ubuntu-22.04-server-cloudimg-amd64-disk-kvm"
release = "20260321"
img_filename = "ubuntu-24.04-server-cloudimg-amd64"
node.default["kosmos_kvm"]["host"]["qemu_base_image"] = {
"url" => "https://cloud-images.ubuntu.com/releases/jammy/release-#{release}/#{img_filename}.img",
"checksum" => "f7173eb7137b4f0ebeaea8fffe68ecdab1e3c787bde1fd8dfdf27103554332b3",
"url" => "https://cloud-images.ubuntu.com/releases/noble/release-#{release}/#{img_filename}.img",
"checksum" => "5c3ddb00f60bc455dac0862fabe9d8bacec46c33ac1751143c5c3683404b110d",
"path" => "/var/lib/libvirt/images/base/#{img_filename}-#{release}.qcow2"
}

View File

@@ -70,7 +70,7 @@ virt-install \
--vcpus "$CPUS" \
--cpu host \
--arch x86_64 \
--osinfo detect=on,name=ubuntujammy \
--osinfo detect=on,name=ubuntu24.04 \
--hvm \
--virt-type kvm \
--disk "$IMAGE_PATH" \

View File

@@ -1,5 +1,8 @@
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

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']['nginx']['domain'] = nil

View File

@@ -34,9 +34,9 @@ verifier:
name: inspec
platforms:
- name: ubuntu-22.04
- name: ubuntu-24.04
driver:
image: dokken/ubuntu-22.04
image: dokken/ubuntu-24.04
privileged: true
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:

View File

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

View File

@@ -20,10 +20,19 @@ apt_repository 'rskj' do
end
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
response_file 'rskj-preseed.cfg.erb'
response_file_variables network: node['rskj']['network']
options '--assume-yes'
version node['rskj']['version']
end

View File

@@ -1,6 +1,6 @@
#_preseed_V1
# 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.
# Choices: mainnet, testnet, regtest
rskj shared/config select <%= @network %>

View File

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