nixos-module/server/lxc-containers: remove cold standby scripts
This commit is contained in:
parent
bcf06cbbc9
commit
1c51ae99c5
11
README.md
11
README.md
|
@ -123,17 +123,6 @@ $EDITOR config/secrets-production.nix
|
|||
nix run .#encrypt-secrets
|
||||
```
|
||||
|
||||
### server1 als Cold Standby
|
||||
|
||||
Was ein Server kann, kann ein anderer auch. Er sollte gelegentlich
|
||||
gebootet und aufgefrischt werden.
|
||||
|
||||
Damit die LXC-Container ganz kontrolliert nur auf einem gestartet
|
||||
werden, muss die Datei `/etc/start-containers` *vorhanden* sein. Zum
|
||||
Umgang damit gibt es die zwei handlichen Befehle `enable-containers`
|
||||
und `disable-containers`.
|
||||
|
||||
|
||||
#### IP Subnet Plans
|
||||
|
||||
`nix build .#`[subnetplan4](https://hydra.hq.c3d2.de/job/c3d2/zentralwerk-network/subnetplans/latest/download/1)
|
||||
|
|
|
@ -137,16 +137,6 @@ let
|
|||
done
|
||||
set -e
|
||||
'';
|
||||
|
||||
enable-script = pkgs.writeScriptBin "enable-containers" ''
|
||||
touch /etc/start-containers
|
||||
systemctl start lxc-containers.target
|
||||
'';
|
||||
|
||||
disable-script = pkgs.writeScriptBin "disable-containers" ''
|
||||
rm /etc/start-containers
|
||||
systemctl stop lxc-containers.target lxc@\*.service
|
||||
'';
|
||||
in
|
||||
{
|
||||
boot.kernel.sysctl = lib.mkIf enabled {
|
||||
|
@ -172,8 +162,6 @@ in
|
|||
environment.systemPackages = [
|
||||
# `lxc-attach` et al
|
||||
pkgs.lxc build-script
|
||||
# User scripts
|
||||
enable-script disable-script
|
||||
];
|
||||
|
||||
# Create lxc.container.conf files
|
||||
|
@ -227,7 +215,6 @@ in
|
|||
after = [ "network.target" ];
|
||||
unitConfig.ConditionPathExists = [
|
||||
"/var/lib/lxc/%i/rootfs/init"
|
||||
"/etc/start-containers"
|
||||
];
|
||||
serviceConfig = with pkgs; {
|
||||
Type = "simple";
|
||||
|
|
Loading…
Reference in New Issue