Skip to content

Example scripts ​

The scripts/ directory is the active executable documentation for the DSL. Run any demo with:

sh
bundle exec ruby -Ilib scripts/<demo>.rb

Then inspect or run the generated project under generate/.

ScriptDemonstrates
01_mobilis_initial_system.rbMinimal Rails service with PostgreSQL.
02_mobilis_otel_system.rbStandalone observability stack: Grafana, Loki, Alloy, OpenTelemetry collector, Jaeger, and Prometheus.
03_flask_otel_system.rbFlask service with the observability stack.
04_big_multirails_system.rbMultiple Rails API services with separate PostgreSQL databases and service-to-service wiring.
05_rails_otel_system.rbRails service with PostgreSQL and full observability wiring.
06_rails_graphql_otel.rbRails API service with GraphQL, generated model affordances, PostgreSQL, and OpenTelemetry.
07_flask_redis.rbFlask service connected to Redis.
08_large_iam_system.rbLarger IAM-oriented system with Rails API services, filtered ActiveResource affordances, GoAWS SNS/SQS, Redis, and observability.
09_just_localstack.rbLegacy LocalStack-only smoke scenario. New queue demos should prefer GoAWS.
10_rails_tailwind_site.rbRails site setup with Tailwind.
11_add_group_service_to_large_iam_system.rbFocused IAM slice adding a group service with GraphQL and observability.
12_chaos_management_system.rbLarger Rails application example with richer generated app code.
13_orinoco.rbOrinoco Rails service connected to PostgreSQL and GoAWS.
14_postgres_replication.rbPostgreSQL replication DSL: replicate_from(primary).
15_pgadmin_postgres.rbpgAdmin wired to generated PostgreSQL.
16_s3_storage.rbS3-compatible object storage using SeaweedFS.
17_observable_s3_storage.rbSeaweedFS-backed S3 storage with conditional observability wiring, Prometheus scraping, and Grafana panels.
18_mnbme_otel_system.rbRack microservice game demo extracted from MNBME: local gem support, Rack Docker image support, replicated service instances, Redis game state, and OpenTelemetry/Grafana/Loki wiring.
19_two_rails_local_gem.rbTwo Rails services consuming one generated local gem, including per-service Docker build-context handling.
20_http_migration.rbFastAPI and Go behind Envoy: live migration controls, trusted request shadow context on one Go candidate, SQL meaning/binding and committed-effect OTEL verification, and a standalone generated ./demo (defaults to development; select with MOBILIS_ENV).
21_kubernetes_initial.rbRails and observability deployed to Devastation Kubernetes through Istio. Generates Compose plus dev/test/prod Kubernetes resources and a registry-backed deployment helper.
22_cassandra.rbSingle-node Cassandra with schema initialization and a native client write/read example.
23_airflow.rbAirflow Celery orchestration, local Python distributions, PostgreSQL and Redis, and optional OpenTelemetry. See Airflow operations.
23_google_pubsub.rbOfficial Google Pub/Sub emulator, publisher, independent pull subscriptions, competing consumers, redelivery, and a generated integration runner.
24_grafbase_federation.rbGrafbase Gateway and two Strawberry Federation v2 subgraphs with SQL-backed entity resolution, a composed query, and negative composition checks.
25_department_of_unnecessary_approvals.rbStandalone DUA demo: federated FastAPI services, PostgreSQL, Pub/Sub emulator, Go worker, Cassandra conditional decisions, and optional linked OpenTelemetry traces.

The Kubernetes guide documents deployment, project-first hostnames, private services, and end-to-end telemetry verification.

The HTTP demo's operator guide documents environment selection and expected error checks. Its actual Jaeger/OTEL correctness verifier is scripts/http_migration/operations.py, generated as legacy/demo/operations.py; start with verify(), await_trace(), and check_trace().

The most complete current smoke demos are 08_large_iam_system.rb for Rails service composition and 18_mnbme_otel_system.rb for Rack/local-gem/multi- instance behavior.