Take Control of OS X Server, Chapter 12: Software Updates
If you’re interested in reducing unnecessary bandwidth usage from multiple users downloading the same software updates, or in controlling which Apple updates your Mac users can install, read this chapter of Charles Edge’s “Take Control of OS X Server” for details on the similar but separate Caching and Software Update services.
I've set up the Yosemite Server beta on a Mac mini. One reason I want to use this is for caching. It doesn't seem to work; I've been downloading iOS and OS X updates to my various devices, and the data is not going through the server, and the cache on the server isn't filling up. (It says 15 MB used for iOS apps; but I've updated much more than that.
As I understand, this should be transparent, with the server sending some sort of info to Apple's servers. It's clearly not the case here, and there must be something I need to do on the client devices. Any ideas why it's not working? I doubt it's because it's the Yosemite beta...
No, the Caching service is entirely transparent (at least in the Mavericks version), so I doubt there's anything you're missing. The Caching server does need to be behind a NAT gateway, so it and the clients it's serving are on the same local network.
You can also look at the Bytes Server graph in the Stats screen to see if anything's happening there.
BTW, I wouldn't dismiss the fact that you're using Yosemite Server beta - Apple has been known to break large chunks of OS X Server in major releases, such that many admins don't even think about upgrading for a few dot releases.
Another question about software updates and caching. I have the App Store settings set to auto-downloand and install updates. But when I go to the App Store, and see updates, they're not downloaded, and I have to enter my Apple ID password - as I'd expect - to download them.
So how will it ever auto-downloand and install updates?
I'm clearly missing something here; I've never had this setting turned on on any of my Macs, so maybe it will just work? For now, it's not; there are three updates stuck that won't download either automatically or manually.
Hmm, I'm really not sure what's going on with this - we'll see if Charles has any thoughts. The Yosemite Server beta could be involved, but there's no telling. On my Mavericks Server box, Caching just works, with no client configuration.
The beta builds don't usually do them properly as they usually point to a repo that's not updated/live yet. I've found it works on the day of the new release but often not very much time before. The Software Update service can be pointed at the old location, but Caching is dynamic and doesn't have an XML file of all the updates.
It might be worth adding to the "Differences between Caching and Software Update" box that for a client - they will update via the Internet directly if not on the servers LAN. However if software update is configured the client will not fall back to Internet updates if the server is not available.
Also it might be good to mention in the Caching Service section how the client discovers the cache service (is this via Bonjour or some other broadcast method?).
Thanks - I'll take a look at that in the final edit pass. We'll see what Charles says about the Caching discovery approach, but note that there's no configuring it in any way. The one fact we have to add is that the Caching server needs to be behind a NAT gateway so it can serve just the local clients.
Caching is still not working for me on Yosemite server, with the final release. I'm quite perplexed; yet another one of these things that's supposed to "just work" but doesn't.
Anything interesting in the Caching Service Log accessible from the Logs pane? Or in the Caching Bytes Served graph on the Stats pane?
Nov 12 00:35:01 Walden.local nsurlstoraged[149]: realpath() returned NULL for /var/root/Library/Caches/fpsaud
Nov 12 00:35:01 Walden.local nsurlstoraged[149]: The read-connection to the DB=/var/root/Library/Caches/fpsaud/Cache.db is NOT valid. Unable to determine schema version.
Nov 12 00:35:01 Walden.local nsurlstoraged[149]: realpath() returned NULL for /var/root/Library/Caches/fpsaud
Nov 12 00:35:01 --- last message repeated 1 time ---
Nov 12 00:35:01 Walden.local nsurlstoraged[149]: ERROR: unable to determine file-system usage for FS-backed cache at /var/root/Library/Caches/fpsaud/fsCachedData. Errno=13
Nov 12 00:08:56 Walden.local AssetCache[20092]: [EAPOLControl.c:66] get_server_port(): eapolcontroller_server_port failed, unknown error code
Nov 12 00:08:56 Walden.local sandboxd[300] ([20092]): AssetCache(20092) deny mach-lookup com.apple.airportd
Nov 12 00:08:57 Walden.local AssetCache[20092]: [EAPOLControl.c:66] get_server_port(): eapolcontroller_server_port failed, unknown error code
Nov 12 00:08:57 Walden.local sandboxd[300] ([20092]): AssetCache(20092) deny mach-lookup com.apple.airportd
The Stats pane shows nothing served from the cache in the past 7 days; I updated a bunch of iOS apps today, and have updated plenty of iOS and Mac apps in the past week. So it's clearly broken.
It is on, I can confirm that...