DNS 서비스 설치 및 구성 > OpenStack 자료실

본문 바로가기
사이트 내 전체검색

OpenStack 자료실

DNS 서비스 설치 및 구성

페이지 정보

profile_image
작성자 jkchoi
댓글 0건 조회 3,761회 작성일 21-10-07 09:23

본문

전제 조건

- DNS 서비스를 설치 및 구성하기 전에 서비스 자격 증명 및 API endpoint를 생성해야 합니다.


1. admin관리자 전용 CLI 명령에 액세스 하려면 자격 증명을 소싱 합니다.

      $  source admin-openrc


2. 서비스 자격 증명을 생성하려면 다음 단계를 완료하십시오.

  1) designate사용자 생성

      $ openstack user create --domain default --password-prompt designate

  2) designate사용자에게 admin 역할을 추가합니다.

      $ openstack role add --project service --user designate admin

  3) 지정 서비스 엔터티를 만듭니다.

      $ openstack service create --name designate --description "DNS" dns


3. DNS 서비스 API endpoint를 생성합니다.

      $ openstack endpoint create --region RegionOne \
        dns public http://controller:9001/


* 구성 요소 설치 및 구성

 - 기본 구성 파일은 배포에 따라 다릅니다. 기존 섹션 및 옵션을 수정하는 대신 이러한 섹션 및 옵션을 추가해야 할 수도 있습니다.
  또한 ...구성 조각 의 줄임표( )는 유지해야 하는 잠재적인 기본 구성 옵션을 나타냅니다.

1. 패키지 설치

# yum install openstack-designate\*


2. 사용자 designate가 액세스할 수 있는  designate 데이터베이스를 만듭니다. DESIGNATE_DBPASS 적절한 비밀번호로 교체

      # mysql -u root -p
      MariaDB [(none)]> CREATE DATABASE designate;
      MariaDB [(none)]> GRANT ALL PRIVILEGES ON designate.* TO 'designate'@'localhost' \
      IDENTIFIED BY 'DESIGNATE_DBPASS';


3. BIND 패키지를 설치합니다.

      # yum install bind


4. /etc/named.conf파일에 다음 옵션을 추가 합니다.

      options {
          ...
          allow-new-zones yes;
          request-ixfr no;
          recursion no;
      };


5. RNDC 키 생성

      # rndc-confgen -a -k designate -c /etc/designate/rndc.key -r /dev/urandom


6.  /etc/named.conf에 키를 추가하십시오.

      ...
      # This should be the contents of ``/etc/designate/rndc.key``
      key "designate" {
        algorithm hmac-md5;
        secret "OAkHNQy0m6UPcv55fiVAPw==";
      };
      # End of content from ``/etc/designate/rndc.key``

      controls {
        inet 127.0.0.1 port 953
          allow { 127.0.0.1; } keys { "designate"; };
      };


7. DNS 서비스를 시작하고 시스템이 부팅될 때 시작하도록 구성합니다.

      # systemctl enable named

      # systemctl start named


8. /etc/designate/designate.conf 파일을 편집하고 다음 작업을 완료합니다.

  1) [service:api] 섹션에서 auth_strategy 구성

      [service:api]
      api_host = 0.0.0.0
      api_port = 9001
      auth_strategy = keystone
      enable_api_v1 = True
      enabled_extensions_v1 = quotas, reports
      enable_api_v2 = True

  2) [keystone_authtoken]섹션에서 다음 옵션을 구성합니다

      [keystone_authtoken]
      auth_host = controller
      auth_port = 35357
      auth_protocol = http
      admin_tenant_name = service
      admin_user = designate
      admin_password = DESIGNATE_PASS

      - ID 서비스에서 designate사용자에 DESIGNATE_PASS대해 선택한 비밀번호로 바꿉니다.

  3) [service:worker] 섹션에서 작업자 모델을 사용

      enabled = True
      notify = True

  4) [storage:sqlalchemy] 섹션에서 데이터베이스 액세스 구성

      [storage:sqlalchemy]
      connection = mysql+pymysql://designate:DESIGNATE_DBPASS@controller/designate

      - designate 데이터베이스에 DESIGNATE_DBPASS대해 선택한 암호로 바꿉니다.

  5) 지정 데이터베이스 채우기

      # su -s /bin/sh -c "designate-manage database sync" designate


9. 지정 중앙 및 API 서비스를 시작하고 시스템이 부팅 될 때 시작하도록 구성합니다.

      # systemctl enable designate-central designate-api

      # systemctl start designate-central designate-api


10. /etc/designate/pools.yaml에 다음 내용으로 pools.yaml 파일을 만듭니다 .

      - name: default
        # The name is immutable. There will be no option to change the name after
        # creation and the only way will to change it will be to delete it
        # (and all zones associated with it) and recreate it.
        description: Default Pool

        attributes: {}

        # List out the NS records for zones hosted within this pool
        # This should be a record that is created outside of designate, that
        # points to the public IP of the controller node.
        ns_records:
          - hostname: ns1-1.example.org.
            priority: 1

        # List out the nameservers for this pool. These are the actual BIND servers.
        # We use these to verify changes have propagated to all nameservers.
        nameservers:
          - host: 127.0.0.1
            port: 53

        # List out the targets for this pool. For BIND there will be one
        # entry for each BIND server, as we have to run rndc command on each server
        targets:
          - type: bind
            description: BIND9 Server 1

            # List out the designate-mdns servers from which BIND servers should
            # request zone transfers (AXFRs) from.
            # This should be the IP of the controller node.
            # If you have multiple controllers you can add multiple masters
            # by running designate-mdns on them, and adding them here.
            masters:
              - host: 127.0.0.1
                port: 5354

            # BIND Configuration options
            options:
              host: 127.0.0.1
              port: 53
              rndc_host: 127.0.0.1
              rndc_port: 953
              rndc_key_file: /etc/designate/rndc.key


11. pools 업데이트

      # su -s /bin/sh -c "designate-manage pool update" designate


12. designate 및 mDNS 서비스를 시작하고 시스템이 부팅 될 때 시작하도록 구성합니다.

      # systemctl enable designate-worker designate-producer designate-mdns

      # systemctl start designate-worker designate-producer designate-mdns

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

사이트 정보

회사명 : (주)리눅스데이타시스템 / 대표 : 정정모
서울본사 : 서울특별시 강남구 봉은사로 114길 40 홍선빌딩 2층 / tel : 02-6207-1160
대전지사 : 대전광역시 유성구 노은로174 도원프라자 5층 / tel : 042-331-1161

접속자집계

오늘
107
어제
1,534
최대
3,935
전체
756,839
Copyright © www.linuxdata.org All rights reserved.