1 |
>>> I'm about to embark on this (perilous?) journey and I'm wondering if |
2 |
>>> anyone would make a comment on any of the questions in the last paragraph |
3 |
>>> below. This is basically my plan for setting up a bunch of systems |
4 |
>>> (laptops) in an office which are hardware-identical to my own laptop and |
5 |
>>> creating a framework to manage them all with a bare minimum of time and |
6 |
>>> effort. |
7 |
>>> |
8 |
>>> Thanks, Grant |
9 |
>>> |
10 |
>>> |
11 |
>>>>>>>>> I see what you desire now - essentially you want to clone |
12 |
>>>>>>>>> your laptop (or big chunks of it) over to your other |
13 |
>>>>>>>>> workstations. |
14 |
>>>> |
15 |
>>>> I've been working on this and I think I have a good and simple plan. |
16 |
>>>> |
17 |
>>>> My laptop roams around with me and is the "master" system. The office |
18 |
>>>> router is the "submaster" system. All of the other office systems are |
19 |
>>>> "minion" systems. All of the systems are 100% hardware-identical |
20 |
>>>> laptops. All of the minions are 100% software-identical. |
21 |
>>>> |
22 |
>>>> I install every package that any system needs on the master and create |
23 |
>>>> an SSH keypair. The only config files that change from their state on |
24 |
>>>> the master are: /etc/conf.d/hostname, /etc/conf.d/net, |
25 |
>>>> /etc/ssh/sshd_config, /etc/shorewall/*. I write comments in those |
26 |
>>>> files which serve as flags for scripted changes. |
27 |
>>>> |
28 |
>>>> I write a script that is run from the master to the submaster, or from |
29 |
>>>> the submaster to a minion. If it's the former, rsync / is run with |
30 |
>>>> exceptions (/usr/portage, /usr/local/portage, /var/log, /tmp, /home, |
31 |
>>>> /root but /root/.ssh/id_rsa_script* is included), my personal user is |
32 |
>>>> removed, a series of workstation users are created with useradd -m, |
33 |
>>>> services are added or removed from /etc/runlevels/default, and config |
34 |
>>>> files are changed according to comment flags. If it's the latter, |
35 |
>>>> rsync / is run without exceptions, services are added or removed from |
36 |
>>>> /etc/runlevels/default, and config files are changed according to |
37 |
>>>> comment flags. |
38 |
>>>> |
39 |
>>>> All user info on the submaster and minions would be effectively reset |
40 |
>>>> whenever the script is run and that's fine. Root logins would have to |
41 |
>>>> be allowed on the submaster and minions but only with the SSH key. |
42 |
>>>> There are probably more paths to exclude when rsyncing master to |
43 |
>>>> submaster. |
44 |
>>>> |
45 |
>>>> That's it. No matter how numerous the minions become, this should |
46 |
>>>> allow me to keep everything running by administrating only my own |
47 |
>>>> system, pushing that to the submaster, and having the submaster push to |
48 |
>>>> the minions. I've been going over the nitty-gritty and everything |
49 |
>>>> looks good. |
50 |
>>>> |
51 |
>>>> What do you think? Is there anything inherently wrong with rsyncing / |
52 |
>>>> onto a running system? If there are little or no changes to make, |
53 |
>>>> about how much data would actually be transferred? Is there a better |
54 |
>>>> tool for this than rsync? I know Funtoo uses git for syncing with |
55 |
>>>> their portage tree. |
56 |
>>>> |
57 |
>>>> - Grant |
58 |
>>> |
59 |
> I'm also somewhat skeptical of rsyncing binaries and libraries on a running |
60 |
> system - it seems needlessly dangerous, particularly for things that have |
61 |
> complex deps. |
62 |
> |
63 |
> A mixed alternative to this would be: |
64 |
> |
65 |
> use rsync to manage distributing the system-wide configuration files for all |
66 |
> relevant packages (similar to what you're doing at the moment). This could |
67 |
> include just the /etc directory (and/or other system-wide config directories) |
68 |
> leaving the user files untouched |
69 |
> |
70 |
> instead of trying to rsync any binaries or libraries, use the master to build |
71 |
> a binary package ("--buildpkg") of whatever software is to be installed, with |
72 |
> the package directory shared over NFS or similar. Then, on the slaves, set |
73 |
> emerge default opts to "--usepkg" or "--usepkgonly" with a cron job, leaving |
74 |
> the actual updating of applications on the slave systems to portage. |
75 |
|
76 |
I may end up using portage instead of rsync but I think I'd like to |
77 |
try rsync first. Am I setting myself up for failure? |
78 |
|
79 |
- Grant |