컨트롤러 노드 설치와 설정

컨트롤러 노드 설치와 설정

이 섹션에서는 스토리지 노드에서 운영되는 계정, 컨테이너 및 오브젝트 서비스에 대한 요청을 처리하는 프록시 서비스를 설치와 구성하는 방법을 설명합니다. 간략화하여 이 가이드에서는 컨트롤러 노드에서 프록시 서비스를 설치하고 구성합니다. 그러나 프록시 서비스는 스토리지 노드와 네트워크로 연결된 임의의 노드에서 실행할 수 있습니다. 또한 성능 향상과 불필요한 중복을 줄이기 위해 여러 노드에 프록시 서비스를 설치와 구성할 수도 있습니다. 자세한 정보는 Deployment Guide 를 살펴봅니다.

선행조건

프록시 서비스는 Identity 서비스와 같은 인증 및 허가 메커니즘에 의존합니다. 그러나 다른 서비스와 달리, 다른 OpenStack 없이도 운영 가능하도록 내부적인 메커니즘 또한 제공합니다. 그러나 간략화하여 이 가이드는 Identity 서비스 추가 에서의 Identity 서비스를 참조합니다. 오브젝트 스토리지 서비스를 구성하기 전에 서비스 credential와 API 엔드포인트를 생성해야 합니다.

주석

오브젝트 스토리지 서비스는 컨트롤러 노드에서 SQL 데이터베이스를 사용하지 않습니다. 대신 각 스토리지 노드에 분산된 SQLite 데이터베이스를 사용합니다.

  1. admin credential에 대한 접근 권한을 얻기위해 관리자용 CLI 명령어 source 입력합니다:

    $ source admin-openrc.sh
    
  2. Identity 서비스 credential을 생성하기 위해, 다음 단계를 완료합니다:

    • swift 사용자를 생성합니다:

      $ openstack user create --domain default --password-prompt swift
      User Password:
      Repeat User Password:
      +-----------+----------------------------------+
      | Field     | Value                            |
      +-----------+----------------------------------+
      | domain_id | default                          |
      | enabled   | True                             |
      | id        | d535e5cbd2b74ac7bfb97db9cced3ed6 |
      | name      | swift                            |
      +-----------+----------------------------------+
      
    • swift 사용자에게 admin role을 추가합니다:

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

      주석

      이 명령어는 출력값이 없습니다.

    • swift 서비스 엔티티를 생성합니다:

      $ openstack service create --name swift \
        --description "OpenStack Object Storage" object-store
      +-------------+----------------------------------+
      | Field       | Value                            |
      +-------------+----------------------------------+
      | description | OpenStack Object Storage         |
      | enabled     | True                             |
      | id          | 75ef509da2c340499d454ae96a2c5c34 |
      | name        | swift                            |
      | type        | object-store                     |
      +-------------+----------------------------------+
      
  3. Object Storage 서비스 API 엔드포인트 생성:

    $ openstack endpoint create --region RegionOne \
      object-store public http://controller:8080/v1/AUTH_%\(tenant_id\)s
    +--------------+----------------------------------------------+
    | Field        | Value                                        |
    +--------------+----------------------------------------------+
    | enabled      | True                                         |
    | id           | 12bfd36f26694c97813f665707114e0d             |
    | interface    | public                                       |
    | region       | RegionOne                                    |
    | region_id    | RegionOne                                    |
    | service_id   | 75ef509da2c340499d454ae96a2c5c34             |
    | service_name | swift                                        |
    | service_type | object-store                                 |
    | url          | http://controller:8080/v1/AUTH_%(tenant_id)s |
    +--------------+----------------------------------------------+
    
    $ openstack endpoint create --region RegionOne \
      object-store internal http://controller:8080/v1/AUTH_%\(tenant_id\)s
    +--------------+----------------------------------------------+
    | Field        | Value                                        |
    +--------------+----------------------------------------------+
    | enabled      | True                                         |
    | id           | 7a36bee6733a4b5590d74d3080ee6789             |
    | interface    | internal                                     |
    | region       | RegionOne                                    |
    | region_id    | RegionOne                                    |
    | service_id   | 75ef509da2c340499d454ae96a2c5c34             |
    | service_name | swift                                        |
    | service_type | object-store                                 |
    | url          | http://controller:8080/v1/AUTH_%(tenant_id)s |
    +--------------+----------------------------------------------+
    
    $ openstack endpoint create --region RegionOne \
      object-store admin http://controller:8080/v1
    +--------------+----------------------------------+
    | Field        | Value                            |
    +--------------+----------------------------------+
    | enabled      | True                             |
    | id           | ebb72cd6851d4defabc0b9d71cdca69b |
    | interface    | admin                            |
    | region       | RegionOne                        |
    | region_id    | RegionOne                        |
    | service_id   | 75ef509da2c340499d454ae96a2c5c34 |
    | service_name | swift                            |
    | service_type | object-store                     |
    | url          | http://controller:8080/v1        |
    +--------------+----------------------------------+
    

구성요소 설치와 구성

주석

디폴트 구성 파일을 배포판에 따라 달라집니다. 기존 섹션 및 옵션을 변경하는 것 보다는 해당 섹션과 옵션을 추가해야 할 수도 있습니다. 또한 구성 내용 조각 중 생략 (...) 부분은 유지될 필요성이 있는 디폴트 구성 옵션을 가리킵니다.

  1. 패키지를 설치하십시오:

    # apt-get install swift swift-proxy python-swiftclient \
      python-keystoneclient python-keystonemiddleware \
      memcached
    

    주석

    완료한 OpenStack 환경에는 해당 패키지 중 일부가 이미 포함되어 있습니다.

  1. /etc/swift 디렉토리를 생성합니다.

  2. 오브젝트 스토리지 소스 저장소로부터 프록시 서버 설정 파일을 얻습니다:

    # curl -o /etc/swift/proxy-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/proxy-server.conf-sample?h=stable/liberty
    
  1. /etc/swift/proxy-server.conf 파일을 편집하여 다음 작업을 완료합니다:

    • [DEFAULT] 섹션에서 bind 포트, 사용자, 구성 디렉토리를 구성합니다:

      [DEFAULT]
      ...
      bind_port = 8080
      user = swift
      swift_dir = /etc/swift
      
    • [pipeline:mail] 섹션에서 적절한 모듈을 활성화 시킵니다:

      [pipeline:main]
      pipeline = catch_errors gatekeeper healthcheck proxy-logging cache
      container_sync bulk ratelimit authtoken keystoneauth container-quotas
      account-quotas slo dlo versioned_writes proxy-logging proxy-server
      

      주석

      다른 모듈에 대한 자세한 정보와 추가 기능에 대해서는 Deployment Guide 를 확인하면 됩니다.

    • [app:proxy-server] 섹션에서 account에 대한 자동 생성을 활성화 할 수 있습니다:

      [app:proxy-server]
      use = egg:swift#proxy
      ...
      account_autocreate = true
      
    • In the [filter:keystoneauth] section, configure the operator roles:

      [filter:keystoneauth]
      use = egg:swift#keystoneauth
      ...
      operator_roles = admin,user
      
    • [filter:authtoken] 섹션에서 Identity 서비스 접근에 대해 구성합니다:

      [filter:authtoken]
      paste.filter_factory = keystonemiddleware.auth_token:filter_factory
      ...
      auth_uri = http://controller:5000
      auth_url = http://controller:35357
      auth_plugin = password
      project_domain_id = default
      user_domain_id = default
      project_name = service
      username = swift
      password = SWIFT_PASS
      delay_auth_decision = true
      

      Identity 서비스에서 swift 사용자의 암호로 SWIFT_PASS 를 변경합니다.

      주석

      [filter:authtoken] 섹션에 있는 다른 옵션을 주석 처리 또는 제거합니다.

    • [filter:cache] 세션에 memcached 위치를 구성합니다:

      [filter:cache]
      use = egg:swift#memcache
      ...
      memcache_servers = 127.0.0.1:11211
      
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.