본문으로 건너뛰기
Structly 문서
English

Catalog 가이드

Service

이 페이지의 내용

Service가 기록하는 정보#

Service는 배포·운영 단위의 소프트웨어입니다. 이름은 Organization 안에서 고유합니다.

필드내용
name이름. 필수
handleWeb 주소 이름. 필수이며 같은 Organization의 Service 사이에서 고유합니다(주소 이름)
summary·description한 줄 요약과 설명
status수동 생명주기. planned(도입 예정)·active(사용 중)·retired(사용 종료)

status는 사람이 기록하는 생명주기이며 실시간 가용성이 아닙니다.

Web UI#

Services → 새 Service에서 이름·요약·설명·Status를 입력하고 Service 등록을 누릅니다. 상세에서 구현하는 API, 연결 Repository, 사용하는 Database와 소속 구조(Key Pattern·Table·Collection·Cassandra Table), Kafka 사용 설명, 소속 System을 확인합니다.

stly#

{"name": "orders-service", "handle": "orders-service", "summary": "주문을 처리하는 백엔드 Service", "status": "active"}
stly services create --input service.json
stly services list --q orders --fields id,name,status

services list --q는 이름에서 대소문자를 구분해 찾습니다.

제공하는 API#

API마다 제공 Service를 하나 지정합니다. 지정은 API 쪽에서 하며 자세한 방법은 API를 참고합니다. Service 상세의 제공 API에서 이 Service를 제공 Service로 지정한 API를 확인하고 개별로 해제할 수 있습니다. 해제한 API는 제공 Service 없음이 됩니다.

stly services apis <service-id> --fields id,name

Repository 연결#

Service의 코드가 있는 Repository를 연결합니다. Web UI에서는 Service 상세의 연결 Repository에서 편집합니다.

stly services repository-links get <service-id>
stly services repository-links update <service-id> --input repos.json --if-match '"연결 조회의 ETag"'
stly services repositories <service-id> --fields id,name,git_url

repos.json은 연결할 Repository ID 전체를 담습니다. []이면 모두 해제합니다.

{"repository_ids": ["3B4cBA6CToA"]}

그 밖의 연결 조회#

명령결과
stly services databases <service-id>직접 연결된 Database
stly services key-patterns <service-id>직접 연결된 Redis Key Pattern
stly services tables <service-id>직접 연결된 RDB Table
stly services collections <service-id>직접 연결된 MongoDB Collection
stly services cassandra-tables <service-id>직접 연결된 Cassandra Table
stly services kafka-usages <service-id>이 Service를 지정한 Kafka 사용 설명
stly services systems <service-id>이 Service를 포함하는 System

Database·소속 구조 연결은 Database에서, Kafka 사용 설명은 Messaging에서 편집합니다.

삭제#

다음 연결이 남아 있으면 Service를 삭제할 수 없습니다(HTTP 409 SERVICE_IN_USE). 먼저 연결을 해제합니다.

  • API의 제공 Service 지정
  • Repository·Database·소속 구조 연결
  • Kafka 사용 설명의 Service 지정

System 구성에 포함된 Service는 삭제할 수 있으며 System 구성에서 함께 빠집니다.