root@harbor-regs:~# wget https://github.com/goharbor/harbor/releases/download/v2.11.2/harbor-online-installer-v2.11.2.tgz
--2024-12-03 07:32:54--  https://github.com/goharbor/harbor/releases/download/v2.11.2/harbor-online-installer-v2.11.2.tgz
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/50613991/c54ec1e7-06c6-4592-9f86-c60ddd1d9765?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241203%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241203T073254Z&X-Amz-Expires=300&X-Amz-Signature=07ed451691591e2f9431af4a7000189b79f423b4dd41a992cf8b13c430adb40f&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dharbor-online-installer-v2.11.2.tgz&response-content-type=application%2Foctet-stream [following]
--2024-12-03 07:32:54--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/50613991/c54ec1e7-06c6-4592-9f86-c60ddd1d9765?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241203%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241203T073254Z&X-Amz-Expires=300&X-Amz-Signature=07ed451691591e2f9431af4a7000189b79f423b4dd41a992cf8b13c430adb40f&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dharbor-online-installer-v2.11.2.tgz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.108.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11573 (11K) [application/octet-stream]
Saving to: 'harbor-online-installer-v2.11.2.tgz'

harbor-online-installer-v2.1 100%[===========================================>]  11.30K  --.-KB/s    in 0s

2024-12-03 07:32:55 (23.6 MB/s) - 'harbor-online-installer-v2.11.2.tgz' saved [11573/11573]

root@harbor-regs:~#
root@harbor-regs:~# ls -l
total 16
-rw-r--r-- 1 root root 11573 Nov 19 21:33 harbor-online-installer-v2.11.2.tgz
drwx------ 3 root root  4096 Nov 23 11:20 snap
root@harbor-regs:~#
root@harbor-regs:~# tar -xvzf harbor-online-installer-v2.11.2.tgz
harbor/prepare
harbor/LICENSE
harbor/install.sh
harbor/common.sh
harbor/harbor.yml.tmpl
root@harbor-regs:~#
root@harbor-regs:~# ls -l
total 20
drwxr-xr-x 2 root root  4096 Dec  3 07:33 harbor
-rw-r--r-- 1 root root 11573 Nov 19 21:33 harbor-online-installer-v2.11.2.tgz
drwx------ 3 root root  4096 Nov 23 11:20 snap
root@harbor-regs:~#
root@harbor-regs:~# cd harbor
root@harbor-regs:~/harbor# ls -l
total 40
-rw-r--r-- 1 root root  3646 Nov 14 06:51 common.sh
-rw-r--r-- 1 root root 14270 Nov 14 06:51 harbor.yml.tmpl
-rwxr-xr-x 1 root root  1975 Nov 14 06:51 install.sh
-rw-r--r-- 1 root root 11347 Nov 14 06:51 LICENSE
-rwxr-xr-x 1 root root  1882 Nov 14 06:51 prepare
root@harbor-regs:~/harbor#
root@harbor-regs:~/harbor# cp harbor.yml.tmpl harbor.yml
root@harbor-regs:~/harbor#
root@harbor-regs:~/harbor# nano harbor.yml
root@harbor-regs:~/harbor#
root@harbor-regs:~/harbor# ls /etc/ssl/certs/ssl-cert-snakeoil.pem
ls: cannot access '/etc/ssl/certs/ssl-cert-snakeoil.pem': No such file or directory
root@harbor-regs:~/harbor#
root@harbor-regs:~/harbor# make-ssl-cert generate-default-snakeoil --force-overwrite
Command 'make-ssl-cert' not found, but can be installed with:
apt install ssl-cert
root@harbor-regs:~/harbor#
root@harbor-regs:~/harbor# apt install ssl-cert
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  ssl-cert
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 17.4 kB of archives.
After this operation, 65.5 kB of additional disk space will be used.
Get:1 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 ssl-cert all 1.1.2 [17.4 kB]
Fetched 17.4 kB in 0s (236 kB/s)
Preconfiguring packages ...
Selecting previously unselected package ssl-cert.
(Reading database ... 74796 files and directories currently installed.)
Preparing to unpack .../ssl-cert_1.1.2_all.deb ...
Unpacking ssl-cert (1.1.2) ...
Setting up ssl-cert (1.1.2) ...
Processing triggers for man-db (2.10.2-1) ...
Scanning processes...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
root@harbor-regs:~/harbor#
root@harbor-regs:~/harbor# ls /etc/ssl/certs/ssl-cert-snakeoil.pem
/etc/ssl/certs/ssl-cert-snakeoil.pem
root@harbor-regs:~/harbor#
root@harbor-regs:~/harbor# nano harbor.yml
root@harbor-regs:~/harbor#
root@harbor-regs:~/harbor# ls -l
total 56
-rw-r--r-- 1 root root  3646 Nov 14 06:51 common.sh
-rw-r--r-- 1 root root 14327 Dec  3 07:39 harbor.yml
-rw-r--r-- 1 root root 14270 Nov 14 06:51 harbor.yml.tmpl
-rwxr-xr-x 1 root root  1975 Nov 14 06:51 install.sh
-rw-r--r-- 1 root root 11347 Nov 14 06:51 LICENSE
-rwxr-xr-x 1 root root  1882 Nov 14 06:51 prepare
root@harbor-regs:~/harbor#

root@harbor-regs:~/harbor# ./install.sh

[Step 0]: checking if docker is installed ...
✖ Need to install docker(20.10.10+) first and run this script again.
root@harbor-regs:~/harbor#
root@harbor-regs:~/harbor#
root@harbor-regs:~/harbor# ./install.sh

[Step 0]: checking if docker is installed ...

Note: docker version: 27.3.1

[Step 1]: checking docker-compose is installed ...

Note: Docker Compose version v2.29.7


[Step 2]: preparing environment ...

[Step 3]: preparing harbor configs ...
prepare base dir is set to /root/harbor
Unable to find image 'goharbor/prepare:v2.11.2' locally
v2.11.2: Pulling from goharbor/prepare
2edca7ac248d: Pull complete
2da6faf80cbd: Pull complete
209cd3dd91df: Pull complete
4280814075bc: Pull complete
cb75727fa973: Pull complete
40e3f3cbed75: Pull complete
ab6c3bded146: Pull complete
73acbb271faf: Pull complete
0ca88839d3c2: Pull complete
260030123701: Pull complete
Digest: sha256:3761801ca8f76e7df2ab1c4f7c35913cf0540a3d34510cb54274939568bcc346
Status: Downloaded newer image for goharbor/prepare:v2.11.2
Generated configuration file: /config/portal/nginx.conf
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Generated configuration file: /config/nginx/nginx.conf
Generated configuration file: /config/core/env
Generated configuration file: /config/core/app.conf
Generated configuration file: /config/registry/config.yml
Generated configuration file: /config/registryctl/env
Generated configuration file: /config/registryctl/config.yml
Generated configuration file: /config/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
Generated and saved secret to file: /data/secret/keys/secretkey
Successfully called func: create_root_cert
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir


Note: stopping existing Harbor instance ...
WARN[0000] /root/harbor/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion


[Step 4]: starting Harbor ...
WARN[0000] /root/harbor/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 62/19
 ✔ postgresql Pulled                                                                                       15.7s
 ✔ redis Pulled                                                                                             8.6s
 ✔ registryctl Pulled                                                                                      18.6s
 ✔ jobservice Pulled                                                                                       16.3s
 ✔ registry Pulled                                                                                         21.9s
 ✔ portal Pulled                                                                                           10.2s
 ✔ proxy Pulled                                                                                            21.3s
 ✔ core Pulled                                                                                             14.6s
 ✔ log Pulled                                                                                              22.9s

[+] Running 10/10
 ✔ Network harbor_harbor        Created                                                                     0.2s
 ✔ Container harbor-log         Started                                                                     3.1s
 ✔ Container registry           Started                                                                     2.1s
 ✔ Container redis              Started                                                                     1.9s
 ✔ Container harbor-portal      Started                                                                     2.1s
 ✔ Container registryctl        Started                                                                     2.0s
 ✔ Container harbor-db          Started                                                                     1.9s
 ✔ Container harbor-core        Started                                                                     2.5s
 ✔ Container nginx              Started                                                                     3.0s
 ✔ Container harbor-jobservice  Started                                                                     3.0s
✔ ----Harbor has been installed and started successfully.----
root@harbor-regs:~/harbor#

Leave a Reply

Your email address will not be published. Required fields are marked *