workspace: introduce bazel downloader config and replace bazeldnf mirror
This rather small change does rework the way we cache our dependencies
by instructing bazel to fetch everything through a custom proxy. See
//build/mirror_proxy:README.me for more infos.
Closes monogon-dev/monogon#178
Change-Id: Ic671fc8233a1cbf37427bbc96339ea8108310e21
Reviewed-on: https://review.monogon.dev/c/monogon/+/3686
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/build/mirror_proxy/README.md b/build/mirror_proxy/README.md
new file mode 100644
index 0000000..55ce82c
--- /dev/null
+++ b/build/mirror_proxy/README.md
@@ -0,0 +1,19 @@
+Bazel downloader mirror
+===
+
+This is a small tool which acts as a transparent proxy-ish mirror for use in the bazel downloader.
+By using a bazel_downloader.cfg we can instruct bazel to rewrite the download URLs and use a custom target instead. We use this to mirror all dependencies to our S3 storage.
+
+Usage
+---
+
+This is expected to run with a given bucket name and a hardcoded set of credentials which are used to authenticate requests. When an authenticated request is received, the mirror will download uncached data if it isn't in the cache yet. This is expected to be used by trusted users, e.g. employees.
+
+Users should deploy a .netrc inside their home folder based on the following template to allow bazel to authenticate against the mirror.
+
+`~/.netrc`
+```
+machine mirror.monogon.dev
+login myfancyusername
+password mysecretpassword
+```
\ No newline at end of file