Add apt-cacher-ng to reduce network load
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# install roles and collections
|
||||
ansible-galaxy install -r requirements.yml
|
||||
|
||||
# Install the playbook
|
||||
# Install the frontend
|
||||
ansible-playbook -i inventory.yaml -e @secrets.enc --ask-vault-pass frontend.yaml
|
||||
|
||||
# Github runner
|
||||
@@ -13,4 +13,24 @@ ansible-playbook -i inventory.yaml -e @secrets.enc --ask-vault-pass gitea.yaml
|
||||
|
||||
# graphana + prometheus
|
||||
ansible-playbook -i inventory.yaml -e @secrets.enc --ask-vault-pass monitor.yaml
|
||||
|
||||
# apt-cacheer-ng
|
||||
ansible-playbook -i inventory.yaml --ask-become-pass apt-cacher-ng.yaml
|
||||
```
|
||||
|
||||
To make use of the apt cache, ensure you have a file like this with CACHE_HOST changes to your actual host
|
||||
|
||||
```bash
|
||||
echo << EOF >> /etc/apt/apt.conf.d/01proxy
|
||||
Acquire::HTTP::Proxy "http://<CACHE_HOST>:3142";
|
||||
Acquire::HTTPS::Proxy "false";
|
||||
EOF
|
||||
```
|
||||
|
||||
or add these to a Dockerfile
|
||||
|
||||
```
|
||||
RUN echo 'Acquire::HTTP::Proxy "http://<CACHE_HOST>:3142";' >> /etc/apt/apt.conf.d/01proxy \
|
||||
&& echo 'Acquire::HTTPS::Proxy "false";' >> /etc/apt/apt.conf.d/01proxy
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user