public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "alexander.heinisch via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com, felix.moessbauer@siemens.com
Cc: Alexander Heinisch <alexander.heinisch@siemens.com>
Subject: [PATCH 3/3] Added doc to setup apt cache.
Date: Fri, 27 Sep 2024 21:06:50 +0200	[thread overview]
Message-ID: <20240927190650.128263-4-alexander.heinisch@siemens.com> (raw)
In-Reply-To: <20240927190650.128263-1-alexander.heinisch@siemens.com>

From: Alexander Heinisch <alexander.heinisch@siemens.com>

Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
---
 doc/apt-cache.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 doc/apt-cache.md

diff --git a/doc/apt-cache.md b/doc/apt-cache.md
new file mode 100644
index 00000000..f03ea7ee
--- /dev/null
+++ b/doc/apt-cache.md
@@ -0,0 +1,55 @@
+# Using an APT Cache
+
+When working on the road limited download bandwitdth oftentimes is an issue, and increases the build times drastically.
+On the other hand large corporate networks could get rate limited by debian mirrors, as many peoply / pipelines / aso.
+fetch huge amounts of packets.
+
+An apt cache can mitigate these issues.
+
+## Setup
+
+1. Install apt cache
+
+```
+apt install apt-cache-ng
+```
+
+## Using the cache using premirrors
+
+1. Set `DISTRO_APT_PREMIRRORS` in your projects `bitbake` or `kas` config:
+
+```
+DISTRO_APT_PREMIRRORS="http://deb\.debian\.org http://localhost:3142/deb.debian.org"\n""
+```
+
+1. Invoke `kas menu` and select
+    1. `Mirror selection ->
+    1. Use specific (Debian | Ubuntu) mirror ->
+    1. URL of (Debian | Ubuntu) mirror (e.g. `http://localhost:3142/deb.debian.org`).
+
+
+## Using the cache when snapshot builds are configured
+
+When you chose to use isar's snapshot mechanism:
+```
+ISAR_USE_APT_SNAPSHOT = "1"
+```
+you can enable the cache, depending on your build environment, as follows:
+
+1. Set `DISTRO_APT_SNAPSHOT_PREMIRROR_BASE` in your projects `bitbake` or `kas` config:
+
+```
+DISTRO_APT_SNAPSHOT_PREMIRROR_BASE=localhost:3142/snapshot.debian.org
+```
+
+1. Set `DISTRO_APT_SNAPSHOT_PREMIRROR_BASE`  in your environment and include `kas/opt/mirror-snapshot.yaml` to your kas file or append it on kas cli invokation.
+
+1. Invoke `kas menu` and select
+    1. `Mirror selection ->
+    1. Use the distros snapshot mirror ->
+    1. Use a cache for snapshot mirror and specify the snapshot mirror you prefer (e.g. `localhost:3142/snapshot.debian.org`).
+
+
+> Note: When invoking the build in a containerized environment like `kas/kas-container menu`, you have to specify the ip address of the machine running `apt-cacher-ng`.
+
+> Note: To limit access to the `apt-cacher-ng`, a dummy network interface can help!
-- 
2.43.0

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20240927190650.128263-4-alexander.heinisch%40siemens.com.

  parent reply	other threads:[~2024-09-27 19:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-27 19:06 [PATCH 0/3] Added support for apt caching alexander.heinisch via isar-users
2024-09-27 19:06 ` [PATCH 1/3] Added DISTRO_APT_SNAPSHOT_PREMIRROR_BASE to specify the base-url of the mirror used alexander.heinisch via isar-users
2024-10-01 15:18   ` 'Jan Kiszka' via isar-users
2024-09-27 19:06 ` [PATCH 2/3] Added Kconfig for cached snapshot mirror alexander.heinisch via isar-users
2024-09-27 19:06 ` alexander.heinisch via isar-users [this message]
2024-10-08 20:12   ` [PATCH 3/3] Added doc to setup apt cache 'Niedermayr, BENEDIKT' via isar-users
2024-10-01 13:47 ` [PATCH 0/3] Added support for apt caching 'MOESSBAUER, Felix' via isar-users
2024-10-08  5:20 ` Uladzimir Bely
2024-10-08  6:43   ` 'Heinisch, Alexander' via isar-users
2024-10-08 12:38     ` 'Jan Kiszka' via isar-users
2024-10-31 14:46       ` 'MOESSBAUER, Felix' via isar-users
2024-10-31 15:40         ` 'Heinisch, Alexander' via isar-users
2024-10-31 16:26           ` 'MOESSBAUER, Felix' via isar-users
2024-10-31 16:53             ` 'Heinisch, Alexander' via isar-users

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240927190650.128263-4-alexander.heinisch@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=alexander.heinisch@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox