Skip to content
forked from NixOS/nixops

NixOps, the NixOS-based cloud deployment tool

License

Notifications You must be signed in to change notification settings

johnalotoski/nixops

 
 

Repository files navigation

NixOps

Test

NixOps is a tool for deploying to NixOS machines 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 on VirtualBox or libvirtd.
  • Multi Cloud Support: Currently supports deployments to AWS, Hetzner, and GCE
  • Separation of Concerns: Deployment descriptions are divided into logical and physical aspects. This makes it easy to separate parts that say what a machine should do from where they should do it.
  • Extensible: NixOps is extensible through a plugin infrastructure which can be used to provide additional backends.

For more information, please refer to the NixOps manual.

Running

NixOps is included in nixpkgs and can be executed in a shell as follows:

$ nix-shell -p nixops

Note: Currently channels only provide NixOps <= 1.7. In order to run the NixOps version from master you can clone this repository and execute nix-shell:

$ git clone https://github.com/NixOS/nixops
$ nix-shell
$ nixops --version
NixOps @version@

Building And Developing

Building The Nix Package

You can build the Nix package by simply invoking nix-build on the project root:

$ nix-build

Development Shell

shell.nix provides an environment with all dependencies required for working on NixOps. You can use nix-shell to enter a shell suitable for working on NixOps which will contain all Python dependencies specified in pyproject.toml

$ nix-shell

Executing Tests

Inside the development shell the tests can be executed as follows:

$ ./coverage-tests.py -a '!libvirtd,!gce,!ec2,!azure' -v

Documentation

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

Contributing

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 using black.
  • Please add type signatures using mypy.
  • 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.

License

Licensed under LGPL-3.0.

About

NixOps, the NixOS-based cloud deployment tool

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 83.6%
  • Nix 15.9%
  • Shell 0.5%