5

I'm currently managing a dozen servers. apt-cacher-ng is installed on the development server to maintain the packages.

The idea is to have exactly the same version and number of packages on the production servers.

We first make the update/upgrade on the dev server, then after validating the install (which can take a few hours or a day), we make the same on the production servers.

The problem is that between the time we make the update on the dev and on the production server, versions of packages may have changed so production servers won't get the same version of the packages.

Can I force the clients (production servers) to sync with the dev server, and not retrieve newer packages on the internet?

Or, is there any clever automated way to make sure my clients are in sync with the dev server?

Thanks for reading.

EDIT:

Found this link: debian-administration.org: Cloning a Debian system - identical packages and versions.

It partially solves my problem, but I'm still looking for an answer with apt-cacher-ng or else.

3 Answers 3

1

Have you tried putting the acng service into offline mode?

After you've updated the dev server, add offlinemode:1 to the acng config file and restart the server. It can still serve the cached content but won't retrieve any newer packages over the Internet.

0

I realise this is an old question, but here is the way I solve this problem.

You can specify version numbers when you call call apt-get install, you do so like this:

apt-get install apache2=2.2.20-1ubuntu1

which will install version 2.2.20-1ubuntu1 of apache2. So when you set up the development server, make sure you specify the latest version number, which will give you the same result as simply apt-get install x. But then when you move to production, specify the same version number (which will be stored in you ap-cacher-ng server) to install that exact version, regardless of whether new versions have been released.

See this question for more details.

0

Just create a preference configuration dev-dep-pin.conf in /etc/apt/preferences.d to pin down only the dependency package whose version matters (or there is no point to auto-update, right?) on both prod and dev server. You can use the policy conditions wisely to create pinning scheme that works best.

scp/rsync that file between dev and prod server before you need to sync packages between production and dev servers via apt-update/apt-upgrade/apt-install.

This way, you let production server auto-update system packages freely, meanwhile maintaining versions of important package in the dependency tree configured exactly the same as the dev server.

Specifying the version during installation can't guarantee the package won't change in future updates/installations(as dependent of other package). Pinning is to make it persistent.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .