Cài đặt Jenkins Agent trên Proxmox VE

Step 1: Khởi tạo Container

Step 2: Thiết lập môi trường cho Agent

Đăng nhập vào Agent với quyền root và mật khẩu đã tạo.

Step 3: Thiết lập SSH Key

Tạo SSH Key để Jenkins Master có thể ra lệnh cho Agent mà không cần nhập mật khẩu mỗi khi cần build.

# Chuyển sang user jenkins
su - jenkins
# Tạo key (không đặt passphrase)
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa

# Tự cấp quyền cho chính mình (Authorized Keys)
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

# Hiển thị Private Key để copy vào Jenkins Master
cat id_rsa

Step 4: Tạo Node mới trên Jenkins Master

Step 5: Update Jenkinsfile


Revision #3
Created 2026-01-10 08:50:04 UTC by ThanhDV
Updated 2026-01-19 04:57:23 UTC by ThanhDV