Skip to main content

Step 7. Full rollout

McDougals is delighted with Edgecell (why would they not be?) and are now ready to rollout nodes to every store.

They have more than 1000 stores. Manually creating each placement file and schedule file would take a long time and could be full of mistakes. Instead they use rules and the VSCode extension tools.

note

A rule is used to check object files and flag errors.

A plan is used to generate object files.

Placement rule

It is a straightforward process to create a script that generates yaml files from a database or CSV file. Thats what we did for all of McDougals stores. Checking those files is another matter.

The following placement rule says that any placement with label sales set to M or L should gave three nodes as specified.

apiVersion: edgecell.io/v1
kind: PlacementRule
metadata:
name: sizing-rule-medium
namespace: mcdougals.com
spec:
selector:
matchExpressions:
- { key: sales, operator: In, values: [M, L] }
nodes:
- type: edgecell.io/aa1
- type: edgecell.io/aa1
- type: edgecell.io/aa1
localnetwork:
type: dhcp

The VSCode extensions will check the workspace and flag an error on any placements that do not meet this rule.

Schedule plan

The following specifies a schedule that spans from 2023-03-20 to 2024-03-11, excluding the week of 2023-12-25. It will plan the placements of region 1 first, region 9 second, etc. Within the placements of region 1, it will plan XL sales first, L sales second, etc.

apiVersion: edgecell.io/v1
kind: SchedulePlan
metadata:
name: initial-plan
namespace: mcdougals.com
spec:
timeframe:
start: 2023W12
end: 2024W11
exclude:
- 2023W52
sequence:
- priority: 1
label: region
order: [1,9,2,3,6,7,8]
- priority: 2
label: sales
order: [XL, L, M, S, XS]

The VSCode extension has a command to generate the schedule files from a schedule plan file.

One can edit the generated files to override the default settings if necessary.

info

A complete McDougals example is available on GitLab.