How chef/chef-server works
• Omnibus – the build and packaging layer that ties everything together and produces deployable packages.
• Chef Expeditor – the internal CI/CD orchestration tool that, while not a runtime service, coordinates actions in the ecosystem.
• Client/Test Tools – oc-chef-pedant is the comprehensive API test suite, along with utility scripts.
– oc_erchef: The core REST API server that serves as the main entry-point for Chef Infra Server operations.
– oc_bifrost: The service responsible for authorization and access control logic.
– oc-id: The OAuth2-based identity provider, used by extensions (like Supermarket) to authenticate clients.
– Bookshelf: An S3-compatible storage engine for managing and storing cookbook data.
– chef-server-ctl: The command-line management utility for operational controls.
– Nginx (or OpenResty): Acting as the reverse proxy and load-balancer, with its Lua-based routing that dispatches requests to the backend services.
Interactions and data flows
– Requests destined for API handling should flow to oc_erchef.
– Authentication and token-related flows go to oc-id.
– Authorization decisions are routed to oc_bifrost.
– Operations requiring cookbook data are linked to Bookshelf.
• That data stores (PostgreSQL, Redis, Elasticsearch) are behind these services:
– For example, oc_erchef interacts with PostgreSQL (for application data), Redis (for caching/session management), and Elasticsearch (for search indexing).
Architectural patterns and technologies
• A micro‐services style architecture—even as these services may run as Habitat packages or within a runit-managed environment.
• Separate the build/CI layer (Omnibus and Chef Expeditor) from the runtime layer.
• That the project is written primarily in Erlang (for oc_erchef, oc_bifrost, Bookshelf, etc.), with additional components in Ruby (chef-server-ctl, oc-chef-pedant, omnibus) and Lua for routing in Nginx.
• Internal service supervision (via runit and Habitat) although it may be abstracted as “Service Supervision.”
Final touches
• How the build pipeline (Omnibus and related scripts in the repo) packages the Chef Infra Server with its integrated components.
• Annotations for key technologies such as Erlang, PostgreSQL, Redis, Elasticsearch, and the use of Habitat for package deployment.
• Do not over-complicate: aim for clarity by breaking down the architecture into primary clusters/components with explicit connections.
Happy diagramming!