diff --git a/docs/conf.py b/docs/conf.py index 9d9b7f0e..2a9810d3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['myst_parser', "sphinx_copybutton"] +extensions = ['myst_parser', "sphinx_copybutton", 'sphinxcontrib.jquery', 'sphinx_datatables'] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -185,3 +185,9 @@ # Output file base name for HTML help builder. htmlhelp_basename = "PythonInfrastructuredoc" + +# Enable MyST heading anchors +myst_heading_anchors = 2 + +# sphinx-datatables +datatables_options = {"paging": False} diff --git a/docs/requirements.txt b/docs/requirements.txt index 4072332b..ab112fc8 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,3 +2,4 @@ furo sphinx myst-parser sphinx-copybutton +sphinx-datatables diff --git a/docs/salt-server-list.rst b/docs/salt-server-list.rst index f8428ea4..8e9d7d43 100644 --- a/docs/salt-server-list.rst +++ b/docs/salt-server-list.rst @@ -5,6 +5,7 @@ .. csv-table:: :header: "Name", "Purpose", "Contact", "Distro", "Datacener" + :class: sphinx-datatable display compact "backup.sfo1.psf.io", "Automated backup of infrastructure", "Infrastructure staff", "Ubuntu-24.04", "sfo1" diff --git a/pillar/prod/roles.sls b/pillar/prod/roles.sls index 734257f6..9c736adb 100644 --- a/pillar/prod/roles.sls +++ b/pillar/prod/roles.sls @@ -10,63 +10,79 @@ roles: pattern: "backup*.sfo1.psf.io" purpose: "Automated backup of infrastructure" contact: "Infrastructure staff" + category: "infra-infra" bugs: pattern: "bugs.*.psf.io" purpose: "Roundup hosting for CPython, Jython, and Roundup" contact: "Infrastructure staff" + category: "python-core" buildbot: pattern: "buildbot*.nyc1.psf.io" purpose: "Hosting for CPython buildbot server" contact: "zware, haypo, pablogsa" + category: "python-core" cdn-logs: pattern: "cdn-logs*.nyc1.psf.io" purpose: "Realtime log streaming from Fastly CDN for debug" contact: "Infrastructure Staff" + category: "infra-infra" codespeed: pattern: "codespeed*.nyc1.psf.io" purpose: "Hosting for speed.python.org and speed.pypy.org" contact: "" + category: "python-core" consul: pattern: "consul*.nyc1.psf.io" purpose: "Runs `Consul `_ discovery service" contact: "Infrastructure Staff" + category: "infra-infra" docs: pattern: "docs*.nyc1.psf.io" purpose: "Builds and serves CPython's documentation" contact: "mdk" + category: "python-core" downloads: pattern: "downloads*.nyc1.psf.io" purpose: "Serves python.org downloads" contact: "CPython Release Managers" + category: "python-core" gnumailman: pattern: "gnumailman.nyc1.psf.io" purpose: "GNU Mailman Project wiki and lists" contact: "Mark Sapiro" + category: "mail" hg: pattern: "hg*.nyc1.psf.io" purpose: "Version Control Archives, serves hg.python.org and svn.python.org" contact: "Infrastructure Staff" + category: "python-core" loadbalancer: pattern: "lb*.nyc1.psf.io" purpose: "Load balancer" contact: "Infrastructure Staff" + category: "infra-infra" mail: pattern: "mail.ams1.psf.io" purpose: "Mail and mailman server" contact: "postmasters" + category: "mail" planet: pattern: "planet*.nyc1.psf.io" purpose: "Planet Python" contact: "benjamin" + category: "community" pythontest: pattern: "pythontest*.nyc3.psf.io" purpose: "Test resources for CPython's test suite." contact: "Infrastructure Staff" + category: "python-core" salt-master: pattern: "salt*.nyc1.psf.io" purpose: "Salt server" contact: "Infrastructure Staff" + category: "infra-infra" moin: pattern: "moin*.nyc1.psf.io" purpose: "Hosts moin sites for wiki.python.org, wiki.jython.org" contact: "lemburg" + category: "community" diff --git a/salt/base/config/salt-server-list.rst.jinja b/salt/base/config/salt-server-list.rst.jinja index 72647ff3..0895ef98 100644 --- a/salt/base/config/salt-server-list.rst.jinja +++ b/salt/base/config/salt-server-list.rst.jinja @@ -7,14 +7,15 @@ {% endfor %} .. csv-table:: - :header: "Name", "Purpose", "Contact", "Distro", "Datacener" + :header: "Name", "Purpose", "Contact", "Distro", "Datacenter", "Category" + :class: sphinx-datatable display compact {% for server in salt['minion.list']()['minions']|sort -%} {% set role = salt['match.filter_by'](role_mapping, minion_id=server) -%} {% set datacenter = salt['mine.get']("*", "psf_dc").get(server, "") -%} {% set distro = salt['mine.get']("*", "osfinger").get(server, "") -%} {% set roleconfig = salt["pillar.get"]("roles", {}).get(role, {}) %} - "{{ server }}", "{{ roleconfig.get("purpose", "") }}", "{{ roleconfig.get("contact", "") }}", "{{ distro }}", "{{ datacenter }}" + "{{ server }}", "{{ roleconfig.get("purpose", "") }}", "{{ roleconfig.get("contact", "") }}", "{{ distro }}", "{{ datacenter }}", "{{ roleconfig.get("category", "") }}" {%- endfor %} ..