From 297367aaa5552893abe87e7894b5286654a36b76 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sun, 30 Sep 2018 09:40:28 +0200 Subject: [PATCH] krops article corrected a bit --- .markdownlint.json | 5 ++ content/nixos/krops.md | 151 +++++++++++++++++++++-------------------- 2 files changed, 84 insertions(+), 72 deletions(-) create mode 100644 .markdownlint.json diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..47e909d --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,5 @@ +{ + "MD033": { "allowed_elements": [ + "table", "thead", "tbody", "tr", "td", "th" + ]} +} \ No newline at end of file diff --git a/content/nixos/krops.md b/content/nixos/krops.md index 3301c51..7282d00 100644 --- a/content/nixos/krops.md +++ b/content/nixos/krops.md @@ -14,12 +14,12 @@ summary: > In this article we will checkout on how to deploy a server using krops and discuss all involved parameters and steps. - --- # krops -[NixOps](https://nixos.org/nixops/) the official DevOps tool of +[NixOps](https://nixos.org/nixops/) +the official DevOps tool of [NixOS ](https://nixos.org) is nice, but it has some flaws. [krops](https://cgit.krebsco.de/krops/about/) is an alternative to [NixOps](https://nixos.org/nixops/) trying to solve some of theses flaws, @@ -33,70 +33,73 @@ have a look at # krops vs. NixOps (Feature Comparison) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureNixOpskrops
- Precise versioning for every machine. - No Yes
Well documented Yes No
Lightweight Kinda Yes
- Native File Encryption - No Yes
- TMPFS Key Management - Yes No
- Manual Deployment Possible - No Yes
- Needs Database - Yes No
- Build and Download happens on - Client Target
FeatureNixOpskrops
+ Precise versioning for every machine. + No Yes
Well documented Yes No
Lightweight Kinda Yes
+ Native File Encryption + No Yes
+ TMPFS Key Management + Yes No
+ Manual Deployment Possible + No Yes
+ Needs Database + Yes No
+ Build and Download happens on + Client Target
- # krops Structure by Example krops is not an executable like NixOps, @@ -164,7 +167,8 @@ Once that file is created, you can run the command `./result` again. krops will copy the file `configuration.nix` to `/var/src/nixos-config` on `server01` and will clone `nixpkgs` into `/var/src/nixpkgs`. -After that, krops will run `nixos-rebuild switch -I /var/src` which will provision `server01`. +After that, krops will run `nixos-rebuild switch -I /var/src` which will provision +`server01`. ## The Different Parts Explained @@ -195,11 +199,13 @@ The executable `server01` is which results in the link `./result`. It is the result of `krops.writeDeploy` with parameters * `target` passed to the ssh command -* `source` the set of files and folders which should be made available beneath `/var/src` on the target +* `source` the set of files and folders which should be made available beneath + `/var/src` on the target {{% note %}} -`target` takes more argument parts than just the host, you can for example set it to `root@server01:4444/etc/krops/` +`target` takes more argument parts than just the host, +you can for example set it to `root@server01:4444/etc/krops/` to change the ssh port and the target folder it should be copied. @@ -396,8 +402,8 @@ in { ``` -Now you can create multiple `./result`s or you can use the `-A` parameter of nix-build to choose what -`./result` will be. +Now you can create multiple `./result`s or you can use the +`-A` parameter of nix-build to choose what `./result` will be. ```shell $> nix-build ./krops.nix -A server01 && ./result @@ -407,9 +413,10 @@ $> nix-build ./krops.nix -A all && ./result ## Update and Fixing Git Commits -Updating hashes for Git repositories is annoying and using branches might break consistency. -To avoid editing files you can use the `nix-prefetch-git` and `lib.importJson` to make -your live easier. +Updating hashes for Git repositories is annoying and using branches +might break consistency. +To avoid editing files you can use the `nix-prefetch-git` +and `lib.importJson` to make your live easier. ```shell $> nix-prefetch-git \