diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-24 13:33:32 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-04-25 00:04:20 +0200 |
commit | f30b025f51adcda6cf2b72e39805b39ff66261a5 (patch) | |
tree | f032033f64a25bd8a2f2fe8146029754687673bd /docs | |
parent | 1fa79a7af7eb5bbc428a0cfc8ce092bba3e81443 (diff) | |
download | NUR-f30b025f51adcda6cf2b72e39805b39ff66261a5.tar.gz NUR-f30b025f51adcda6cf2b72e39805b39ff66261a5.tar.zst NUR-f30b025f51adcda6cf2b72e39805b39ff66261a5.zip |
Migrate documentation
Diffstat (limited to 'docs')
-rw-r--r-- | docs/migrate_hetzner.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/migrate_hetzner.md b/docs/migrate_hetzner.md new file mode 100644 index 00000000..c7fbe207 --- /dev/null +++ b/docs/migrate_hetzner.md | |||
@@ -0,0 +1,20 @@ | |||
1 | nixops show a deprecation message at each deployment because hetzner | ||
2 | info is outdated. To fix it: | ||
3 | |||
4 | cp -a ~/.nixops ~/.nixops.bak | ||
5 | |||
6 | nixops export --all > all.json | ||
7 | |||
8 | network=$(cat all.json| jq -r '."cef694f3-081d-11e9-b31f-0242ec186adf".resources.eldiron."hetzner.networkInfo"' | jq -r -c '.networking.interfaces.eth0 = { "ipv4": { "addresses": [ { "address": .networking.interfaces.eth0.ipAddress, "prefixLength": .networking.interfaces.eth0.prefixLength } ] } }') | ||
9 | |||
10 | cat all.json | jq --arg network "$network" '."cef694f3-081d-11e9-b31f-0242ec186adf".resources.eldiron."hetzner.networkInfo" = $network' > all_new.json | ||
11 | |||
12 | nixops delete --force -d eldiron | ||
13 | |||
14 | nixops import < all_new.json | ||
15 | |||
16 | rm all.json all_new.json | ||
17 | |||
18 | *check that everything works*, then: | ||
19 | |||
20 | rm -rf ~/.nixops.bak | ||