mirror of
https://github.com/unman/shaker.git
synced 2025-01-13 08:19:32 -05:00
Salt - caching proxy
This commit is contained in:
parent
95bfe194b6
commit
06167b3e52
16
README
Normal file
16
README
Normal file
@ -0,0 +1,16 @@
|
||||
This is a caching proxy, based on apt-cacher-ng.
|
||||
Note that it expects a netvm called "tor" - you should change this to whatever netvm you want to use.
|
||||
Edit the netvm entry in create.sls
|
||||
|
||||
Config files are included, which will work out of the box for Debian,Ubuntu and Fedora.
|
||||
The cache and log directories are bind-mounted in /rw in the cacher qube.
|
||||
|
||||
apt-cacher-ng will cache HTTPS requests if you change https:// to http://HTTPS/// in repo source lists.
|
||||
Look at change_templates.sls for a suggestion how to do this across all templates.
|
||||
|
||||
Copy directory to /srv/salt
|
||||
qubesctl state.apply cacher.create
|
||||
qubesctl --skip-dom0 --targets=template-cacher state.apply cacher.install
|
||||
qubesctl --skip-dom0 --targets=cacher state.apply cacher.configure
|
||||
|
||||
|
15
change_templates.sls
Normal file
15
change_templates.sls
Normal file
@ -0,0 +1,15 @@
|
||||
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
|
||||
#
|
||||
#
|
||||
#
|
||||
/etc/apt/sources.list:
|
||||
file.replace:
|
||||
- pattern: 'https:'
|
||||
- repl: 'http://HTTPS/'
|
||||
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
||||
|
||||
/etc/apt/sources.list.d/qubes-r4.list:
|
||||
file.replace:
|
||||
- pattern: 'https:'
|
||||
- repl: 'http://HTTPS/'
|
||||
- flags: [ 'IGNORECASE', 'MULTILINE' ]
|
9
use.sls
Normal file
9
use.sls
Normal file
@ -0,0 +1,9 @@
|
||||
qvm-present-id:
|
||||
qvm.present:
|
||||
- name: cacher
|
||||
- template: template-cacher
|
||||
- label: gray
|
||||
|
||||
/etc/qubes-rpc/policy/qubes.UpdatesProxy:
|
||||
file.prepend:
|
||||
- text: $type:TemplateVM $default allow,target=cacher
|
Loading…
Reference in New Issue
Block a user