Skip to content

FEATURE: Add cluster deploy command#46

Open
f1v3-dev wants to merge 1 commit into
developfrom
f1v3/cluster-deploy
Open

FEATURE: Add cluster deploy command#46
f1v3-dev wants to merge 1 commit into
developfrom
f1v3/cluster-deploy

Conversation

@f1v3-dev

@f1v3-dev f1v3-dev commented Jul 13, 2026

Copy link
Copy Markdown

🔗 Related Issue

⌨️ What I did

  • Arcus Cache Cluster 배포를 위한 cluster deploy 명령어를 추가합니다.
    • arcusctl cluster deploy <version> <topology.yml>
    • topology의 servers[].group 유무로 Community / Enterprise edition을 자동 판별합니다.

배포 절차

  1. topology 검증 (필수 필드, 중복 address, 유효한 Master/Slave 구성)
  2. 동일 Service Code 클러스터가 존재하는지 확인
  3. arcus-memcached tar.gz 준비
    • Community: GitHub release 기준 wget
    • Enterprise: 사용자가 ~/.arcusctl/images/arcus 에 넣어둔 tar.gz 사용
  4. 각 장비에서 압축 해제 → deps/install.sh 로 의존성 설치 → configure, make, make install 빌드
    • Enterprise: --enable-replication 옵션으로 빌드
  5. 내부 메타데이터 저장 (topology.yml)

명령 구조

./arcusctl cluster deploy <version> <topology.yaml>

설치 구조

topology.yaml 에서 정의한 path 정보와 버전 정보를 기반으로 아래와 같이 설치합니다.

<path>/<version>/
  bin/
  lib/
  include/
  share/
  arcus-memcached-<version>.tar.gz
  src/

또한, 다음 파일이 이미 존재하면 해당 호스트의 재설치를 생략합니다.

<path>/<version>/bin/memcached

@f1v3-dev
f1v3-dev requested review from namsic and oliviarla July 13, 2026 08:54
@f1v3-dev f1v3-dev self-assigned this Jul 13, 2026
@f1v3-dev
f1v3-dev force-pushed the f1v3/cluster-deploy branch from 4921ad0 to 4957fdc Compare July 13, 2026 09:00
@f1v3-dev

Copy link
Copy Markdown
Author

Clutser Topology의 Config 구조를 변경했습니다.

초기에 threads, max_connections, listen, engine.memory_limit 와 같은 뼈대를 만들어 뒀는데, 구동 옵션이 워낙 많고 대부분 -t, -c, -l, -m 같은 CLI 인자 형태라 이를 전부 구조체 필드로 관리하기는 힘들다고 판단을 했습니다.

그래서 memcached 구동 인자를 그대로 전달하는 options 를 문자열로 두는 방식으로 변경하였습니다.

global_config 와 서버별 config 모두 동일하게 적용됩니다.

AS-IS

servers:
  - address: cache3:11211
    config:
      listen: 192.168.1.3

global_config:
  threads: 4
  max_connections: 1024
  engine:
    memory_limit: 64
    eviction: true

TO-BE

servers:
  - address: cache3:11211
    config:
      options: "-l 192.168.1.3"

global_config:
  options: "-t 4 -c 1024 -m 64"

Comment thread internal/topology/cluster.go Outdated
Comment thread internal/cluster/znode.go Outdated
Comment thread internal/cluster/install.go Outdated
Comment thread cluster-sample-topology.yml
@f1v3-dev
f1v3-dev force-pushed the f1v3/cluster-deploy branch 2 times, most recently from 203d2f9 to c5836e7 Compare July 15, 2026 06:46
@f1v3-dev
f1v3-dev requested a review from namsic July 15, 2026 06:47
Comment thread cluster-sample-topology.yml Outdated
@f1v3-dev
f1v3-dev force-pushed the f1v3/cluster-deploy branch from c5836e7 to a67013e Compare July 21, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants