Skip to content

Commit

Permalink
Describe commands: build, push and deploy (#63)
Browse files Browse the repository at this point in the history
Add descriptions of commands: build, push and deploy
  • Loading branch information
nhey committed Aug 8, 2019
1 parent e08366d commit 8c232a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Consider checking out a specific tag, or at least pin the version of morph you'r

## Using morph

All commands supports a `--help` flag. `morph --help` as of v1.0.0:
All commands support a `--help` flag; `morph --help` as of v1.0.0:
```
$ morph --help
usage: morph [<flags>] <command> [<args> ...]
Expand All @@ -42,13 +42,13 @@ Commands:
Show help.
build [<flags>] <deployment>
Build machines
Evaluate and build deployment configuration to the local Nix store
push [<flags>] <deployment>
Push machines
Build and transfer items from the local Nix store to target machines
deploy [<flags>] <deployment> <switch-action>
Deploy machines
Build, push and activate new configuration on machines according to switch-action
check-health [<flags>] <deployment>
Run health checks
Expand All @@ -60,7 +60,11 @@ Commands:
Execute arbitrary commands on machines
```

For help on other commands, run `morph <cmd> --help`.
Notably, `morph deploy` requires a `<switch-action>`.
The switch-action must be one of `dry-activate`, `test`, `switch` or `boot` corresponding to `nixos-rebuild` arguments of the same name.
Refer to the [NixOS manual](https://nixos.org/nixos/manual/index.html#sec-changing-config) for a detailed description of switch-actions.

For help on this and other commands, run `morph <cmd> --help`.

Example deployments can be found in the `examples` directory, and built as follows:
```
Expand Down
6 changes: 3 additions & 3 deletions morph.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ var (
nixBuildArg []string
nixBuildTarget string
nixBuildTargetFile string
build = buildCmd(app.Command("build", "Build machines"))
push = pushCmd(app.Command("push", "Push machines"))
deploy = deployCmd(app.Command("deploy", "Deploy machines"))
build = buildCmd(app.Command("build", "Evaluate and build deployment configuration to the local Nix store"))
push = pushCmd(app.Command("push", "Build and transfer items from the local Nix store to target machines"))
deploy = deployCmd(app.Command("deploy", "Build, push and activate new configuration on machines according to switch-action"))
deploySwitchAction string
deployUploadSecrets bool
deployReboot bool
Expand Down

0 comments on commit 8c232a4

Please sign in to comment.