Warning
NixOps is in low-maintenance mode and probably not suited for new projects. Use at your own risks.
Note
An experimental rewrite of NixOps is happening underhttps://github.com/nixops4/nixops4
NixOpsis a tool for deploying toNixOSmachines in a network or the cloud. Key features include:
- Declarative:NixOps determines and carries out actions necessary to realise a deployment configuration.
- Testable:Try your deployments onVirtualBoxorlibvirtd.
- Multi Cloud Support:Currently supports deployments toAWS,Hetzner,andGCE
- Separation of Concerns:Deployment descriptions are divided intologicalandphysicalaspects. This makes it easy to separate parts that saywhata machine should do fromwherethey should do it.
- Extensible:NixOpsis extensible through a plugin infrastructure which can be used to provide additional backends.
For more information, please refer to theNixOps manual.
NixOpsis included in nixpkgs and can be executed in a shell as follows:
$ nix-shell -p nixops
or for a bleeding edge version, including many fixes relative to the 1.7 series,
$ nix-shell -p nixopsUnstable
You may need access to a Nix remote builder if your system does not support the deployment'ssystem
builds directly. MacOS users may use a virtual machine with NixOS for this purpose.
It is also possible to use cross-compilation with NixOps, by settingnixpkgs.localSystem
andnixpkgs.crossSystem
.A mix of remote, emulated and cross builds is also possible; seethis writeup on eno.space.
You can build the Nix package by simply invokingnix-build
on the project root:
$ nix-build
shell.nix
provides an environment with all dependencies required for working onNixOps.You can usenix-shell
to
enter a shell suitable for working onNixOpswhich will contain all Python dependencies specified inpyproject.toml
$ nix-shell
Inside the development shell the tests can be executed as follows:
$ pytest
NixOps' documentation uses reStructuredText. When editing the docs, get a live-reloading, rendered version of the docs:
nixops$./live-docs.py
Serving on http://127.0.0.1:5500
and verify its lints before committing:
nixops$ lint-docs
Contributions to the project are welcome in the form of GitHub PRs. Please consider the following guidelines before creating PRs:
- Please make sure to format your code usingblack.
- Please add type signatures usingmypy.
- If you are planning to make any considerable changes, you should first present your plans in a GitHub issue so it can be discussed.
- If you are adding features, please also add reasonable tests.
Licensed underLGPL-3.0.