האתר מכיל ~3,000 קישורים ל-GitHub. בסביבת airgap הדפדפן לא מגיע ל-github.com — הקישורים נשברים.
המנגנון gitMirrors ב-configmap-runtime.yaml משכתב אותם בזמן ריצה ל-mirrors פנימיים ב-GitLab,
בתנאי שהם מסונכרנים ומכילים את כל ה-branches וה-tags המקוריים.
12 repos נדרשים — הם מפורטים בקטלוג helm/redis-docs/files/external-links.yaml תחת git-mirrors:.
הייבוא הראשוני כבר בוצע. אם יש צורך להוסיף repo חדש בעתיד, ראה הוספת repo חדש.
כל הסקריפטים נמצאים ב-scripts/airgap-mirrors/.
cd scripts/airgap-mirrors/
cp mirrors.external.conf.example mirrors.conf
# ערוך:
# MIRRORS_DIR — נתיב לתיקיית ה-bare mirrors (לדוגמה: ~/mirrors)
# TRANSFER_DIR — תיקייה שממנה תעתיק ל-USB
# שאר הקובץ (רשימת ה-repos ו-policies) כבר מוגדר נכוןcd scripts/airgap-mirrors/
cp mirrors.internal.conf.example mirrors.conf
# ערוך:
# MIRRORS_DIR — נתיב לתיקיית ה-bare mirrors
# TRANSFER_DIR — תיקייה שאליה תעתיק מה-USB
# GITLAB_HOST — כתובת GitLab הפנימי
# כל שורת MIRRORS — החלף "your-group" ב-path האמיתי של כל פרויקט ב-GitLabהפרדת מידע:
mirrors.confעל המחשב החיצוני לא מכיל שום פרט על הרשת הפנימית. מידע על GitLab (host, paths, token) קיים רק על המחשב הפנימי.
מאחר שהייבוא הראשוני כבר בוצע, יש לסמן לסקריפטים שה-state הנוכחי כבר סונכרן:
# במחשב החיצוני:
cd ~/mirrors # או ה-MIRRORS_DIR שלך
for d in *.git; do
( cd "$d" && git config --local sync.synced "$(git rev-parse HEAD)" )
doneמחשב חיצוני USB מחשב פנימי
───────────── ─── ────────────
bundle-create.sh ──────► bundles/ ──────► bundle-import.sh
(push --mirror origin → GitLab)
bundle-confirm.sh ◄────── import-success.list
1. מחשב חיצוני:
./bundle-create.sh
# → TRANSFER_DIR/bundles/*.bundle (delta קטן מאז הסנכרון האחרון)2. העתק $TRANSFER_DIR/bundles/ ל-USB ומשם למחשב הפנימי.
3. מחשב פנימי:
export GITLAB_TOKEN="glpat-xxxxx"
./bundle-import.sh
# → מוודא, טוען, דוחף --mirror origin לכל repo
# → TRANSFER_DIR/import-success.list4. העתק $TRANSFER_DIR/import-success.list חזרה ל-USB ומשם למחשב החיצוני.
5. מחשב חיצוני:
./bundle-confirm.sh
# → מקדם sync.synced לריצה הבאהשלב 4–5 חשוב:
bundle-confirm.shמסמן את נקודת ההתחלה לבאנדל הבא. אם הוא לא רץ — הריצה הבאה תייצר bundle גדול יותר (מה שחסר), אבל לא תאבד נתונים.
כולל: metadata (title + body), binary assets לפי policy.
Policy של assets מוגדר ב-mirrors.conf (שדה שלישי ורביעי בכל שורת MIRRORS):
| Policy | משמעות |
|---|---|
all (ברירת מחדל) |
כל ה-assets |
none |
metadata בלבד |
latest:N |
assets של N הריליסים האחרונים בלבד |
since:YYYY-MM-DD |
assets של ריליסים שיצאו מתאריך זה |
שדה רביעי אופציונלי — סינון שמות קבצים (keywords מופרדים בפסיק):
"RedisInsight|RedisInsight/RedisInsight|all|win,linux"
# → מוריד כל ה-releases, אך רק קבצי Windows + Linux (ללא macOS .dmg)
גדלים מדודים של RedisInsight (48 ריליסים, win+linux בלבד): ~3.52 GiB ריצה ראשונה, ~700–815 MiB לכל ריליס חדש מכאן ואילך.
1. מחשב חיצוני:
gh auth login # פעם אחת בלבד
./releases-export.sh
# → TRANSFER_DIR/releases/<name>/releases.json
# → TRANSFER_DIR/releases/<name>/assets/<tag>/* (לפי policy)
# קבצים שכבר הורדו בעבר — מדולגים אוטומטית (cache)2. העתק $TRANSFER_DIR/releases/ ל-USB ומשם למחשב הפנימי.
3. מחשב פנימי (לאחר bundle-import.sh — tag חייב להיות ב-GitLab קודם):
export GITLAB_TOKEN="glpat-xxxxx"
./releases-import.sh
# → idempotent: ריליס קיים ב-GitLab → מדולג| דרישה | היכן נדרש | כיצד להכין |
|---|---|---|
GitLab PAT עם scope api |
כל הסקריפטים הפנימיים | GitLab → User Settings → Access Tokens → scope: api |
git push מאומת על origin |
bundle-import.sh |
הכנס את הטוקן ישירות ב-URL: git remote set-url origin https://oauth2:TOKEN@gitlab.../group/repo — או הגדר SSH key |
| Generic Package Registry מופעל | releases-import.sh |
Admin → Settings → CI/CD → Package registry (ברירת מחדל: פעיל) |
| מגבלת גודל artifacts מספקת | releases-import.sh |
Admin → Settings → General → Maximum artifacts size (ברירת מחדל: 1 GiB — מספיק ל-RedisInsight) |
gh CLI מאומת |
releases-export.sh |
gh auth login פעם אחת על המחשב החיצוני |
אסימון GitLab: מעבירים כ-env var לפני כל ריצה פנימית:
export GITLAB_TOKEN="glpat-xxxxxxxxxxxxxxxxxxxx"
git push --mirror לא מעביר את ה-default branch של ה-project — GitLab קובע אותו בנפרד.
לדוגמה, redis/redis משתמש ב-unstable ולא ב-master.
# מחשב פנימי, לאחר bundle-import.sh הראשון:
export GITLAB_TOKEN="glpat-xxxxx"
./default-branch-set.sh
# → קורא HEAD מכל bare mirror, מעדכן GitLab project settings| משאב | סיבה | השפעה |
|---|---|---|
| Issues, Pull Requests | DB של GitHub, לא Git | קישורים יצביעו ל-GitLab אבל התוכן לא שם |
| Security Advisories | DB של GitHub | 16 קישורים — יישארו שבורים |
| Wiki | repo נפרד בגיטהאב | 2 קישורים — דורש mirror נפרד של <repo>.wiki.git |
| ענפים/תגיות שנמחקו ב-GitHub | bundle import לא מוחק refs | ישארו ב-GitLab עד bundle מלא הבא |
| Release assets היסטוריים | לפי ה-policy בקונפיג | רק מה שה-policy מגדיר |
curl/kubectl apply -f ב-code blocks |
JS handler לא נוגע ב-code blocks | קישורים אלה לא משוכתבים בזמן ריצה |
לאחר שכל ה-mirrors מוכנים ב-GitLab, מפעילים אותם ב-Helm:
externalLinks:
gitMirrors:
k8s-docs:
enabled: true
to: https://gitlab.your-company.example/your-group/redis-enterprise-k8s-docs
observability:
enabled: true
to: https://gitlab.your-company.example/your-group/redis-enterprise-observability
redis:
enabled: true
to: https://gitlab.your-company.example/your-group/redis
RediSearch:
enabled: true
to: https://gitlab.your-company.example/your-group/RediSearch
RedisGraph:
enabled: true
to: https://gitlab.your-company.example/your-group/RedisGraph
RedisInsight:
enabled: true
to: https://gitlab.your-company.example/your-group/RedisInsight
RedisTimeSeries:
enabled: true
to: https://gitlab.your-company.example/your-group/RedisTimeSeries
RedisGears:
enabled: true
to: https://gitlab.your-company.example/your-group/RedisGears
RedisJSON:
enabled: true
to: https://gitlab.your-company.example/your-group/RedisJSON
RedisBloom:
enabled: true
to: https://gitlab.your-company.example/your-group/RedisBloom
redis-py:
enabled: true
to: https://gitlab.your-company.example/your-group/redis-py
prometheus-operator:
enabled: true
to: https://gitlab.your-company.example/your-group/prometheus-operatorhelm upgrade <release-name> helm/redis-docs/ -f your-values.yaml
# אין צורך ב-image rebuild — מנגנון ConfigMap בלבד# מחשב חיצוני:
git clone --mirror https://github.com/<owner>/<repo> ~/mirrors/<repo>.git
# העתק ~/mirrors/<repo>.git ל-USB → מחשב פנימי
# מחשב פנימי:
git clone --mirror https://gitlab.your-company.example/your-group/<repo> ~/mirrors/<repo>.git
cd ~/mirrors/<repo>.git
git remote add external /path/to/usb/<repo>.git
git fetch --prune external
git push --mirror origin
# אתחל state על המחשב החיצוני:
cd ~/mirrors/<repo>.git
git config --local sync.synced "$(git rev-parse HEAD)"הוסף entry ל-helm/redis-docs/files/external-links.yaml תחת git-mirrors: ועדכן את values.yaml.