Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for groups #10

Open
Kranzes opened this issue Mar 2, 2022 · 2 comments
Open

Add support for groups #10

Kranzes opened this issue Mar 2, 2022 · 2 comments

Comments

@Kranzes
Copy link

Kranzes commented Mar 2, 2022

it would be very helpful if you could great a group of hosts that can then be deployed at once.

Nix code example:

nixinate = {
  group.production.hosts = [ "hetznix" "swordfish" ];
  group.production.buildOn = "remote"; # available options are "remote", "local" or a specific host
};
@mrVanDalo
Copy link
Contributor

I use parallel to run deployments in parallel

parallel --tag nix run ".#apps.nixinate.{1}" ::: machine1 machine2 machine3

and created aliases like alias deploy-prodction= ...

@cbleslie
Copy link

cbleslie commented Nov 2, 2024

Currently I use makefiles for "group" deployments like so:

deploy-nemesis: ## Deploy - Remote deploy to Nemesis
	nix run .#apps.nixinate.nemesis

deploy-hesperides: ## Deploy - Remote deploy to Hesperides
	nix run .#apps.nixinate.hesperides

deploy-all: ## Deploy - 'Parallel' remote deploy to Hesperides & Nemesis
	make deploy-hesperides &\
	make deploy-nemesis

deploy-all-slow: ## Deploy - Remote deploy in order: Hesperides & Nemesis. Good for debugging
	make deploy-hesperides
	make deploy-nemesis

Though I think I might make use of parallel instead of calls to the make file itself. Thanks @mrVanDalo !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants