ArticCon 2022 (continued)
defining a configuration, aka schema
Rather than think about how the tools available to you expect their format defined, I prefer to think in terms of how it would be preferable to modify and manage. Less “how do I make this work” and more “how do I want this to work”
When designing systems the day to day management is a crucial component that is often overlooked. Personally, I like to avoid vendor specific terms for general things, such as most networking constructs. 1
For example, when dealing with topographies all I care about are networks, subnets, and how to represent those. A lot of vendor specific nomenclature can be omitted.
So in typescript
// name of our networks
type Vpcs = 'infra' | 'management' | 'sales';
// name of our subnets
type Subnets = 'db' | 'app';
// things that every subnet (in our networks) will have
type Cidr = string;
type Gateway = string;
// a way to look up subnets
type VpcAllocation = {
subNets: Record<Subnets, { cidr: Cidr; gateway: Gateway }>;
};
// and a way to look up vpcs
type Topo = Record<Vpcs, VpcAllocation>;
-
And there are certainly exceptions to this. ↩︎