Page MenuHomeDevCentral

Release api-exec
Open, LowPublic

Description

D3494 introduces a Flask application in rOPS to execute ccache-metrics when a request reaches /metrics/ccache.

Basically, this application allows to run an executable and pass the response with a specific content-type header. It's a quick alternative to CGI.

Here an example of how routes are defined.

Routes don't accept any parameter, so there is no shell injection risk, only DoS risk.

api-exec.conf (partial)
routes:
  /status: echo 200 ALIVE

  /metrics/ccache:
    command: ccache-metrics
    mime_type: application/openmetrics-text

  /version: cat /etc/os-release
  /version/runtime: freebsd-version -r

Plan:

  • create a repository
  • write documentation like the salt-wrapper one
  • release the application on Python Package Index (PyPI)

Event Timeline

dereckson created this task.
dereckson added a project: Nasqueron API.
dereckson moved this task from Backlog to New ideas on the Nasqueron API board.
dereckson moved this task from Backlog to Next on the User-Dereckson board.