The Wayback Machine - https://web.archive.org/web/20200619160254/https://github.com/NixOS/nixops
Skip to content
NixOps is a tool for deploying to NixOS machines in a network or cloud.
Python Nix Shell
Branch: master
Clone or download

Latest commit

adisbladis Merge pull request #1367 from adisbladis/deployment_active
Rename Deployment.active -> Deployment.active_machines
Latest commit 1d3b208 Jun 15, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows github actions: Fetch full history Jun 10, 2020
ci mypy-ratchet.sh: use printf instead of echo Jun 11, 2020
doc Remove release.nix Jun 10, 2020
maintainers treewide: improve 2to3 conversion Feb 28, 2020
nix Remove the dependency on <nixpkgs> for flakes Jun 12, 2020
nixops Rename Deployment.active -> Deployment.active_machines Jun 12, 2020
scripts Convert scripts/nixops to setuptools entry point Mar 11, 2020
tests tests.unit.test_device_name_to_boto: Fix flake8 errors May 13, 2020
.flake8 Run --pdb check early May 18, 2020
.gitignore Add .mypy_cache to .gitignore Apr 20, 2020
.readthedocs.yml readthedocs: use a recent sphinx May 7, 2020
COPYING Add LGPLv3 license Feb 12, 2013
README.md README: add a bit of a splainer on docs May 6, 2020
coverage-tests.py treewide: s/python2/python3/g Feb 28, 2020
default.nix Pin flake-compat Jun 10, 2020
flake.lock flake.nix: Generate attrsets for all supported systems Jun 11, 2020
flake.nix flake.nix: Remove nixFlakes from dev-shell Jun 11, 2020
live-docs.py live-docs.py: automatically build docs once on startup May 6, 2020
overrides.nix Migrate to poetry2nix Apr 2, 2020
poetry.lock Re-lock dependencies May 24, 2020
pyproject.toml Add typing extensions as an explicit dependency May 24, 2020
setup.cfg Remove all references to Azure Apr 2, 2020
shell.nix Pin flake-compat Jun 10, 2020
tests.py format with 'black' Feb 21, 2020

README.md

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$ ./ci/lint-docs.sh

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.

You can’t perform that action at this time.