Live data from Hacker News

Ask HN: Configuration Management for Personal Computer?

news.ycombinator.com

1–10 of 144 posts

Ask HN: Configuration Management for Personal Computer?

#1
Hello HN,

Every couple of years I find myself facing the same old tired routine: migrating my stuff off some laptop or desktop to a new one, usually combined with an OS upgrade. Is there anything like the kind of luxuries we now consider normal on the server side (IaaS; Terraform; maybe Ansible) that can be used to manage your PC and that would make re-imaging it as easy as it is on the server side?

Re: Ask HN: Configuration Management for Personal Computer?

#2
I used a bash script with homebrew to reimage my MacBook fresh. With cask I can get almost every app I need and reinstate python and necessary packages. As you're working on the command line you can also modify most settings with defaults.write. I'm sure there is something similar you can do with windows and Linux.

Re: Ask HN: Configuration Management for Personal Computer?

#4
I tried to automate my most recent Ubuntu PC using this Ansible playbook as a starting point:

- https://github.com/lvancrayelynghe/ansible-ubuntu

It has some bells and whistles I stripped out (or wished I did).

One of the problems I haven't really solved: ongoing updates. Say I need to install a new apt package. Do I update the Ansible playbook and rerun it? I probably should. But more often, I just install it from the command line. Now my image is out of sync.

Also certain applications like Jenkins seems surprisingly hostile towards reproducible builds.

Re: Ask HN: Configuration Management for Personal Computer?

#5
For Windows, I use a PowerShell that launches a install of Choco followed by a bunch of Choco installs. For Mac, I have a bash script that installs homebrew then runs a bunch of brew and cask commands, installs xcode utils, and then command lines some App Store installs that aren’t available from cask.

Re: Ask HN: Configuration Management for Personal Computer?

#7
No need to over complicate things. I just have my ~/.dotfiles and if I remembered I saved a list of installed packages on my old install that I can go through and pick whatever I need. Could add some scripts for the things I know I need to do but that's already adding too much. My feeling is you'll end up working hours and hours to create the perfect setup (which doesn't exist so you just keep tweaking it forever).

Re: Ask HN: Configuration Management for Personal Computer?

#9
I have used VMWare as a base on Mac, Linux, and Windows hardware over the last 10 years. I do everything except for video conference in VMs (running Fedora), use multiple per purpose VMs at a time (eg segregate banking from client work and from email/social media), and just migrate the VM images when changing hardware. Recommended.

Re: Ask HN: Configuration Management for Personal Computer?

#10
I think overall its a mistake to try to over automate this process. It's brittle and the requirements are simply not the same as a server environment that needs to be simple to replicate X versions quickly, repeatedly and frequently.

Automation needs fairly constant attention in the order of little tweaks week over week to fight the inevitable mismatch between the automation and the software networks that it interfaces with.

Do you reinstall your workstation once a week? Unlikely and probably would be an unproductive use of your time.

The way I approach it instead -

The first thing I do is list everything I need for a workstation in an orgmode text file. For why orgmode really works well for this -

http://howardism.org/Technical/Emacs/literate-devops.html

I aim to make a "computational document" that I can execute a bit at a time as I review/check each piece on installs and upgrades of the system.

To me it's really critical that there are links to the webpages and text notes about these configurations alongside the code I'm using.

I check this and the needed config files into a single git repository.

As the workstations (I use the same document for workstation,laptop, studiopc, homeserver, android) age I'm inevitably adding and upgrading bits of the git repository. I make sure that I work from the orgmode document whenever I touch any configuration.

I use Linux and Emacs (which means a big part of my software environment is in a git controlled .emacs.d) so the entire environment supports this workflow.

Post reply on HN