Harbor Private Registry: Replication

๐Ÿ’ก Harbor Private Registry: Replication โ€” Executive Summary

Technical architectural analysis, practical configuration manifests, and deployment instructions for Harbor Private Registry: Replication.

Reference link
Issue
  • Immediately after building, the contents can be confirmed to some extent as shown on the left.
  • Images pulled from harbor are sha256 encrypted as shown on the right.

Manual deployment

Preparation
References and Guidelines (NOTE)

When distributing the app, delete the folder below. (all gitignore defined)

  1. /src/main/resources/public
  2. /src/main/resources/static
  3. /target
bash
# vi /etc/hosts ์ถ”๊ฐ€
100.0.0.184 harbor.Enterprise Cloud.cld

# mvn ์„ค์น˜
which mvn
# ๊ฒฐ๊ณผ ์—†์„๊ฒฝ์šฐ mvn ์„ค์น˜
brew install mvn

# Docker desktop ์‹คํ–‰ ํ›„ ์•„๋ž˜ ์Šคํฌ๋ฆฝํŠธ ์‹คํ–‰.
docker pull harbor.Enterprise Cloud.cld/dream-markone/openjdk-font-cce:8-jre

# ๊ฒฐ๊ณผ ์—†์„๊ฒฝ์šฐ ๋กœ๊ทธ์ธ [๋งํฌ1] ์ฐธ์กฐ
docker login harbor.Enterprise Cloud.cld

# ์•ˆ๋  ๊ฒฝ์šฐ ์•„๋ž˜์˜ DockerDesktop : Insecure ์„ค์ • ์ฐธ์กฐ
  "insecure-registries": [
    "harbor.Enterprise Cloud.cld"
  ],
Docker Desktop
IntelliJ
References and Guidelines (NOTE)

Maven build to .jar, Docker build to Image

bash
# build-deploy.sh ํŒŒ์ผ ์ˆ˜์ • APP_PATH, APP_NAME
bash @git/build-deploy.sh build

# ๋‘˜ ๋‹ค ์„ฑ๊ณตํ–ˆ๋‹ค๋ฉด
mkdir {ํด๋”}
cd {ํด๋”}
bash ../build-deploy.sh save

# [๋งํฌ2] ์ฐธ์กฐ
scp -r ../{ํด๋”} spjang@<PUBLIC_IP_REDACTED>:deploy
bash
#Implements
bash ~/workspaces/flowerduet-test/build-deploy.sh build
rm -r _tmp
mkdir _tmp
cd _tmp
bash ../build-deploy.sh save

scp -r ../_tmp spjang@<PUBLIC_IP_REDACTED>:deploy
Terminal

[Link 2] spjang@ connection

bash
cd ~/deploy

# [๋งํฌ3] ์ฐธ์กฐ
scp -r ../_temp/ [email protected]:deploy

[Link 3] Connect to [email protected] (go-harbor)

bash
sudo -i
cd /home/ubuntu/deploy/{ํด๋”}

docker load -i {์ด๋ฏธ์ง€ ํŒŒ์ผ}
# ๊ธฐ์กด ์ด๋ฏธ์ง€:latest๋Š” ํƒœ๊ทธ๊ฐ€ ์‚ฌ๋ผ์ง
docker push {์ด๋ฏธ์ง€ ๋ช…}:latest

# ํŒŒ๋“œ ์žฌ์‹œ์ž‘
kubectl rollout restart -n portal deployment {admin-api user-app user-api}

Comments

Leave a Reply

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