Building packages with Micro and k3s
Warning
This is currently experimentalIn Micro
, currently it’s possible to build packages with K3s and Luet
First install k3s:
|
|
And start it:
|
|
To enable it permanently on boot, run runit-enable k3s
Wait for k3s to be ready (Until ContainerCreating
becomes Ready
):
|
|
Now install the luet controller:
|
|
And wait for it to be ready:
|
|
Once all is up, we are ready to build packages, try for example with:
|
|
In this case, we can inspect the build logs with:
|
|
(advanced) Multi-node setup
This section shows how to configure 2(or more) MocaccinoOS Micro instances with K3s and edgevpn.
Warning
Note, this setup is for development purposes, and intended to be run in a trusted environment, and just on Virtual machines. The following steps should only be carried out on test systems. Do make sure you have any important data backed up before starting a migration.Install edgevpn and k3s
|
|
Generate edgevpn configuration
|
|
Save the configuration file, it has to be available on all the machines that will belong to the cluster.
Start the vpn
We are ready to try to start the vpn:
-
on node A:
sudo IFACE=edgevpn0 ADDRESS=10.1.0.3/24 EDGEVPNCONFIG=vpn.yml edgevpn
-
on node B:
sudo IFACE=edgevpn0 ADDRESS=10.1.0.4/24 EDGEVPNCONFIG=vpm.yml edgevpn
Where:
IFACE
is the vpn interface to be createdADDRESS
is the address of the node in the vpn networkEDGEVPNCONFIG
is the path of the configuration which was generated before
If all goes well, we should see some connection messages, and after a while we should be able to ping the nodes.
Start k3s:
-
on node A:
k3s server --flannel-iface=edgevpn0
-
on node B:
K3S_URL=https://10.1.0.3:6443 K3S_TOKEN=xx k3s agent --flannel-iface=edgevpn0 --node-ip 10.1.0.4
Permanent setup
Annotate the IFACE
, ADDRESS
, and EDGEVPNCONFIG
in /etc/sv/edgevpn/conf
in each node, and then you can use the following yip file for example to configure k3s (to place under /etc/yip.d
):
Node A:
|
|
Node B:
|
|
Then enable the services at boot:
|
|