하나에서 모든 스택의 정의 도구들을 실행하는 것이다. 스크립트는 정의 도구들을 적절한 순서
로 실행한 후, 각 스택의 실행 결과를 수집해 다른 스택에 변수로 전달할 수 있다. 하지만 이 기
법은 문제가 발생하기 쉽고, 스택마다 정의 도구를 독립 실행하여 얻는 장점을 잃게 된다.
이럴 때 구성 레지스트리
3
가 도움이 된다. 구성 레지스트리는 스택에 관한 정보를 저장하는 구
조를 제공하며, 다른 스택들은 중앙에 있는 정보를 사용할 수 있다.
많은 인프라 정의 도구가 레지스트리에 값을 설정하고 가져오는 기능을 기본적으로 지원한다.
[예제
9
-
4
]는 컨설
consul
구성 레지스트리를 사용하도록 [예제
9
-
3
]을 수정한 것이다. 예제에서
는 키 경로
myapp
/${
var
.
environment
}/
appserver
/
vip
_
ip
를 사용해 애플리케이션 서버
스택의 부하 분산기
VIP
주소를 레지스트리에서 찾는다.
var.environment
를 사용해 여러 환
경에서 이 정의 파일을 공유할 수 있으며, 각 환경은 고유한 위치에 각자의 환경에 맞는 애플리
케이션 서버
VIP
를 저장한다.
예제
9
-
4
레지스트리를사용한애플리케이션서버스택정의 ...
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.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.