Skip to content

Commit fc827e0

Browse files
authored
Server list categories (#608)
* add categories to salt-server-list * enable MyST heading anchor links, resolves warning introduced in external-server doc * add sorting/search to server list
1 parent 81cebf9 commit fc827e0

File tree

5 files changed

+28
-3
lines changed

5 files changed

+28
-3
lines changed

docs/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# Add any Sphinx extension module names here, as strings. They can be
2323
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2424
# ones.
25-
extensions = ['myst_parser', "sphinx_copybutton"]
25+
extensions = ['myst_parser', "sphinx_copybutton", 'sphinxcontrib.jquery', 'sphinx_datatables']
2626

2727
# Add any paths that contain templates here, relative to this directory.
2828
templates_path = ["_templates"]
@@ -185,3 +185,9 @@
185185

186186
# Output file base name for HTML help builder.
187187
htmlhelp_basename = "PythonInfrastructuredoc"
188+
189+
# Enable MyST heading anchors
190+
myst_heading_anchors = 2
191+
192+
# sphinx-datatables
193+
datatables_options = {"paging": False}

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ furo
22
sphinx
33
myst-parser
44
sphinx-copybutton
5+
sphinx-datatables

docs/salt-server-list.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
.. csv-table::
77
:header: "Name", "Purpose", "Contact", "Distro", "Datacener"
8+
:class: sphinx-datatable display compact
89

910

1011
"backup.sfo1.psf.io", "Automated backup of infrastructure", "Infrastructure staff", "Ubuntu-24.04", "sfo1"

pillar/prod/roles.sls

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,63 +10,79 @@ roles:
1010
pattern: "backup*.sfo1.psf.io"
1111
purpose: "Automated backup of infrastructure"
1212
contact: "Infrastructure staff"
13+
category: "infra-infra"
1314
bugs:
1415
pattern: "bugs.*.psf.io"
1516
purpose: "Roundup hosting for CPython, Jython, and Roundup"
1617
contact: "Infrastructure staff"
18+
category: "python-core"
1719
buildbot:
1820
pattern: "buildbot*.nyc1.psf.io"
1921
purpose: "Hosting for CPython buildbot server"
2022
contact: "zware, haypo, pablogsa"
23+
category: "python-core"
2124
cdn-logs:
2225
pattern: "cdn-logs*.nyc1.psf.io"
2326
purpose: "Realtime log streaming from Fastly CDN for debug"
2427
contact: "Infrastructure Staff"
28+
category: "infra-infra"
2529
codespeed:
2630
pattern: "codespeed*.nyc1.psf.io"
2731
purpose: "Hosting for speed.python.org and speed.pypy.org"
2832
contact: ""
33+
category: "python-core"
2934
consul:
3035
pattern: "consul*.nyc1.psf.io"
3136
purpose: "Runs `Consul <https://www.consul.io/>`_ discovery service"
3237
contact: "Infrastructure Staff"
38+
category: "infra-infra"
3339
docs:
3440
pattern: "docs*.nyc1.psf.io"
3541
purpose: "Builds and serves CPython's documentation"
3642
contact: "mdk"
43+
category: "python-core"
3744
downloads:
3845
pattern: "downloads*.nyc1.psf.io"
3946
purpose: "Serves python.org downloads"
4047
contact: "CPython Release Managers"
48+
category: "python-core"
4149
gnumailman:
4250
pattern: "gnumailman.nyc1.psf.io"
4351
purpose: "GNU Mailman Project wiki and lists"
4452
contact: "Mark Sapiro"
53+
category: "mail"
4554
hg:
4655
pattern: "hg*.nyc1.psf.io"
4756
purpose: "Version Control Archives, serves hg.python.org and svn.python.org"
4857
contact: "Infrastructure Staff"
58+
category: "python-core"
4959
loadbalancer:
5060
pattern: "lb*.nyc1.psf.io"
5161
purpose: "Load balancer"
5262
contact: "Infrastructure Staff"
63+
category: "infra-infra"
5364
mail:
5465
pattern: "mail.ams1.psf.io"
5566
purpose: "Mail and mailman server"
5667
contact: "postmasters"
68+
category: "mail"
5769
planet:
5870
pattern: "planet*.nyc1.psf.io"
5971
purpose: "Planet Python"
6072
contact: "benjamin"
73+
category: "community"
6174
pythontest:
6275
pattern: "pythontest*.nyc3.psf.io"
6376
purpose: "Test resources for CPython's test suite."
6477
contact: "Infrastructure Staff"
78+
category: "python-core"
6579
salt-master:
6680
pattern: "salt*.nyc1.psf.io"
6781
purpose: "Salt server"
6882
contact: "Infrastructure Staff"
83+
category: "infra-infra"
6984
moin:
7085
pattern: "moin*.nyc1.psf.io"
7186
purpose: "Hosts moin sites for wiki.python.org, wiki.jython.org"
7287
contact: "lemburg"
88+
category: "community"

salt/base/config/salt-server-list.rst.jinja

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
{% endfor %}
88

99
.. csv-table::
10-
:header: "Name", "Purpose", "Contact", "Distro", "Datacener"
10+
:header: "Name", "Purpose", "Contact", "Distro", "Datacenter", "Category"
11+
:class: sphinx-datatable display compact
1112

1213
{% for server in salt['minion.list']()['minions']|sort -%}
1314
{% set role = salt['match.filter_by'](role_mapping, minion_id=server) -%}
1415
{% set datacenter = salt['mine.get']("*", "psf_dc").get(server, "") -%}
1516
{% set distro = salt['mine.get']("*", "osfinger").get(server, "") -%}
1617
{% set roleconfig = salt["pillar.get"]("roles", {}).get(role, {}) %}
17-
"{{ server }}", "{{ roleconfig.get("purpose", "") }}", "{{ roleconfig.get("contact", "") }}", "{{ distro }}", "{{ datacenter }}"
18+
"{{ server }}", "{{ roleconfig.get("purpose", "") }}", "{{ roleconfig.get("contact", "") }}", "{{ distro }}", "{{ datacenter }}", "{{ roleconfig.get("category", "") }}"
1819
{%- endfor %}
1920

2021
..

0 commit comments

Comments
 (0)