일반적인 접근 방식은 역할을 상속하는 것이다. 모든 서버에 공통적인 소프트웨어와 구성을 포
함하는 기본 역할을 정의한다. 이 역할에는 네트워킹 강화, 관리자 계정, 모니터링과 로깅을 위
한 에이전트가 있을 수 있다. 애플리케이션 서버 또는 컨테이너 호스트와 같은 더 구체적인 역
할에는 다음과 같이 기본 역할이 포함된 몇 가지 서버 구성 모듈과 파라미터를 추가한다.
Role: base-role
server_modules:
- monitoring_agent
- logging_agent
- network_hardening
role: application-server
include_roles:
- base_role
server_modules:
- tomcat
parameters:
- inbound_port: 8443
role: shopping-service-server
include_roles:
- application-server
server_modules:
- shopping-service-application
이 코드 예제는 계층 구조에서 세 가지 역할을 정의한다.
Shopping-service-server
역할은
application-server
역할의 모든 것을 상속하고 특정 애플리케이션을 설치하는 모듈을 추가하
고 배포한다.
application-server
역할은 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.