1 |
Gentoo wrote: |
2 |
|
3 |
> hi Mlkey |
4 |
> I am not sure I understood your utility correctly. |
5 |
> the thing I want is setup a build server, then I can install my new server |
6 |
> from that box, let's say , a custermized and tested |
7 |
> stage3 image. |
8 |
|
9 |
When I am doing a fresh install of a box, I use the generated stage3 to |
10 |
start with, and the same portage snapshot. That is the easy part ;) |
11 |
|
12 |
Once the box is installed, I need a safe environment to maintain it. |
13 |
Generally I do upgrades a) every quarter or b) when a glsa requires it. To |
14 |
upgrade I download the new portage snapshot, change the snapdate: in the |
15 |
spec file, do the upgrade (with buildpkg in FEATURES). The new packages |
16 |
will be generated in packages/NEWDATE. If anything goes wrong I can fix it |
17 |
within the buildhost before rolling it out to the servers. If anything |
18 |
goes terribly wrong I can roll back to a stable state by changing the |
19 |
snapdate back, ditching the entire buildhost and its newly generated |
20 |
packages, re-creating from the original stage3... |
21 |
|
22 |
To populate new binary packages to the target servers, on the build server I |
23 |
have rsyncd set up to publish all of the snapshots/overlays, apache set up |
24 |
to publish the binary packages: |
25 |
|
26 |
/etc/rsyncd.conf entries: |
27 |
|
28 |
[snapshots] |
29 |
path = /var/buildhoster/snapshot_cache |
30 |
read only = yes |
31 |
exclude = distfiles/ packages/ |
32 |
|
33 |
[overlays] |
34 |
path = /var/buildhoster/overlays |
35 |
read only = yes |
36 |
exclude = .svn/ |
37 |
|
38 |
apache entries: |
39 |
Alias /packages/ /var/buildhoster/packages/ |
40 |
|
41 |
|
42 |
Corresponding entries in the target server make.conf: |
43 |
SYNC="rsync://buildserver.example.net/snapshots/portage-20060404/portage" |
44 |
PORTAGE_BINHOST="http://buildserver.example.net/packages/myserver/20060404/All/" |
45 |
|
46 |
So the basic process to update the target server goes: |
47 |
sync any overlays |
48 |
sync portage |
49 |
emerge -Dug world |
50 |
|
51 |
-- |
52 |
gentoo-server@g.o mailing list |