arko_renual/deploy/wise/arko-was-tunnel.service
infraurp ddacd1b7f5
Some checks failed
deploy-wise / deploy (push) Failing after 11s
csv.wise.ai.kr 배포 파이프라인 신설 (PC → git → web → was)
웹서버(175.118.124.176)의 Gitea 러너가 JDK8 로 WAR 을 빌드해 WAS(27.255.76.2)의
Tomcat·MariaDB 컨테이너로 배포한다. WAS 는 웹서버를 통해서만 닿고, Tomcat 은
127.0.0.1 바인딩이라 웹서버가 SSH 터널로 잇는다.

- WAS 는 가용 메모리가 3G 안팎(llama-server 200G+ 점유)이라 빌드를 웹서버에서 한다
- claudeops 가 sudo 를 쓸 수 없어 Tomcat·MariaDB 를 컨테이너로 올렸다
- 배포 스크립트를 매 실행마다 저장소본으로 덮어써 서버 사본 드리프트를 막는다

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 11:16:10 +09:00

41 lines
1.4 KiB
Desktop File

# arko(문화품앗이) WAS 터널 — 운영 웹(175.118.124.176) → WAS(27.255.76.2)
# 설치 위치: /etc/systemd/system/arko-was-tunnel.service
#
# 왜 터널인가:
# WAS 의 Tomcat 은 컨테이너 포트를 127.0.0.1:11060 에만 바인딩한다.
# 같은 서버의 urpai 처럼 공인 고포트로 열 수도 있지만, arko 는 개인정보보호
# 과제 대상 시스템이라 WAS 를 인터넷에 직접 노출하지 않는다.
# 웹서버가 아웃바운드 SSH 로 자기 쪽 127.0.0.1:11060 을 WAS 의 Tomcat 에 잇는다.
#
# 키 제한: WAS 의 authorized_keys 에서
# restrict,port-forwarding,permitopen="127.0.0.1:11060"
# 으로 묶여 있어 셸 접근이 불가능하고 이 포트 외에는 열 수 없다.
#
# 502 가 나면 여기부터 확인한다: systemctl status arko-was-tunnel
[Unit]
Description=SSH tunnel to arko WAS (27.255.76.2:11060)
After=network-online.target
Wants=network-online.target
Before=httpd.service
[Service]
Type=simple
ExecStart=/usr/bin/ssh -N -T \
-o ExitOnForwardFailure=yes \
-o ServerAliveInterval=30 \
-o ServerAliveCountMax=3 \
-o StrictHostKeyChecking=accept-new \
-o UserKnownHostsFile=/root/.ssh/known_hosts \
-o IdentitiesOnly=yes \
-i /root/.ssh/id_arko_tunnel \
-L 127.0.0.1:11060:127.0.0.1:11060 \
claudeops@27.255.76.2
Restart=always
RestartSec=10
User=root
Group=root
[Install]
WantedBy=multi-user.target