From owner-freebsd-questions@FreeBSD.ORG Sun May 2 15:18:12 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49DB1106566B for ; Sun, 2 May 2010 15:18:12 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr2.xs4all.nl (smtp-vbr2.xs4all.nl [194.109.24.22]) by mx1.freebsd.org (Postfix) with ESMTP id BBA288FC12 for ; Sun, 2 May 2010 15:18:11 +0000 (UTC) Received: from slackbox.erewhon.net (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr2.xs4all.nl (8.13.8/8.13.8) with ESMTP id o42FI9CE065432; Sun, 2 May 2010 17:18:09 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.net (Postfix, from userid 1001) id AF7FBBA9E; Sun, 2 May 2010 17:18:04 +0200 (CEST) Date: Sun, 2 May 2010 17:18:04 +0200 From: Roland Smith To: Oleg Lutchenko Message-ID: <20100502151804.GA10753@slackbox.erewhon.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline In-Reply-To: X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: Farm synchronization X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 15:18:12 -0000 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 02, 2010 at 06:17:34PM +0400, Oleg Lutchenko wrote: > Hello! >=20 > Is there any regular way to synchronize installed packages in the farm of > FreeBSD servers quickly. Forget packages. Here is wat I do to keep the ports on a couple of machines= in sync. - Ports are built and installed on a single powerfull workstation, the buil= d machine. - After updating the build machine (using portsnap and portmaster), the /usr/local and /var/db/pkg directories from that machine are distributed = to the dependent machines using rsync(1). - You may need to exclude /usr/local/etc from rsync, or use a script to cha= nge files in that directory afterwards to account for different hostnames and or IP addresses! I tend to keep config files for every machine in a git repository on my workstation, merge any chances from the updates and roll them out to the dependent machines. - Note that if you use ports that install kernel modules, you'll need to sy= nc /boot/modules as well! - On the dependent machines, the /usr/ports directory is removed to save sp= ace. This solution has made my life a lot easier. You'll have tha same ports installed on all machines. This can be viewed as making life easier or as a security risk, depending on how you look at it. = :-) But if your thoughts are leaning in the second direction, you can always us= e a script to pkg_delete the ports you don't need on specific machines. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --ikeVEW9yuYc//A+q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkvdl6wACgkQEnfvsMMhpyViNACggy1mMoCZqt71YETmKJY6lcJC mO4AoKyzvPUdYcxkE8mRbpEj9bY5pPK3 =mvck -----END PGP SIGNATURE----- --ikeVEW9yuYc//A+q--