RuckZuck Cache
Aug.2019: This content is obsolete and replaced by https://github.com/rzander/ruckzuck/wiki/RuckZuck-Proxy-Server
All the RuckZuck.tools (ruckzuck.exe, rzupdate.exe and the OneGet Provider) where designed to get the software binaries from the vendors web-site in the internet. This is fine for a single device at home, but if you have multiple devices, you may want to share the downloaded content to reduce network traffic...
Overview
RZCache is a Web-Service that works like a Proxy for all the RuckZuck-Tools, to have a single connection to the Internet.
Clients will find their RZCache Server via broadcast (UDP:5001) or they can be configured via Policy (registry) to connect a specific RZCache Server.
RZCache Servers can build a chain to follow the network topology.
Setup RZCache
The setup of an RZCache Server is very simple as the Service is "just" a Website and the cache is fully file based.
Requirements
- Docker. The Service is currently only available as a Docker container
- Container must be able to run an aspnetcore v2.0.0 Image which is based on Linux (Jessie)
Install
If you have Docker up and running, just pull the Image from hub.docker.com :
docker pull zanderr/ruckzuck
Configuration
Variables
If you are not familiar with configuring docker containers, you can install
Kitematic to have a simple UI for the configuration:
to configure the "localURL" variable by using the run command:
docker run -e "localURL=http://192.168.2.146:5000" zanderr/ruckzuck
- localURL (required): specify the URL how clients can access the RZCache Service. Note: All File-Downloads will be redirected to this URL and no longer from the SW Vendor.
- RZUser: RuckZuck User Account. If specified, you can authenticate all child tools with your account. Leave it empty if the client tools can have custom accounts or run anonymous.
- RZPW: Password for the RuckZuck Account.
- Parent Server: leave the default value if the RZCache Server is connected to the Internet or specify the URL of a parent RZCache Server.
- CatalogTTL (hours): Specify how long (in hours) catalog-items are cached. Note: binaries for Software are not affected.
Ports
RZCache is a Web-Service that is running internally (in the Container) on port TCP:5000, but you can expose this port to any free port on your Host (e.g. Port 80). To allow Clients to find their RZCache Server automatically, the Port UDP:5001 must be published on UDP:5001.
Content Store
RZCache does store all the cached Content in "/app/wwwroot". You can mount a directory from your physical host on "/app/wwwroot" to store the cached content in the mounted Folder. This is helpful if you want to modify or preload some of the data or if you want the backup/restore the Cache.
Note: configuration changes may clean your conatiner. It's recommended to store all data on an external volume.
Script Example
# Pull the Image from hub.docker.com...
docker pull zanderr/ruckzuck
# start the Container, set the Varibale localURL, Expose the ports
# and redirect the Content to a local Folder (d:\rzcache)...
docker run --name RZCache -d -e "localURL=http://192.168.2.146:5000" -p 5000:5000/tcp -p 5001:5001/udp -v d:/rzcache:/app/wwwroot zanderr/ruckzuck
Testing
To check if the Web-Service is running, just browse the "localURL" and you will get the following message:
"RuckZuck-Proxy (c) 2017 by Roger Zander; Version: 1.0.0"
caching details
RZCache is a file based cache the files are stored within the container in the Folder "wwwroot"
once you start a fresh docker Image, there are no files stored. A Client must request Content before you will see some files...
- rzcat.json : The RuckZuck Catalog, with all SW entries. RuckZuck.exe will Show all Items from this catalog.
- Icons Folder: stores all the Icon used for RuckZuck.exe
- rzsw Folder: contains a .json per {productname}{version}{vendor} with all the details for a product.
- files Folder: stores the Software binaries in a subfolder for each {contentid}
Known Limitation/Issues with current Version (1.0.0)
- First download from a Client will load the data from WWW and triggers a second download to the cache. The item is downloaded twice!
- SoftwareUpdate detection traffic cannot be cached as it requires access to the RuckZuck.tools backend. The request will be forwarded from RZCache to the parent Server.
changes on clients
- the latest Version of ruckzuck.exe and rzupdate.exe will automaticall discover the RZCache Server via UDP broadcast. To prevent this, create a registry key to specify the WebService:
#region WebService
#Create the key if missing
If((Test-Path 'HKLM:\Software\Policies\RuckZuck') -eq $false ) { New-Item -Path 'HKLM:\Software\Policies\RuckZuck' -force -ea SilentlyContinue }
#Enable Settings
Set-ItemProperty -Path 'HKLM:\Software\Policies\RuckZuck' -Name 'WebService' -Value 'http://192.168.2.146:5000' -ea SilentlyContinue
#endregion
- RuckZuck Provider for OneGet: tbd.
What's next ?
This is the first release of RZCache. Please provide Feedback and Ideas on github.com/rzander/ruckzuck.