티스토리 뷰

728x90
반응형

본 포스팅은 OpenStack의 구성요소들을 수동으로 설치하는 방법에 대한 가이드입니다.


오픈스택은 Core 프로젝트 즉 주요 구성요소로 10가지를 채택하고 있습니다. 이들은 각자의 VM으로 구성되며 VM간의 연결을 위해 하이퍼바이저를 사용합니다. 본 포스팅에서는 각 구성요소들을 하나씩 수동으로 구성해 보고 연결과정에 대해 알아보겠습니다.


★Cloud★/OpenStack [OpenStack] Part 1. kestone (아이덴티티 서비스)

★Cloud★/OpenStack [OpenStack] Part 2. glance (이미지 서비스)

★Cloud★/OpenStack [OpenStack] Part 3. nova (컴퓨트)

★Cloud★/OpenStack [OpenStack] Part 4. neutron (네트워크)


다섯번째 시간으로 설치할 구성요소는 대쉬보드인 horizon입니다.

앞선 포스팅은 위 URL을 참고하세요.

OpenStack 대쉬보드(horizon)를 사용하면 클라우드 관리자와 사용자들이 다양한 OpenStack 자원과 서비스를 GUI 환경에서 관리 할 수 있습니다.

대시보드는 Identity, 이미지 서비스, Compute, 네트워킹 (neutron) 또는 레거시 네트워킹 (nova-network)를 포함한 핵심 기능 서비스에 의존합니다. Object 스토리지와 같이 단독 서비스를 갖는 환경에는 대시보드를 사용할 수 없습니다.


OpenStack horizon Service Installation

dashboard service는 horizon이라는 프로젝트로 개발되었습니다. OpenStack은 오픈소스로써 이러한 프로젝트들이 핵심프로젝트로 올라가면 이를 실제 OpenStack에 반영하여 사용하고 실제 프로젝트 Name은 Module Name 및 CLI 환경에서 Command로 사용할 수 있습니다.


- 본 테스트는 다음과 같은 환경에서 작성되었습니다.

[nrson@nrsonLinux~$]uname -a
Linux nrsonLinux 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[nrson@nrsonLinux~$]

- 본 포스팅에서는 다양한 설치가 이루어짐에 따라 필수로 설치되어야 하는 mysql, rabbitMQ등의 Install과정으 과감히 제거하였습니다. 별도의 포스팅에서 사전에 준비되야 하는 Package의 설치 과정을 설명드리겠습니다.

- 본 포스팅에서 설치되는 패키지들은 apt-get package manager를 통해 수행됩니다.


horizon 설치 이전 선행 작업

1. horizon OpenStack 대쉬보드 설치


root@nrsonLinux:~# apt-get install openstack-dashboard

패키지 목록을 읽는 중입니다... 완료

의존성 트리를 만드는 중입니다

상태 정보를 읽는 중입니다... 완료

...

...

openstack-dashboard is the newest version (2:9.1.2-0ubuntu5).

root@nrsonLinux:~#


2. /etc/openstack-dashboard/local_settings.py 환경파일 수정


root@nrsonLinux:~# vi /etc/openstack-dashboard/local_settings.py

...

# 컨트롤러 노드에서 오픈스택 서비스를 사용하가 위해 대시보드를 구성

# OPENSTACK_HOST = "127.0.0.1"

OPENSTACK_HOST = "172.21.70.22"

...

# 대시보드를 통해 생성하는 사용자에 대한 디폴트 역할 구성

# OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_"

OPENSTACK_KEYSTONE_DEFAULT_ROLE = "horizon"

...
# 오픈스택 멀티 도메인 모델을 활성화
# OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = False
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
...
# 사용자가 대시보드로 로그인할 때 keystone V3 API를 이용하도록 설정
#OPENSTACK_API_VERSIONS = {
#    "data-processing": 1.1,
#    "identity": 3,
#    "volume": 2,
#    "compute": 2,
#}
OPENSTACK_API_VERSIONS = {
    "identity": 3,
    "volume": 2,
}
...
# 대시보드에 모든 호스트가 접근할 수 있도록 허용
# ALLOWED_HOSTS = '*'
ALLOWED_HOSTS = ['*', ]
...
# memcached 저장 서비스 구성
# We recommend you use memcached for development; otherwise after every reload
# of the django development server, you will have to login again. To use
# memcached set CACHES to something like
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '127.0.0.1:11211',
    },
}
...
# 네트워킹 옵션 1을 선택한 경우, layer-3 네트워킹 서비스 지원을 비활성화
OPENSTACK_NEUTRON_NETWORK = {
    # 'enable_router': True,
    'enable_router': False,
    # 'enable_quotas': True,
    'enable_quotas': False,
    # 'enable_ipv6': True,
    'enable_ipv6': False,
    # 'enable_distributed_router': False,
    'enable_distributed_router': False,
    # 'enable_ha_router': False,
    'enable_ha_router': False,
    # 'enable_lb': True,
    'enable_lb': Flase,
    # 'enable_firewall': True,
    'enable_firewall': False,
    # 'enable_vpn': True,
    'enable_vpn': False,
    # 'enable_fip_topology_check': True,
    'enable_fip_topology_check': Flase,

    # Neutron can be configured with a default Subnet Pool to be used for IPv4
    # subnet-allocation. Specify the label you wish to display in the Address
    # pool selector on the create subnet step if you want to use this feature.
    'default_ipv4_subnet_pool_label': None,

    # Neutron can be configured with a default Subnet Pool to be used for IPv6
    # subnet-allocation. Specify the label you wish to display in the Address
    # pool selector on the create subnet step if you want to use this feature.
    # You must set this to enable IPv6 Prefix Delegation in a PD-capable
    # environment.
    'default_ipv6_subnet_pool_label': None,

    # The profile_support option is used to detect if an external router can be
    # configured via the dashboard. When using specific plugins the
    # profile_support can be turned on if needed.
    'profile_support': None,
    #'profile_support': 'cisco',

    # Set which provider network types are supported. Only the network types
    # in this list will be available to choose from when creating a network.
    # Network types include local, flat, vlan, gre, and vxlan.
    'supported_provider_types': ['*'],

    # Set which VNIC types are supported for port binding. Only the VNIC
    # types in this list will be available to choose from when creating a
    # port.
    # VNIC types include 'normal', 'macvtap' and 'direct'.
    # Set to empty list or None to disable VNIC type selection.
    'supported_vnic_types': ['*'],
}

3. 설치 마무리


root@nrsonLinux:~# service apache2 reload
root@nrsonLinux:~#

오픈스택 대시보드(horizon) 검증과정
1. http://controller/horizon 접속 시도
- 접속 지연 또는 접속에 문제가 발생 시 아래 로그 확인

root@nrsonLinux:/var/log/apache2# tail -f /var/log/apache2/error.log

[Mon Aug 27 14:55:14.914108 2018] [wsgi:error] [pid 8337:tid 140131159766784] [client 172.21.70.218:54786] Timeout when reading response headers from daemon process 'horizon': /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
[Mon Aug 27 14:55:20.062906 2018] [wsgi:error] [pid 8337:tid 140131117803264] [client 172.21.70.218:54842] Truncated or oversized response headers received from daemon process 'horizon': /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
[Mon Aug 27 14:55:20.062922 2018] [wsgi:error] [pid 8336:tid 140131159766784] [client 172.21.70.22:40534] Truncated or oversized response headers received from daemon process 'horizon': /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
# Set to empty list or None to disable VNIC type selection.
    'supported_vnic_types': ['*'],
}

위와같이 Timeout 이슈가 발생 시 아래와 같이 시도합니다.


[nrson@nrsonLinux/etc/apache2/conf-available$]pwd
/etc/apache2/conf-available
[nrson@nrsonLinux/etc/apache2/conf-available$]vi openstack-dashboard.conf
WSGIScriptAlias /horizon /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
WSGIDaemonProcess horizon user=horizon group=horizon processes=3 threads=10
WSGIProcessGroup horizon
WSGIApplicationGroup %{GLOBAL}
Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static/
Alias /horizon/static /usr/share/openstack-dashboard/openstack_dashboard/static/
<Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>
  Order allow,deny
  Allow from all
</Directory>

해당 구문 삽입 후 apache2 Restart


[nrson@nrsonLinux/etc/apache2/conf-available$]sudo service apache2 restart
[nrson@nrsonLinux/etc/apache2/conf-available$]


다시 접속 테스트 수행


두둥 드디어 오픈스택 대시보드 연결에 성공하였습니다.
사용자 계정과 비밀번호 그리고 도메인은 다음과 같습니다.

지난 아이덴티티 (keystone) 설치 과정에서와 같이 admin 계정을 nrson으로 만들었었죠.
domain : default
id : nrson
passwd : nrson
입력하면 다음과 같이 로그인에 성공하여 main 화면으로 이동합니다.

왼쪽에 익숙한 메뉴들이 보이죠.
먼저 인증 탭에는 프로젝트와 사용자를 볼 수 있습니다.
프로젝트는 총 service, demo, nrsonStack 3종류로 각각 서로 다른 분야의 프로젝트를 생성하였죠.

사용자는 지금까지 설치 완료하며 생성한 nrson(identity), glance(image), nova(compute), neutron(network) 그리고 demo 사용자로 나뉘어 있습니다.
앞으로는 사용자 계정이나 프로젝트 생성은 대시보드에 접속하여 수행하도록 하겠습니다.
프로젝트 탭으로 가면 다음과 같은 메뉴들을 볼 수 있습니다.

프로젝트 탭에서는 Compute, Network 관련 설정으로 나뉘어 있습니다.
앞서 image service를 담당하는 glance에서 추가했던 cirros도 볼 수 있네요.

또한 관리자 로그인시에만 볼 수 있는 관리자 탭에서는 전체적은 설정 정보를 볼 수 있습니다.
먼저 인증 탭에는 프로젝트와 사용자를 볼 수 있습니다.

지금까지 OpenStack 구성요소인 호라이즌(horizon) 대시보드를 구성해 보았습니다.
다음시간에는 신더(cinder) 블록 스토리지에 대해 알아보겠습니다.


728x90
반응형