How yelp/paasta works
Project type and purpose
• PaaSTA is an opinionated Platform‐as‐a‐Service toolkit written in Python. It provides:
• A command‐line interface (paasta CLI) for teams to build, deploy, and manage containerized services.
• A REST API (“paasta API server”) to expose operational data and control endpoints.
• A library of automation primitives (paasta_tools) that orchestrates interactions with Kubernetes, Mesos (legacy), SmartStack/Envoy, Sensu, Prometheus/HPA, Tron, and other infrastructure.
• Its goal is to take high‐level, declarative service definitions and ensure safe, efficient deployments across Kubernetes clusters, integrate service discovery, monitoring, autoscaling, and batch scheduling.
File structure
• Top‐level directories:
• paasta_tools/cli – the entry point for the paasta command, subcommands, schemas, and tab‐completion scripts.
• paasta_tools/api & paasta_tools/paastaapi – the implementation of the HTTP API server (routes, views, models, client).
• paasta_tools – core automation library: autoscaling, kubernetes tools, mesos tools, config loaders, utility scripts.
• docs/ + docs/source – user & developer documentation source (Sphinx).
• example_cluster/ – example Kubernetes/Mesos cluster configurations and test scripts.
• general_itests/ & k8s_itests/ – integration tests that spin up fake clusters or Kind.
• yelp_package/dockerfiles & itest – Dockerfiles and integration test infrastructure for building and packaging.
• Config files and CI:
• .github/workflows – CI pipelines (run tests, publish to PyPI).
• Docker‐related: Dockerfiles for various components, docker‐compose for example clusters.
• Makefile, setup.py, pyproject.toml, requirements*.txt – build, packaging, and dependency management.
README for additional insights
• PaaSTA binds to Kubernetes for scheduling, Docker for containers, Tron for cron‐style jobs, SmartStack/Envoy for service discovery, Sensu for monitoring, Prometheus/HPA for autoscaling, and optional Jenkins for CD.
• It uses declarative service schemas (JSON/YAML) and generates Kubernetes manifests plus other infra configs.