惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
月光博客
月光博客
Y
Y Combinator Blog
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
美团技术团队
T
Tailwind CSS Blog
小众软件
小众软件
量子位
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
有赞技术团队
有赞技术团队
P
Proofpoint News Feed
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
The GitHub Blog
The GitHub Blog
博客园 - 三生石上(FineUI控件)
云风的 BLOG
云风的 BLOG
Vercel News
Vercel News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
V
Visual Studio Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More

Null's blog

Switching to harper-ls Switching to harper-ls Thinking long term; A weird story Thinking long term; A weird story The case against WebUsb The case against WebUsb Why Wayland is the future. Why Wayland is the future. Debugging a crashed kernel on opensuse Debugging a crashed kernel on opensuse Envisioning a future python Envisioning a future python server update, A new name, comments via firefish and lightmode server update, A new name, comments via firefish and lightmode A look back at the webserver A look back at the webserver Webserver Updates Webserver Updates Migrating to a custom blogging backend Migrating to a custom blogging backend Nixops to Deploy-rs Archlinux with secureboot on a nvidia machine Archlinux with secureboot on a nvidia machine Nixops the future of deploying applications? Nixops the future of deploying applications? Installing NixOS on a Running Install of Arch Linux Installing NixOS on a Running Install of Arch Linux Why you should use Neovim Why you should use Neovim Flatpaking Github Desktop Pt2: GPG
Nixops to Deploy-rs
nullrequest · 2022-04-18 · via Null's blog

You probably read my post about nixops a tool to remotely manage and provision NixOs installs. Nixops has 2 distinict versions you can install, nixops and nixopsUnstable. Unstable as of writing is more or less nixops 2.0. It supports nix flakes, python 3 instead of 2, and a host of features including a plugin system. However migrating from nixops 1 to 2 is completely undocumented. My attempts to switch have failed miserably due to this very issue.

Enter deploy-rs

Deploy-rs was created by serkoll it does a lot of the main use cases of nixops but its written in rust, has a ton of cool features like "magic rollbacks" and the core of deploy-rs profiles. While deploy-rs is fairly limited compared to nixops(nixops supports provisioning AWS machines, vms etc deploy-rs just handles existing nixos installs) what deploy-rs does, it does well.

Magic rollback

If one had to surmise this feature in a nutshell it would be "A feature that should have been in nixops from day one". The deploy process works a bit like this. First the env we will be deploying is built. After it is built we copy this over to the release machine and finally after this we switch to the new env. However sometimes for various reason when with switch to the new env stuff fails. services crash. If this was nixops we would just leave it in this state.

But this is deploy-rs. Deploy-rs reverse all the changes done and returns the system to the previous known good generation. Magic rollback is a killer feature, you no longer have to worry about your services going offline because of a bad config.

Migrating?

Migrating from nixops to deploy-rs is fairly easy, deploy-rs oversimplifying a wrapper around nixos configurations making it super simple to migrate. However deploy-rs does not do secretes, If you need secrets for your configs you need to use a 3rd party tool like sopsnix or agenix. Personally I found sopsnix to be more user friendly but it comes down to what fits your needs better.

Overall I feel until nixopsUnstable becomes stable deploy-rs is probably going to be most of the communities go to remote provisioning tool. I will be keenly watching Nixops 2.0 and hoping that if/when it comes out, it will address the scarcity in documentation and fairly high barrier of entry.