Puppet을 위한 네트워크 구성하기

  • Post author:
  • Post category:칼럼
  • Post comments:0 Comments
  • Post last modified:February 8, 2020

Puppet Master와 Agent를 설치했는데 자꾸 오류가 나더라.

err: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
err: /File[/var/lib/puppet/lib]: Failed to retrieve current state of resource: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Could not retrieve file metadata for puppet://puppet.example.com/plugins: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
err: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

여러 번의 삽질 끝에 도메인 설정을 잘못했다는 걸 깨닫곤 문제를 해결했다. 이 글에서는 네트워크를 올바르게 설정하는 방법을 알아본다.

사전 구성

AWS에 새 VPC stage를 구축한 상황이다. 이 VPC에 Puppet 서버와 Django가 들어갈 테스트 머신을 준비하려고 한다.

네트워크 구성하기

제일 중요한 부분은 내부 네트워크의 도메인을 제대로 설정하는 것이다. 이 예제에서는 si.test.com을 stage 망에서 쓸 내부 도메인 주소로 정하고 다음과 같이 노드를 두려고 한다.

hostname Role private IP private FQDN public FQDN
puppet Puppet Master 10.0.0.1 puppet.si.test.com gateway.private.com
django Django Web Service 10.0.0.123 django.si.test.com myservice.com
  1. AWS에 Ubuntu 인스턴스를 둘 띄우고 Route 53에 A 레코드 puppet.si.test.comdjango.si.test.com을 넣는다.
  2. 각 노드의 호스트 설정을 바꾼다.
# /etc/cloud/cloud.cfg on puppet
hostname: puppet
fqdn: puppet.si.test.com
# /etc/cloud/cloud.cfg on django
hostname: django
fqdn: django.si.test.com
  1. 이제 puppet 노드에 접속해서 django에 Ping을 때린다.
ping django

이 명령은 ping: unknown host django라는 오류를 보이고 실패할 것이다.

  1. puppet이란 호스트 이름만 줬을 때 puppet.si.test.com로 연결하려면 다음 중 한 가지 방법으로 설정해야 한다.

이 중에서는 당연히 전자가 사후 관리하기 훨씬 쉽다.

호스트 이름만으로 각 서버에 연결이 잘 되는지 확인했다면 이제 Puppet Master를 설치할 때가 된 것이다.

나머지

How To Install Puppet To Manage Your Server Infrastructure을 잘 읽으면 Puppet 오픈소스 버전을 Ubuntu 14에 설치하는 일은 그렇게 어렵지 않다.

끝!

Author Details
Kubernetes, DevSecOps, AWS, 클라우드 보안, 클라우드 비용관리, SaaS 의 활용과 내재화 등 소프트웨어 개발 전반에 도움이 필요하다면 도움을 요청하세요. 지인이라면 가볍게 도와드리겠습니다. 전문적인 도움이 필요하다면 저의 현업에 방해가 되지 않는 선에서 협의가능합니다.
0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments