Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
47b8c8b
nix: add option to disable destructive database setup
Aug 3, 2026
3058bbd
nix: add self build openstack-client to system packages
Aug 3, 2026
1854ad6
nix: move database setup into a separate script
Aug 4, 2026
202396d
nix: move keystone setup into a separate script
Aug 4, 2026
99773bb
nix: move glance setup into a separate script
Aug 4, 2026
37173fc
nix: move cinder setup into a separate script
Aug 4, 2026
4882375
nix: move placement setup into a separate script
Aug 4, 2026
b7e5d5c
nix: move nova setup into a separate script
Aug 4, 2026
2a693a6
nix: move neutron setup into a separate script
Aug 4, 2026
38b8f51
nix: rename generated scripts
Aug 4, 2026
4dc5172
nix: split database script into create and cleanup
Aug 5, 2026
ea89869
nix: disable services but create all configurations and systemd units
Aug 5, 2026
f494897
nix: disable services but create all configurations and systemd units
Aug 5, 2026
87aa499
nix: disable services but create all configurations and systemd units
Aug 5, 2026
65b688a
nix: rename mysql command and stop services before setup its database
Aug 6, 2026
74530a0
nix: disable services but create all configurations and systemd units
Aug 6, 2026
dbfd936
nix: fix mysql database permissions
Aug 6, 2026
2b1a97b
nix: keystone configuration
Aug 6, 2026
e95d94f
nix: change enabled logic of glance-api service
Aug 6, 2026
f50b357
nix: change cinder-api deployment to a uwsgi vassal
Aug 6, 2026
eb4cf30
nix: fix cinder setup in CI/CD context
Aug 7, 2026
22ba8f2
nix: change placement-api deployment to a uwsgi vassal
Aug 7, 2026
40eb410
nix: nix cinder listen addresses
Aug 7, 2026
26c760c
nix: move global option into separate file
Aug 7, 2026
5050f22
nix: production setup for cinder-storage-node
Aug 7, 2026
64b2dea
nix: production setup for compute-node
Aug 7, 2026
3c6eef4
nix: prod setup neutron-openvswitch-agent
Aug 10, 2026
88b06bc
nix: fix listen address placement service
Aug 11, 2026
eef6f91
nix: fix glance persistent directories after reboot
Aug 11, 2026
2505c5e
nix: add check script for quick controller status
Aug 11, 2026
dd55a4d
nix: fix cinder persistent directories after reboot
Aug 12, 2026
5e3b995
nix: add cinder volume setup script
Aug 12, 2026
995f64e
nix: fix nova-compute persistent directories after reboot
Aug 12, 2026
6f03db6
nix: add environment config option to cinder
Aug 13, 2026
c6ba45a
nix: add environment config option to glance
Aug 13, 2026
d304248
nix: add environment config option to horizon
Aug 13, 2026
73d3ae1
nix: add environment config option to keystone
Aug 13, 2026
ec863d5
nix: add environment config option to placement
Aug 13, 2026
c4547ce
nix: fix neutron configuration symlinks
Aug 17, 2026
d4a8847
nix: explicitly enable uplink interfaces
Aug 17, 2026
ced0546
nix: update file content after configuration update
Aug 24, 2026
d33cc39
nix: add package designate
Aug 26, 2026
a969459
nix: add module designate with external knot dns server backend
Aug 27, 2026
300aff2
nix: add e2fsprogs to nova-compute systemd unit
Aug 28, 2026
002256a
nix: fix neutron runtime directory setup on controller
Aug 28, 2026
243a3c0
nix: storage module - make path of exported filesystem configurable
Sep 7, 2026
7eb455a
nix: storage module - add new configuration option: controllerHostname
Sep 7, 2026
d8e3dd0
nix: storage module - move configuration option into global namespace
Sep 7, 2026
a0b8f55
nix: compute module - use new configuration option: controllerHostname
Sep 7, 2026
fe99209
nix: controller module
Sep 7, 2026
3aeff30
nix: fix systemd-tmpfiles settings for a production deployment
Sep 8, 2026
b13400a
nix: fix generated configuration file name
Sep 8, 2026
f6e3e33
nix: use configuration as my_ip value
Sep 8, 2026
1c45913
nix: storage module - settings
Sep 8, 2026
99a9060
nix: storage module - move rootwrap configuration into a config option
Sep 8, 2026
22c67c5
nix: add option to specify live migration ip address
Sep 9, 2026
9912c8a
nix: more failure resistant script
Sep 15, 2026
0d3599c
nix: fix typo and more failsafe setup script
Sep 15, 2026
c8a3b8e
nix: standardize nfs configuration
Sep 15, 2026
a1ad0f6
nix: fix linting
Sep 15, 2026
34156ce
nix: enable caching in keystone
Sep 17, 2026
579dd9a
nix: fix keystone urls in all services
Sep 17, 2026
dfc1d08
nix: set mariadb max_connections to 500
Sep 17, 2026
a288ec0
nix: removed knot3 backend
Sep 18, 2026
9675dc1
nix: run database cleanup in CI/CD
Sep 18, 2026
25442a1
nix: bugifxes storage node
Sep 18, 2026
1e2fda9
nix: add openstack packages into system path
Sep 18, 2026
5c9a65e
nix: fix neutron-openvswitch-agent systemd unit dependency
Sep 23, 2026
49db309
nix: scope OpenStack options to their owning modules
hertrste Oct 14, 2026
c2cacde
nix: make manual Cinder setup device configurable
hertrste Oct 14, 2026
fe688b0
test: properly wait for volume creation
hertrste Oct 14, 2026
bf54c56
tests: work around ssh config file permission
hertrste Oct 14, 2026
e4f2956
controller: user defined controller name resolves via hosts
hertrste Oct 14, 2026
e50c326
cinder: use configured storage path
hertrste Oct 14, 2026
94249b2
cinder: fix cinder-schduler invocation
hertrste Oct 16, 2026
cde7d72
neutron: fix systemd dependency
hertrste Oct 16, 2026
fe8a5cf
nova: optional inbound_addr setting for migration
hertrste Oct 19, 2026
401d808
cinder: unify cinder-api
hertrste Oct 21, 2026
d394417
nix: exec placement via uwsgi
hertrste Oct 21, 2026
a0fa378
controller: enumerate setup scripts
hertrste Oct 21, 2026
d9e4e4c
controller: use adminEnv per default
hertrste Oct 21, 2026
43c48a3
package: fix oslo-middleware test failure
hertrste Oct 23, 2026
3be1368
glance: fix parallel test execution
hertrste Oct 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ openstack-nix.nixosModules
There are modules to setup the OpenStack controller, an OpenStack compute node
and modules simplifying the creation of new NixOS tests.

#### Designate DNS backend

Enabling `designate.enable` requires a separately configured BIND server.
The Designate module manages the OpenStack DNS services and their pool
configuration; the deployment owns BIND, its RNDC credentials, and DNS access.

The default pool expects BIND on the controller, serving DNS on port 53 and
accepting RNDC on `127.0.0.1:953`. Provision the matching RNDC key at
`/etc/bind/rndc.key` on the controller. Keep the key outside the Nix store;
Designate invokes RNDC through its privileged rootwrap helper.

### NixOS tests

The NixOS tests are located under the `tests` attribute. To execute a NixOS test
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
python3Packages
writeText
lib
libredirect
;
};

Expand Down
12 changes: 11 additions & 1 deletion modules/compute/compute.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
{ neutron, nova }:
{ ... }:
{ lib, ... }:
{
imports = [
../generic/global-options.nix
../generic/controller-host-entry.nix
(import ./neutron.nix { inherit neutron; })
(import ./nova.nix { inherit nova; })
];

options.openstack.computeIP = lib.mkOption {
type = lib.types.str;
description = ''
IP address of the compute node, used as Nova's my_ip and as the address
reached by the serial-console and VNC proxies. This address must already
be configured on the host; this option does not configure an interface.
'';
};
}
51 changes: 45 additions & 6 deletions modules/compute/neutron.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
config,
lib,
pkgs,
utils,
...
}:

with lib;

let
cfg = config.neutron;
providerDevice = "${utils.escapeSystemdPath "/sys/subsystem/net/devices/${cfg.providerInterface}"}.device";
neutron_env = pkgs.python3.buildEnv.override {
extraLibs = [ neutron ];
};
Expand All @@ -25,7 +27,7 @@ let
debug = false
# File name for the paste.deploy config for api service (string value)
api_paste_config = ${neutron}/etc/neutron/api-paste.ini
transport_url = rabbit://openstack:openstack@controller
transport_url = rabbit://openstack:openstack@${config.openstack.controllerHostname}
log_dir = /var/log/neutron

[agent]
Expand All @@ -50,6 +52,30 @@ let
filterPath = "/etc/neutron/rootwrap.d";
inherit utils_env;
};

openvswitchPrepareScript = pkgs.writeShellScript "openvswitch-setup.sh" ''
export PATH=${
lib.makeBinPath [
pkgs.openvswitch
]
}:$PATH

ovs-vsctl br-exists br-provider >/dev/null
status=$?

if [[ $status -eq 0 ]]; then
echo "br-provider already exists. No further setup tasks."
else
echo "br-provider didn't exist already. Proceed with basic setup."
set -euxo pipefail
ovs-vsctl add-br br-provider
fi
ovs-vsctl --may-exist add-port br-provider ${cfg.providerInterface}

# enable uplink provider interface
ip link set dev ${cfg.providerInterface} up
'';

in
{
options.neutron = {
Expand All @@ -68,6 +94,13 @@ in
The Neutron OpenVSwitch config.
'';
};
openvswitchPrepare = mkOption {
default = openvswitchPrepareScript;
description = ''
Default OpenVswitch prepare script of systemd unit: neutron-openvswitch-agent.service
This prepare script creates the basic openvswitch setup.
'';
};
providerInterface = mkOption {
default = "eth2";
type = types.str;
Expand All @@ -78,7 +111,7 @@ in
};
};

config = mkIf cfg.enable {
config = {
users.extraUsers.neutron = {
group = "neutron";
isSystemUser = true;
Expand Down Expand Up @@ -136,6 +169,14 @@ in
after = [
"network.target"
"ovsdb.service"
"ovs-vswitchd.service"
providerDevice
"systemd-networkd.service"
];
# Bridge setup needs both the switching daemon and the provider NIC.
requires = [
"ovs-vswitchd.service"
providerDevice
];
wantedBy = [ "multi-user.target" ];
path = with pkgs; [
Expand All @@ -150,14 +191,12 @@ in
conntrack-tools
];
serviceConfig = {
ExecStartPre = pkgs.writeShellScript "neutron-openvswitch-agent-pre.sh" ''
${pkgs.openvswitch}/bin/ovs-vsctl add-br br-provider
${pkgs.openvswitch}/bin/ovs-vsctl add-port br-provider ${cfg.providerInterface}
'';
ExecStartPre = "${cfg.openvswitchPrepare}";
ExecStart = pkgs.writeShellScript "neutron-openvswitch-agent.sh" ''
${neutron}/bin/neutron-openvswitch-agent --config-file=${cfg.config} --config-file=${cfg.openvswitchConfig}
'';
};
enable = cfg.enable;
};
};
}
35 changes: 20 additions & 15 deletions modules/compute/nova.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ let
state_path = /var/lib/nova
rootwrap_config = ${rootwrapConf}
compute_driver = libvirt.LibvirtDriver
my_ip = 10.0.0.39
transport_url = rabbit://openstack:openstack@controller
my_ip = ${config.openstack.computeIP}
transport_url = rabbit://openstack:openstack@${config.openstack.controllerHostname}

[api]
auth_strategy = keystone
Expand All @@ -38,12 +38,12 @@ let
connection = sqlite:////var/lib/nova/nova.sqlite

[glance]
api_servers = http://controller:9292
api_servers = http://${config.openstack.controllerHostname}:9292

[keystone_authtoken]
www_authenticate_uri = http://controller:5000/
auth_url = http://controller:5000/
memcached_servers = controller:11211
www_authenticate_uri = http://${config.openstack.controllerHostname}:5000/v3
auth_url = http://${config.openstack.controllerHostname}:5000/v3
memcached_servers = ${config.openstack.controllerHostname}:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
Expand All @@ -53,9 +53,12 @@ let

[libvirt]
virt_type = kvm
${optionalString (config.openstack.live_migration_inbound_addr != null) ''
live_migration_inbound_addr = ${config.openstack.live_migration_inbound_addr}
''}

[neutron]
auth_url = http://controller:5000
auth_url = http://${config.openstack.controllerHostname}:5000/v3
auth_type = password
project_domain_name = Default
user_domain_name = Default
Expand All @@ -76,13 +79,13 @@ let
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:5000/v3
auth_url = http://${config.openstack.controllerHostname}:5000/v3
username = placement
password = placement

[service_user]
send_service_user_token = true
auth_url = http://controller:5000/
auth_url = http://${config.openstack.controllerHostname}:5000/v3
auth_strategy = keystone
auth_type = password
project_domain_name = Default
Expand Down Expand Up @@ -146,7 +149,7 @@ in
};
};

config = mkIf cfg.enable {
config = {
users.extraUsers.nova = {
group = "nova";
isSystemUser = true;
Expand All @@ -162,28 +165,28 @@ in
systemd.tmpfiles.settings = {
"10-nova" = {
"/var/log/nova" = {
D = {
d = {
group = "nova";
mode = "0755";
user = "nova";
};
};
"/var/lock/nova" = {
D = {
d = {
group = "nova";
mode = "0755";
user = "nova";
};
};
"/var/lib/nova" = {
D = {
d = {
group = "nova";
mode = "0755";
user = "nova";
};
};
"/var/lib/nova/instances" = {
D = {
d = {
group = "nova";
mode = "0755";
user = "nova";
Expand All @@ -194,7 +197,7 @@ in
};

services.openiscsi = {
enable = true;
enable = cfg.enable;
name = "iqn.iscsi.${config.networking.hostName}";
};

Expand All @@ -220,6 +223,7 @@ in
lvm2
openiscsi
nfs-utils
e2fsprogs
]
++ cfg.extraPkgs;
environment.PYTHONPATH = "${nova_env}/${pkgs.python3.sitePackages}";
Expand All @@ -228,6 +232,7 @@ in
${cfg.novaPackage}/bin/nova-compute --config-file=${cfg.config}
'';
};
enable = cfg.enable;
};
};
}
Loading
Loading