You are not logged in.

#1 2015-08-29 17:52:36

eduncan911
Member
Registered: 2015-05-02
Posts: 93
Website

How do u [easily] maintain multiple Arch installs?

I am considering moving my Windows server VMs performing multiple different functions over to Arch.  The code is all written for OSX and Linux, and running them on Windows server is just a bunch of hacks and version controls of Python, Ruby (ouch!) and other tooling.

I understand Arch isn't really meant as a server, unless you can invest the time into maintaining the distribution (weekly updates).

Quite honestly, this will be a hands off machine and VMs for several months. 

But, I'm OK with keeping 1 Arch install updated.

I am concerned with running 4 Arch VMs as a server.  That's too much work for me and I know it will get outdated.

TL;DR

Been searching for recommendations off and on for a few months and haven't came to anything conclusive.

Been running Arch natively on my tablet/laptop and use two VMs I transfer back and forth between my gaming desktop and work's macbook pro.

Those I can barely handle the constant updates, tweaks to config files, etc. 

Recently I've started using a combination of Git and  Syncthing to sync specific config files and some directories across all machines.  This has helped, but I must remember to update each Arch install before beginning to sit down and do something.  That's easy and I've started to write scripts to automate portions of that.

I use git to keep separate versions of specific files on different branches.  I can diff changes and commit them on these branches.

But really I'm at the extent I want to go for keeping multiple installs updated.  Adding 3 more VM installs on a server is not sounding fun for me.

I'm averaging about 2 to 3 weeks between updating each system as is, across 3 installs.  6?  Oh boy...

Last edited by eduncan911 (2015-08-29 17:57:45)

Offline

#2 2015-08-30 02:01:35

RaphaelLamperouge
Member
Registered: 2015-07-25
Posts: 16

Re: How do u [easily] maintain multiple Arch installs?

You can write a script with
pacman -Syu --noconfirm
and just run it automatically as root.

Is it really necessary to run all those VMs though? Can't you do everything from the same machine?

Last edited by RaphaelLamperouge (2015-08-30 02:04:09)

Offline

#3 2015-08-30 02:14:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: How do u [easily] maintain multiple Arch installs?

RaphaelLamperouge wrote:

You can write a script with
pacman -Syu --noconfirm
and just run it automatically as root.

He asked how to easily maintain arch installs, not how to easily break them.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2015-08-30 02:41:54

VanillaFunk
Member
From: MA. USA
Registered: 2013-06-10
Posts: 396
Website

Re: How do u [easily] maintain multiple Arch installs?

are the vms all going to run the same software ? or do they each have different purpose.  I could see many vms with all different uses being very hard to maintain


archx86_64 : awesomewm
https://github.com/dreemsoul

Remeber to feed the squirrels

Offline

#5 2015-08-30 03:22:55

eduncan911
Member
Registered: 2015-05-02
Posts: 93
Website

Re: How do u [easily] maintain multiple Arch installs?

As a general reply to all, let's not think of VMs or whatnots.

How would you attempt to maintain 3 or 4 remote Arch installs in a data center (different packages installed across them)?

Does it come down to weekly/twice-weekly SSHing and just doing 'pacman -Syu' for the next several years?

RaphaelLamperouge wrote:

Is it really necessary to run all those VMs though? Can't you do everything from the same machine?

They serve completely different purposes and utilize different hardware (one is extremely CPU intensive, another is Disk I/O intensive and the other is Network intensive - all while sharing some of those resources to an extent).  Having as separate VMs lets me throttle the overall VM (and even pause the entire VM) if one uses too much resources of the others. 

Previously I used to run them all on a single machine and it was a PITA.

Trilby wrote:
RaphaelLamperouge wrote:

You can write a script with
pacman -Syu --noconfirm
and just run it automatically as root.

He asked how to easily maintain arch installs, not how to easily break them.

smile

VanillaFunk wrote:

are the vms all going to run the same software ? or do they each have different purpose.

Nope, each VM serves different purposes and has different packages installed. 

VanillaFunk wrote:

I could see many vms with all different uses being very hard to maintain

Yep, that's what I've been coming to bare in the last several months of planning this.

Last edited by eduncan911 (2015-08-30 03:23:51)

Offline

#6 2015-08-30 06:17:40

RaphaelLamperouge
Member
Registered: 2015-07-25
Posts: 16

Re: How do u [easily] maintain multiple Arch installs?

Trilby wrote:
RaphaelLamperouge wrote:

You can write a script with
pacman -Syu --noconfirm
and just run it automatically as root.

He asked how to easily maintain arch installs, not how to easily break them.

Let's try to think in simple terms instead of over-engineering the problem right from the start.

He says the problem is constant fiddling with .config files and updates but...
Honestly, one needs to define what does it mean to  "maintain an installation", if you need to review every update manually or constantly fiddle with configuration files that you can't just automatically upload to source control and review in another machine then there's obviously no way to automate any of this.

First step would be to  pacman -Si "fundamental packages" for dependencies and compare to older results to see if anything major is happening, a script with diff, grep and sed could easily automate this, then if dependencies have moved just stop all maintenance scripts and send a mail to your personal machine, otherwise continue working normally.

System snapshots are cheap, you automate the snapshot, write it to another partition and then -Syu --noconfirm the snapshot and run some automated tests, if the tests pass, the script merges the snapshot, if the tests fail then the script just deletes the snapshot. You can also mail the test results to your personal machine as an additional layer of security. This way even if the --noconfirm breaks your computer, it won't matter because you only messed up a snapshot.

This would require some engineering and likely 2-days of work but the concept is simple enough and the results are almost fool-proof, how does it sound?

Last edited by RaphaelLamperouge (2015-08-30 06:24:42)

Offline

#7 2015-08-30 12:29:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: How do u [easily] maintain multiple Arch installs?

RaphaelLamperouge wrote:

then there's obviously no way to automate any of this.

This one I fully agree with. Eduncan911, I suspect archlinux is simply the wrong tool for this job.  I do use archlinux on a few servers I maintian, but I am regularly shelling into each of them - so regular updates are no issue at all.

You could automate the downloading of packages - so run `pacman -Syuw` on a timer.  That way when you shell in completing the update is a bit quicker.  But on any hardware with an internet connection suitable to be a server, I doubt the downloading of updates is really taking any time at all.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2015-08-30 13:09:51

eduncan911
Member
Registered: 2015-05-02
Posts: 93
Website

Re: How do u [easily] maintain multiple Arch installs?

Now that is what I wanted to hear.  Humm, snapshots and emails.  I don't mind putting in the extra setup if it works in the end.  But yeah, I'm leaning towards the latest Debian now with systemctl - at least I'll feel at home with that.

It hasn't been difficult to maintain my existing.  I follow best practices like don't move config files and use default locations for packages.

I do review each update looking for config files with .pacnew and diff'ing them to see what changed.  4 out of 5 times nothing changed that I want to bring over, but there is that 1 out of 5 though...

I also monitor the Arch announcements (twitter mobile alert of them on my phone) for breaking changes.

I'll try to explore this a bit further with the advice above.

Offline

#9 2015-08-30 13:14:25

eduncan911
Member
Registered: 2015-05-02
Posts: 93
Website

Re: How do u [easily] maintain multiple Arch installs?

How do you define Arch Kernel LTS?

I've read a bit and most explain it as a fallback kernel when something new installed that may not be compatible.

I know this may an insane question: but what about setting up an LTS kernel setup and leaving it - no updating for 6 months to a year or whenever I get around to it.

Since the most AUR packages I'll have are things like Ruby and Python, I'll only be using specific versions for those.  The rest of the install would be pretty bare (git, library supports maybe).

I'll set one up and let it go for a while between updates.  If the long wait between updates breaks too many things, I'll just rebuild under Debian if it is too much to fix.

Last edited by eduncan911 (2015-08-30 13:16:21)

Offline

#10 2015-08-30 13:15:44

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: How do u [easily] maintain multiple Arch installs?

eduncan911 wrote:

How would you attempt to maintain 3 or 4 remote Arch installs

Choose CentOS or Ubuntu LTS instead - much safer wink

Offline

#11 2015-09-10 23:49:37

Toje
Member
Registered: 2014-07-29
Posts: 14

Re: How do u [easily] maintain multiple Arch installs?

I have about 4 installs of arch across different architectures, but two on x86_64.

What I have is on my workstation a script that will jump into each system and run pacman, I'll do the update and make any quick changes.

Most of the time I don't need to even touch config files as while they may be "old" they work fine still on my servers. I only tend to update them when they stop working, and last time it was because the postfix one got moved, not because it became incompatible. I just make sure the Binaries and processes are updated.

But moving from Windows to Arch was worth the effort, I have had a lot less problems and much more speed.

Last edited by Toje (2015-09-10 23:51:02)

Offline

Board footer

Powered by FluxBB