chartletv0.21.0chartlet.casoon.de

← All examples

Course booking: deployment

The deployment template: a logical model of the images, the managed queue, database and object storage, and a view of production — a cloud region holding a container cluster with two nodes, one API instance on each, and a node pool for the worker. defaultView makes the production view the one that renders; --view logical shows the model. Illustrative values.

Course booking: deployment

examples/booking-deployment.json
{
  "schemaVersion": 1,
  "type": "architecture",
  "title": "Course booking: deployment",
  "height": 1000,
  "architecture": {
    "components": [
      {
        "id": "learner",
        "label": "Learner",
        "kind": "person"
      },
      {
        "id": "ingress",
        "label": "Ingress",
        "sublabel": "load balancer"
      },
      {
        "id": "api",
        "label": "Booking API",
        "sublabel": "image: web app and API",
        "kind": "artifact"
      },
      {
        "id": "worker",
        "label": "Worker",
        "sublabel": "image: background jobs",
        "kind": "artifact"
      },
      {
        "id": "jobs",
        "label": "Job queue",
        "sublabel": "managed queue",
        "kind": "queue"
      },
      {
        "id": "db",
        "label": "Bookings",
        "sublabel": "managed database",
        "kind": "database"
      },
      {
        "id": "files",
        "label": "Certificates",
        "sublabel": "object storage",
        "kind": "storage"
      }
    ],
    "connections": [
      {
        "id": "open",
        "from": "learner",
        "to": "ingress",
        "label": "opens",
        "technology": "HTTPS"
      },
      {
        "id": "route",
        "from": "ingress",
        "to": "api",
        "label": "routes",
        "technology": "HTTP"
      },
      {
        "id": "query",
        "from": "api",
        "to": "db",
        "label": "reads, writes",
        "technology": "SQL/TLS"
      },
      {
        "id": "enqueue",
        "from": "api",
        "to": "jobs",
        "label": "queues jobs"
      },
      {
        "id": "deliver",
        "from": "jobs",
        "to": "worker",
        "label": "delivers"
      },
      {
        "id": "store",
        "from": "worker",
        "to": "files",
        "label": "stores certificates"
      },
      {
        "id": "update",
        "from": "worker",
        "to": "db",
        "label": "updates",
        "technology": "SQL/TLS"
      }
    ],
    "mainPath": [
      "learner",
      "ingress",
      "api",
      "jobs",
      "worker",
      "files"
    ],
    "sameRank": [
      [
        "db",
        "files"
      ]
    ],
    "defaultView": "production",
    "views": [
      {
        "key": "logical",
        "title": "Course booking: deployable parts",
        "components": [
          "learner",
          "ingress",
          "api",
          "worker",
          "jobs",
          "db",
          "files"
        ]
      },
      {
        "key": "production",
        "title": "Course booking in production",
        "environment": "Production",
        "hosts": [
          {
            "id": "region",
            "label": "Cloud region"
          },
          {
            "id": "cluster",
            "label": "Container cluster",
            "in": "region"
          },
          {
            "id": "nodeA",
            "label": "Node A",
            "in": "cluster"
          },
          {
            "id": "nodeB",
            "label": "Node B",
            "in": "cluster"
          },
          {
            "id": "workerPool",
            "label": "Node pool: workers",
            "in": "cluster"
          }
        ],
        "instances": [
          {
            "id": "ingress-prod",
            "of": "ingress",
            "in": "cluster"
          },
          {
            "id": "api-1",
            "of": "api",
            "in": "nodeA"
          },
          {
            "id": "api-2",
            "of": "api",
            "in": "nodeB"
          },
          {
            "id": "worker-1",
            "of": "worker",
            "in": "workerPool"
          },
          {
            "id": "jobs-prod",
            "of": "jobs",
            "in": "region"
          },
          {
            "id": "db-prod",
            "of": "db",
            "in": "region"
          },
          {
            "id": "files-prod",
            "of": "files",
            "in": "region"
          }
        ],
        "instanceConnections": [
          {
            "id": "route",
            "from": "ingress-prod",
            "to": "api-1"
          },
          {
            "id": "route",
            "from": "ingress-prod",
            "to": "api-2"
          },
          {
            "id": "query",
            "from": "api-1",
            "to": "db-prod"
          },
          {
            "id": "query",
            "from": "api-2",
            "to": "db-prod"
          },
          {
            "id": "enqueue",
            "from": "api-1",
            "to": "jobs-prod"
          },
          {
            "id": "enqueue",
            "from": "api-2",
            "to": "jobs-prod"
          },
          {
            "id": "deliver",
            "from": "jobs-prod",
            "to": "worker-1"
          },
          {
            "id": "store",
            "from": "worker-1",
            "to": "files-prod"
          },
          {
            "id": "update",
            "from": "worker-1",
            "to": "db-prod"
          }
        ]
      }
    ]
  }
}
Focus
Course booking in production
Course booking in productionArchitecture diagram with 7 components and 9 connections in 5 boundaries. It shows the environment Production: 7 instances of 6 components of the model; only the connections listed for the instances are drawn. Cloud region: Job queue (jobs-prod), Bookings (db-prod), Certificates (files-prod), Container cluster. Container cluster (in Cloud region): Ingress (ingress-prod), Node A, Node B, Node pool: workers. Node A (in Container cluster): Booking API (api-1). Node B (in Container cluster): Booking API (api-2). Node pool: workers (in Container cluster): Worker (worker-1). Nothing leads into Ingress (ingress-prod). Nothing leads out of Bookings (db-prod) and Certificates (files-prod). Ingress (ingress-prod) (service): connects to Booking API (api-1) (routes, via HTTP) and Booking API (api-2) (routes, via HTTP). Booking API (api-1) (artifact): connects to Bookings (db-prod) (reads, writes, via SQL/TLS) and Job queue (jobs-prod) (queues jobs). Booking API (api-2) (artifact): connects to Bookings (db-prod) (reads, writes, via SQL/TLS) and Job queue (jobs-prod) (queues jobs). Job queue (jobs-prod) (queue): connects to Worker (worker-1) (delivers). Worker (worker-1) (artifact): connects to Certificates (files-prod) (stores certificates) and Bookings (db-prod) (updates, via SQL/TLS). Bookings (db-prod) (database): no outgoing connection. Certificates (files-prod) (storage): no outgoing connection.Cloud regionContainer clusterNode pool: workersNode BNode AIngress (ingress-prod) → Booking API (api-1): routes [HTTP]Ingress (ingress-prod) → Booking API (api-2): routes [HTTP]Booking API (api-1) → Bookings (db-prod): reads, writes [SQL/TLS]Booking API (api-2) → Bookings (db-prod): reads, writes [SQL/TLS]Booking API (api-1) → Job queue (jobs-prod): queues jobsBooking API (api-2) → Job queue (jobs-prod): queues jobsJob queue (jobs-prod) → Worker (worker-1): deliversWorker (worker-1) → Certificates (files-prod): stores certificatesWorker (worker-1) → Bookings (db-prod): updates [SQL/TLS]routes[HTTP]routes[HTTP]reads, writes[SQL/TLS]reads, writes[SQL/TLS]queues jobsqueues jobsdeliversstores certificatesupdates[SQL/TLS]Ingress (ingress-prod) – load balancerIngress (ingress-prod)load balancerBooking API (api-1) – image: web app and APIBooking API (api-1)image: web app and APIBooking API (api-2) – image: web app and APIBooking API (api-2)image: web app and APIWorker (worker-1) – image: background jobsWorker (worker-1)image: background jobsJob queue (jobs-prod) – managed queueJob queue (jobs-prod)managed queueBookings (db-prod) – managed databaseBookings (db-prod)managed databaseCertificates (files-prod) – object storageCertificates (files-prod)object storage
Show chart data
Data for Course booking in production
InstanceKindBoundaryConnects to
Ingress (ingress-prod)serviceCloud region › Container clusterBooking API (api-1) (routes, via HTTP), Booking API (api-2) (routes, via HTTP)
Booking API (api-1)artifactCloud region › Container cluster › Node ABookings (db-prod) (reads, writes, via SQL/TLS), Job queue (jobs-prod) (queues jobs)
Booking API (api-2)artifactCloud region › Container cluster › Node BBookings (db-prod) (reads, writes, via SQL/TLS), Job queue (jobs-prod) (queues jobs)
Job queue (jobs-prod)queueCloud regionWorker (worker-1) (delivers)
Worker (worker-1)artifactCloud region › Container cluster › Node pool: workersCertificates (files-prod) (stores certificates), Bookings (db-prod) (updates, via SQL/TLS)
Bookings (db-prod)databaseCloud region
Certificates (files-prod)storageCloud region
  • Deployment view (default view)
  • Document a deployment