Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| container:harbor:start [2025/12/18 22:47] – angelegt sborne | container:harbor:start [2025/12/22 13:05] (aktuell) – sborne | ||
|---|---|---|---|
| Zeile 9: | Zeile 9: | ||
| ---- | ---- | ||
| - | ====== 1 - Installation | + | ====== 1 - Vorbereitungen |
| - | Harbor kann von der Seite " | + | Es sind mehrere vorbereitende Schritte notwendig. |
| - | \\ | + | ===== 1.1 - SSL-Zertifikate ===== |
| - | ===== 1.1 - Herunterladen der Installationsdatei | + | Der Harbor bringt selbst keine Zertifikate mit. Diese müssen manuell erstellt oder von Drittanbietern besorgt werden. Eine Methode zum Erstellen eines eigenen Zertifikats ist [[: |
| + | |||
| + | ===== 1.2 - Docker | ||
| + | |||
| + | Harbor läuft als Docker-Container. Dieses Programm muss als Voraussetzung installiert werden. Docker kann aus den Repositories installiert werden, sofern die Docker-Repositories eingebunden wurden: | ||
| < | < | ||
| - | ~# wget https:// | ||
| - | --2025-12-18 22: | + | ~# apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin |
| - | Auflösen des Hostnamens github.com (github.com)… 140.82.121.3\\ | + | |
| - | Verbindungsaufbau zu github.com (github.com)|140.82.121.3|: | + | |
| - | HTTP-Anforderung gesendet, auf Antwort wird gewartet … 302 Found | + | |
| - | ... | + | </ |
| - | Verbindungsaufbau zu release-assets.githubusercontent.com (release-assets.githubusercontent.com)|185.199.111.133|: | + | ===== 1.3 - Harbor ===== |
| - | HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK\\ | + | |
| - | Länge: 680961237 (649M) [application/ | + | Harbor kann von der Seite " |
| + | |||
| + | **Schritt 1**: Herunterladen | ||
| + | < | ||
| + | |||
| + | ~# wget https:// | ||
| + | --2025-12-18 22: | ||
| + | Auflösen des Hostnamens github.com (github.com)… 140.82.121.3\ | ||
| + | Verbindungsaufbau zu github.com (github.com)|140.82.121.3|: | ||
| + | HTTP-Anforderung gesendet, auf Antwort wird gewartet … 302 Found | ||
| + | ... | ||
| + | Verbindungsaufbau zu release-assets.githubusercontent.com (release-assets.githubusercontent.com)|185.199.111.133|: | ||
| + | HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK\ | ||
| + | Länge: 680961237 (649M) [application/ | ||
| Wird in »harbor-offline-installer-v2.14.1.tgz« gespeichert. | Wird in »harbor-offline-installer-v2.14.1.tgz« gespeichert. | ||
| harbor-offline-installer-v2.14.1.tgz | harbor-offline-installer-v2.14.1.tgz | ||
| - | |||
| 2025-12-18 22:14:47 (18,6 MB/s) - »harbor-offline-installer-v2.14.1.tgz« gespeichert [680961237/ | 2025-12-18 22:14:47 (18,6 MB/s) - »harbor-offline-installer-v2.14.1.tgz« gespeichert [680961237/ | ||
| + | ~# | ||
| + | </ | ||
| + | |||
| + | **Schritt 2**: Entpacken | ||
| + | < | ||
| + | |||
| + | ~# tar xzvf harbor-offline-installer-v2.14.1.tgz | ||
| + | harbor/ | ||
| + | harbor/ | ||
| + | harbor/ | ||
| + | harbor/ | ||
| + | harbor/ | ||
| + | harbor/ | ||
| ~# | ~# | ||
| + | |||
| </ | </ | ||
| + | ===== 1.4 - Zertifikat ===== | ||
| + | Das zum Server erstellte Zertifikat muss für Harbor und Docker bereitgestellt werden. | ||
| - | ===== 1.2 - Archiv entpacken ===== | + | ==== 1.4.1 - Harbor |
| + | |||
| + | Für Harbor wird unter "''/ | ||
| + | |||
| + | **Schritt 1**: Erstellen der Verzeichnisstruktur: | ||
| < | < | ||
| - | ~# tar xzvf harbor-offline-installer-v2.14.1.tgz | + | ~# mkdir -pv /opt/harbor/certs |
| + | mkdir: Verzeichnis '/ | ||
| - | harbor/ | + | ~# |
| - | harbor/ | + | |
| - | harbor/ | + | |
| - | harbor/ | + | |
| - | harbor/ | + | |
| - | harbor/ | + | |
| + | </ | ||
| + | |||
| + | **Schritt 2**: Kopieren der Zertifikatsdateien: | ||
| + | < | ||
| + | ~# cp -v slxharbor.fritz.box.crt / | ||
| + | ' | ||
| + | ' | ||
| ~# | ~# | ||
| + | |||
| </ | </ | ||
| + | ==== 1.4.2 - Docker ==== | ||
| + | Docker interpretiert "'' | ||
| - | ===== 1.3 - Verschlüsselung ===== | + | **Schritt |
| + | < | ||
| + | ~# openssl x509 -inform PEM -in slxharbor.fritz.box.crt | ||
| - | Der Harbor bringt selbst keine Zertifikate mit. Diese müssen manuell erstellt oder von Drittanbietern besorgt werden. [[https:// | + | </code> |
| - | \\ | + | **Schritt 2**: Erstellen der Verzeichnisstruktur: |
| + | < | ||
| + | ~# mkdir -pv / | ||
| + | mkdir: Verzeichnis '/ | ||
| + | mkdir: Verzeichnis '/ | ||
| + | mkdir: Verzeichnis '/ | ||
| + | ~# | ||
| - | ==== 1.3.1 - Software installieren ==== | + | </ |
| + | |||
| + | **Schritt | ||
| < | < | ||
| - | ~# apt install certbot | + | ~# cp -v slxharbor.fritz.box.cert / |
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ~# | ||
| - | Installiere: | + | </ |
| - | certbot | + | |
| - | Installiere Abhängigkeiten:\\ | + | **Schritt 4**: Docker neu starten: |
| - | libicu76 | + | < |
| - | python3-acme | + | ~# systemctl restart docker |
| - | python3-bcrypt | + | ~# |
| - | Vorgeschlagene Pakete:\\ | + | </ |
| - | python-certbot-doc | + | |
| - | python3-certbot-apache | + | |
| - | Zusammenfassung: | + | ====== 2 - YAML-Datei ====== |
| - | Aktualisiere: | + | |
| - | Herunterlade-Größe: 12,3 MB\\ | + | |
| - | Benötigter Platz: 50,3 MB / 11,8 GB verfügbar | + | |
| - | Fortfahren? [J/n] J\\ | + | Vor der eigentlichen Installation muss die mitgelieferte YAML-Datei noch bearbeitet werden. Dazu muss die Vorlage "'' |
| + | < | ||
| + | ~# cp -v harbor.yml.tmpl harbor.yml\ | ||
| + | ' | ||
| + | ~# | ||
| + | |||
| + | </code> | ||
| + | |||
| + | Jetzt kann die Datei angepasst werden. Folgende Parameter wurden neu gesetzt: | ||
| + | |||
| + | < | ||
| + | hostname: slxharbor.fritz.box | ||
| ... | ... | ||
| + | https: | ||
| + | certificate: | ||
| + | private_key: | ||
| + | ... | ||
| + | harbor_admin_password: | ||
| + | ... | ||
| + | database: | ||
| + | password: ******* | ||
| + | ... | ||
| + | data_volume: | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ====== 3 - Installation ====== | ||
| + | |||
| + | Jetzt kann das Installationsskript ausgeführt werden: | ||
| + | |||
| + | < | ||
| + | ~# ./ | ||
| + | [Step 0]: checking if docker is installed ... | ||
| + | |||
| + | Note: docker version: 29.1.3 | ||
| + | |||
| + | [Step 1]: checking docker-compose is installed ... | ||
| + | |||
| + | Note: Docker Compose version v5.0.0 | ||
| + | |||
| + | [Step 2]: loading Harbor images ... | ||
| + | Loaded image: goharbor/ | ||
| + | Loaded image: goharbor/ | ||
| + | Loaded image: goharbor/ | ||
| + | Loaded image: goharbor/ | ||
| + | Loaded image: goharbor/ | ||
| + | Loaded image: goharbor/ | ||
| + | Loaded image: goharbor/ | ||
| + | Loaded image: goharbor/ | ||
| + | Loaded image: goharbor/ | ||
| + | Loaded image: goharbor/ | ||
| + | Loaded image: goharbor/ | ||
| + | Loaded image: goharbor/ | ||
| + | |||
| + | [Step 3]: preparing environment ... | ||
| + | |||
| + | [Step 4]: preparing harbor configs ... | ||
| + | prepare base dir is set to /tmp/harbor | ||
| + | Clearing the configuration file: / | ||
| + | Clearing the configuration file: / | ||
| + | Clearing the configuration file: / | ||
| + | Generated configuration file: / | ||
| + | Generated configuration file: / | ||
| + | Generated configuration file: / | ||
| + | Generated configuration file: / | ||
| + | Generated configuration file: / | ||
| + | Generated configuration file: / | ||
| + | Generated configuration file: / | ||
| + | Generated configuration file: / | ||
| + | Generated configuration file: / | ||
| + | Generated configuration file: / | ||
| + | Generated configuration file: / | ||
| + | Generated configuration file: / | ||
| + | copy / | ||
| + | ca file / | ||
| + | copy to shared trust ca dir as name storage_ca_bundle.crt ... | ||
| + | copy None to shared trust ca dir as name redis_tls_ca.crt ... | ||
| + | Generated and saved secret to file: / | ||
| + | Successfully called func: create_root_cert | ||
| + | Generated configuration file: / | ||
| + | Clean up the input dir | ||
| + | |||
| + | Note: stopping existing Harbor instance ... | ||
| + | |||
| + | [Step 5]: starting Harbor ... | ||
| + | [+] up 10/10 | ||
| + | ✔ Network harbor_harbor | ||
| + | ✔ Container harbor-log | ||
| + | ✔ Container harbor-db | ||
| + | ✔ Container registry | ||
| + | ✔ Container harbor-portal | ||
| + | ✔ Container registryctl | ||
| + | ✔ Container redis | ||
| + | ✔ Container harbor-core | ||
| + | ✔ Container harbor-jobservice Created | ||
| + | ✔ Container nginx | ||
| + | ✔ ----Harbor has been installed and started successfully.---- | ||
| ~# | ~# | ||
| + | |||
| </ | </ | ||
| + | ====== 4 - Kontrolle ====== | ||
| + | Am Ende der Installation wurde angezeigt, dass die Installation erfolgreich war und Harbor gestartet wurde. Dies lässt sich jetzt auf mehrere Arten kontrollieren. | ||
| - | ==== 1.3.2 - Zertifikat erstellen | + | ===== 4.1 - Docker-Container ===== |
| - | < | + | Es kann geprüft werden, welche Docker-Container gerade laufen: |
| - | \\ | + | < |
| + | ~# docker ps\ | ||
| + | CONTAINER ID | ||
| + | 5a9ec57ad6c9 | ||
| + | b2a1dfeaa584 | ||
| + | 0b74687b2dae | ||
| + | 321d88d3ebcf | ||
| + | e65496140ab3 | ||
| + | 6ebb82ec2e0a | ||
| + | 98b15e84535f | ||
| + | 1ac95fd29a67 | ||
| + | 5254d72818a9 | ||
| + | ~# | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== 4.2 - Webseite ===== | ||
| + | |||
| + | Auch die Webseite von Harbor sollte jetzt erreichbar sein: [[https:// | ||
| + | |||
| + | {{https:// | ||
| \\ | \\ | ||
| + | \\ | ||
| + | ====== 5 - Wartung ====== | ||
| + | |||
| + | Die Wartung von Harbor wird zum entsprechenden Zeitpunkt nachgepflegt. | ||
| \\ | \\ | ||
| + | \\ | ||
| + | ====== 6 - Registrierung einrichten ====== | ||
| - | < | + | Am Beispiel von [[https:// |
| + | |||
| + | {{https:// | ||
| + | |||
| + | Mit Klick auf "'' | ||
| + | |||
| + | So sollte es dann hinterher aussehen: | ||
| + | |||
| + | {{https:// | ||
| + | |||
| + | \\ | ||
| + | \\ | ||
| + | \\ | ||
| + | \\ | ||
| + | \\\\ | ||
| + | \\ | ||
| + | '' | ||