Skip to main content

Step 4. Create cluster

McDougals should now have three nodes, three uno-148 servers to be precise, at their headquarters ready for their pilot of Edgecell.

Placement node assignment

McDougals must assign the nodes to the placement. They do so by editing the placement object and provide the links to the nodes in the spec.

So this:

- type: edgecell.io/uno-148-a

becomes this:

- type: edgecell.io/uno-148-a
node: mcdougals.com/gluebook33
network:
type: dhcp

Now when McDougals plugs in the nodes and turns them on, they will create a cluster. The complete object is shown below.

apiVersion: edgecell.io/v1
kind: Placement
metadata:
name: pilot01
namespace: mcdougals.com
uuid: 6f852492-2b5d-45c9-93d9-5129a77ad1d2
labels:
env: test
annotations:
description: Pilot cluster
telephone: 940.555.3057
address: |-
McDougals HQ
2700 West University
Denton, TX 76201
spec:
nodes:
- type: edgecell.io/uno-148-a
node: mcdougals.com/gluebook33
network:
type: dhcp
- type: edgecell.io/uno-148-a
node: mcdougals.com/greymane95
network:
type: dhcp
- type: edgecell.io/uno-148-a
node: mcdougals.com/loudfred24
network:
type: dhcp

How does that work?

The McDougals development environment is connected to a build server. Edgecell assigned a node to the McDougals by pushing the object file to the main branch in the repository. When that happened, the build server created a repository for that node and assigned the node to read its state from that repository. When McDougals assigned the node to a placement, the build server updated the node's repo to tell it what cluster it was now assigned to.

Why manual assignment?

As mentioned in step 3, multiple placements may be shipped to the same address. For instance, you may plan multiple clusters in the same factory. If the provider assigned the node to the placement, then some poor sap would be responsible for making sure that the exact serial numbers were placed together. Nobody wants to do that. Instead, you just note which boxes were unpacked together at the time of the installation.

The VS Code tools provide a command that makes the edits for you, so it's not that much work. The tools also make checks such seeing that the thing types match.

Network

In some placements, the customer needs to specify a fixed IP address on the local network for each node. In this case, the customer is fine with a dynamic assignment.

How do they connect to the cluster if they don't know the address? Well, actually they do know the address. Every node is assigned a global IP address on the McDougals' edge private network (EPN). McDougals' development environment is also on that same EPN. That way, it doesn't matter what the node's local IP address is or even if it gets messed up.