Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: noble support #367

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions Vagrantfile
JacobCoffee marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
#!/usr/bin/env ruby


SERVERS = [
"backup-server",
{:name => "backup-server", :codename => "noble"},
{:name => "bugs", :codename => "jammy", :ports => [8080]},
"buildbot",
{:name => "buildbot", :codename => "noble"},
"cdn-logs",
{:name => "codespeed", :codename => "jammy"},
{:name => "consul", :codename => "jammy"},
"docs",
"downloads",
{:name => "codespeed", :codename => "noble"},
{:name => "consul", :codename => "noble"},
{:name => "docs", :codename => "noble"},
{:name => "downloads", :codename => "noble"},
"hg",
{:name => "loadbalancer", :ports => [20000, 20001, 20002, 20003, 20004, 20005, 20010]},
"mail",
{:name => "loadbalancer", :codename => "noble", :ports => [20000, 20001, 20002, 20003, 20004, 20005, 20010]},
{:name => "mail", :codename => "noble"},
"moin",
"planet",
"pypy-web",
"pythontest",
{:name => "planet", :codename => "noble"},
{:name => "pypy-web", :codename => "noble"},
{:name => "pythontest", :codename => "noble"},
]

SUBNET1 = "192.168.50"
Expand All @@ -40,7 +39,7 @@ Vagrant.configure("2") do |config|
config.vm.define "salt-master" do |s_config|
s_config.vm.provider "docker" do |docker, override|
docker.build_dir = "dockerfiles"
docker.dockerfile = "Dockerfile.jammy"
docker.dockerfile = "Dockerfile.noble"
end

s_config.vm.hostname = "salt-master.vagrant.psf.io"
Expand Down
13 changes: 7 additions & 6 deletions salt/base/config/sources.list.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
{% set base_repo = "us.archive.ubuntu.com/ubuntu/" %}
{% endif %}

{# TODO: Investigate, these seem to be handled doubly in sources.list.d as well as sources.list
JacobCoffee marked this conversation as resolved.
Show resolved Hide resolved
###### Ubuntu Main Repos
deb http://{{ base_repo }} {{ grains["oscodename"] }} main restricted universe
deb-src http://{{ base_repo }} {{ grains["oscodename"] }} main restricted universe
{#deb http://{{ base_repo }} {{ grains["oscodename"] }} main restricted universe#}
{#deb-src http://{{ base_repo }} {{ grains["oscodename"] }} main restricted universe#}

###### Ubuntu Update Repos
deb http://{{ base_repo }} {{ grains["oscodename"] }}-security main restricted universe
deb http://{{ base_repo }} {{ grains["oscodename"] }}-updates main restricted universe
deb-src http://{{ base_repo }} {{ grains["oscodename"] }}-security main restricted universe
deb-src http://{{ base_repo }} {{ grains["oscodename"] }}-updates main restricted universe
{#deb http://{{ base_repo }} {{ grains["oscodename"] }}-security main restricted universe#}
{#deb http://{{ base_repo }} {{ grains["oscodename"] }}-updates main restricted universe#}
{#deb-src http://{{ base_repo }} {{ grains["oscodename"] }}-security main restricted universe#}
{#deb-src http://{{ base_repo }} {{ grains["oscodename"] }}-updates main restricted universe#}
2 changes: 1 addition & 1 deletion salt/base/repo.sls
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% if grains["oscodename"] in ["jammy", "focal"] %}
{% if grains["oscodename"] in ["jammy", "noble"] %}
psfkey:
file.managed:
- name: /etc/apt/keyrings/packagecloud.asc
Expand Down
10 changes: 10 additions & 0 deletions salt/buildbot/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ buildbot-user:
- user: buildbot-user
- file: /srv

{# vagrant up fails due to this file not existing (see: https://github.com/python/psf-salt/pull/367#issuecomment-2218636563) #}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure this is the right move, but it fixed the provisioner

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notably, when I brought this up on the default, focal, it gave the same error... So I'm more inclined to just leave this. I've not yet dug into what eventually touches this in https://github.com/python/buildmaster-config, but this shouldnt hurt much?

/srv/buildbot/master/twistd.log:
file.managed:
- user: buildbot
- group: buildbot
- mode: "0644"
- replace: False
- require:
- git: /srv/buildbot

update-master:
cmd.run:
- runas: buildbot
Expand Down
22 changes: 20 additions & 2 deletions salt/haproxy/config/haproxy.cfg.jinja
JacobCoffee marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ defaults
balance roundrobin

timeout connect 5000
timeout client 50000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this removed because it is no longer supported in this haproxy version?

Copy link
Member Author

@JacobCoffee JacobCoffee Jul 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will investigate within haproxy/lb PR, weekend brain is strong on a monday :)

timeout server 50000

monitor-uri /_haproxy_status
Expand Down Expand Up @@ -121,7 +120,6 @@ frontend main
capture request header X-Forwarded-For len 64

acl letsencrypt-well-known-acl path_beg /.well-known/acme-challenge/
use_backend letsencrypt-well-known if letsencrypt-well-known-acl

# Determine if this request has TLS on the client side or not.
acl is_tls dst_port 19001
Expand All @@ -141,6 +139,8 @@ frontend main
# Redirect all HTTP traffic to HTTPS
redirect code 301 scheme https if !is_tls !letsencrypt-well-known-acl

use_backend letsencrypt-well-known if letsencrypt-well-known-acl

# Dispatch to the redirect backend for any redirects we have, we're going
# to do this here after the HTTP -> HTTPS redirect even though this will
# result in an extra redirect because we want to give this domain a chance
Expand Down Expand Up @@ -214,7 +214,25 @@ backend redirect
{% for service, config in haproxy.services.items() %}
backend {{ service }}
{% if config.get("check") -%}
{% if grains["oscodename"] != "noble" -%}
option httpchk {{ config.check }}
{%- else -%}
# Noble Config using the newer http-check syntax
# We need to split the check into parts to handle the extra things
# ...maybe there is a better way to do this?
{% set check_parts = config.check.split(' ', 2) -%}
{% set method = check_parts[0] -%}
{% set path = check_parts[1] -%}
{% if check_parts|length > 2 -%}
{% set extra = check_parts[2].split('\r\n') -%}
{% set version = extra[0] -%}
{% set headers = extra[1:] -%}
{% endif -%}
http-check send meth {{ method }} uri {{ path }} ver {{ version }}
{%- for header in headers %}
http-check send hdr {{ header.replace(':\\ ', ': ') }}
{%- endfor %}
{%- endif %}
{%- endif %}

# http://gnuterrypratchett.com/
Expand Down
Loading