다음의 패턴 및 안티패턴 모음은 스택 컴포넌트를 설계하고 기존 컴포넌트를 평가하기 위한 아
이디어를 제공한다. 모듈과 라이브러리를 빌드하거나 빌드하지 말아야 하는 방법을 나타내는
목록이 아니라 이러한 주제에 대해 생각하기 위한 출발점이다.
패턴
퍼사드 모듈
퍼사드 모듈은 래퍼 모듈로도 알려져 있다.
예제
16-1
퍼사드 모듈을 사용한 코드
use module: shopspinner-server
name: checkout-appserver
memory: 8GB
모듈은 파라미터를 사용하여 래핑하는 리소스를 호출하고 리소스에 필요한 다른 파라미터값을
하드코딩한다(예제
16
-
2
).
예제
16-2
퍼사드 모듈을 위한 코드
declare module: shopspinner-server
virtual_machine:
name: ${name}
source_image: hardened-linux-base
memory: ${memory}
provision:
337
16
장
컴포넌트에서 스택 빌드하기
tool: ...
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.