1 |
On 13/12/2013 01:54, Grant wrote: |
2 |
> I'm about to embark on this (perilous?) journey and I'm wondering if |
3 |
> anyone would make a comment on any of the questions in the last |
4 |
> paragraph below. This is basically my plan for setting up a bunch of |
5 |
> systems (laptops) in an office which are hardware-identical to my own |
6 |
> laptop and creating a framework to manage them all with a bare minimum |
7 |
> of time and effort. |
8 |
|
9 |
There's nothing inherently wrong with rsyncing onto a running system, |
10 |
that's what portage (and every make install in the world :-) ) does |
11 |
anyway. Maybe the scale of what you want to do is bigger |
12 |
|
13 |
This is Unix, and is knows how to deal with replaced files properly |
14 |
(unlike our friends over in Redmond) |
15 |
|
16 |
You will find app-admin/checkrestart very useful to run on the laptops |
17 |
if you don't already have it. Essentially, it looks for all files that |
18 |
are in use and have been deleted then tells you which process are |
19 |
involved so you can restart them. |
20 |
|
21 |
The only other issue that comes to mind is connectivity, do beware of |
22 |
network connections going away while you're in the middle of updates. |
23 |
Proper sensible error handling code in your scripts should take care of this |
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
> |
30 |
> Thanks, |
31 |
> Grant |
32 |
> |
33 |
> |
34 |
>>>>>>> I see what you desire now - essentially you want to clone your laptop |
35 |
>>>>>>> (or big chunks of it) over to your other workstations. |
36 |
>> |
37 |
>> I've been working on this and I think I have a good and simple plan. |
38 |
>> |
39 |
>> My laptop roams around with me and is the "master" system. The office |
40 |
>> router is the "submaster" system. All of the other office systems are |
41 |
>> "minion" systems. All of the systems are 100% hardware-identical |
42 |
>> laptops. All of the minions are 100% software-identical. |
43 |
>> |
44 |
>> I install every package that any system needs on the master and create |
45 |
>> an SSH keypair. The only config files that change from their state on |
46 |
>> the master are: /etc/conf.d/hostname, /etc/conf.d/net, |
47 |
>> /etc/ssh/sshd_config, /etc/shorewall/*. I write comments in those |
48 |
>> files which serve as flags for scripted changes. |
49 |
>> |
50 |
>> I write a script that is run from the master to the submaster, or from |
51 |
>> the submaster to a minion. If it's the former, rsync / is run with |
52 |
>> exceptions (/usr/portage, /usr/local/portage, /var/log, /tmp, /home, |
53 |
>> /root but /root/.ssh/id_rsa_script* is included), my personal user is |
54 |
>> removed, a series of workstation users are created with useradd -m, |
55 |
>> services are added or removed from /etc/runlevels/default, and config |
56 |
>> files are changed according to comment flags. If it's the latter, |
57 |
>> rsync / is run without exceptions, services are added or removed from |
58 |
>> /etc/runlevels/default, and config files are changed according to |
59 |
>> comment flags. |
60 |
>> |
61 |
>> All user info on the submaster and minions would be effectively reset |
62 |
>> whenever the script is run and that's fine. Root logins would have to |
63 |
>> be allowed on the submaster and minions but only with the SSH key. |
64 |
>> There are probably more paths to exclude when rsyncing master to |
65 |
>> submaster. |
66 |
>> |
67 |
>> That's it. No matter how numerous the minions become, this should |
68 |
>> allow me to keep everything running by administrating only my own |
69 |
>> system, pushing that to the submaster, and having the submaster push |
70 |
>> to the minions. I've been going over the nitty-gritty and everything |
71 |
>> looks good. |
72 |
>> |
73 |
>> What do you think? Is there anything inherently wrong with rsyncing / |
74 |
>> onto a running system? If there are little or no changes to make, |
75 |
>> about how much data would actually be transferred? Is there a better |
76 |
>> tool for this than rsync? I know Funtoo uses git for syncing with |
77 |
>> their portage tree. |
78 |
>> |
79 |
>> - Grant |
80 |
> |
81 |
> |
82 |
> |
83 |
|
84 |
|
85 |
-- |
86 |
Alan McKinnon |
87 |
alan.mckinnon@×××××.com |