make docker swarm persistent using virtiofs share
This commit is contained in:
parent
17f110b183
commit
cf57391629
1 changed files with 18 additions and 2 deletions
|
@ -81,7 +81,7 @@
|
|||
type = "virtual";
|
||||
hypervisorName = "lewis";
|
||||
|
||||
nixosModule = { pkgs, lib, ... }: {
|
||||
nixosModule = { pkgs, lib, config, ... }: {
|
||||
lab.vm = {
|
||||
id = 1;
|
||||
staticNetworking = true;
|
||||
|
@ -89,6 +89,14 @@
|
|||
staticIPv6 = "2a0d:6e00:1a77:30::42";
|
||||
};
|
||||
|
||||
microvm.shares = [{
|
||||
source = "/var/lib/microvms/${config.networking.hostName}/shares/docker_swarm";
|
||||
mountPoint = "/var/lib/docker/swarm";
|
||||
tag = "docker_swarm";
|
||||
proto = "virtiofs";
|
||||
socket = "docker_swarm.sock";
|
||||
}];
|
||||
|
||||
networking = {
|
||||
nftables.enable = lib.mkForce false;
|
||||
firewall.enable = lib.mkForce false;
|
||||
|
@ -112,9 +120,17 @@
|
|||
type = "virtual";
|
||||
hypervisorName = "lewis";
|
||||
|
||||
nixosModule = { pkgs, lib, ... }: {
|
||||
nixosModule = { pkgs, lib, config, ... }: {
|
||||
lab.vm.id = 2;
|
||||
|
||||
microvm.shares = [{
|
||||
source = "/var/lib/microvms/${config.networking.hostName}/shares/docker_swarm";
|
||||
mountPoint = "/var/lib/docker/swarm";
|
||||
tag = "docker_swarm";
|
||||
proto = "virtiofs";
|
||||
socket = "docker_swarm.sock";
|
||||
}];
|
||||
|
||||
networking = {
|
||||
nftables.enable = lib.mkForce false;
|
||||
firewall.enable = lib.mkForce false;
|
||||
|
|
Loading…
Reference in a new issue