aboutsummaryrefslogtreecommitdiff
path: root/virtual
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-22 09:58:13 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-22 09:58:13 +0100
commit0f3047a77ee1e0b3d943e39d50301ba85821c572 (patch)
tree6a5a72bc3fd22127a5048f201b777f84c171e3c5 /virtual
parentf8d3b61afcde127404a01027afce9c31a22d5706 (diff)
downloadNix-0f3047a77ee1e0b3d943e39d50301ba85821c572.tar.gz
Nix-0f3047a77ee1e0b3d943e39d50301ba85821c572.tar.zst
Nix-0f3047a77ee1e0b3d943e39d50301ba85821c572.zip
Fix deprecation for networking addresses in hetzner
Diffstat (limited to 'virtual')
-rw-r--r--virtual/migrate_hetzner.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/virtual/migrate_hetzner.md b/virtual/migrate_hetzner.md
new file mode 100644
index 0000000..c7fbe20
--- /dev/null
+++ b/virtual/migrate_hetzner.md
@@ -0,0 +1,20 @@
1nixops show a deprecation message at each deployment because hetzner
2info 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