티스토리 뷰

728x90
SMALL

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


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


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

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


세번째 시간으로 설치할 구성요소는 Compute인 nova입니다.

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

OpenStack 컴퓨트 (nova)는 IaaS 시스템의 주요 부분입니다. 주요 모듈은 Python으로 구현되어 있습니다. Compute는 인증 관리를 위해 Identity Service를 사용하고 사용자 및 관리 인터페이스용으로 대시보드와 상호작용합니다.

OpenStack Compute는 수평으로 확장가능하며, 이미지를 다운로드하여 인스턴스를 시작합니다.

nova는 다음과 같은 구성 요소가 포함되어 있습니다.


- nova-api service

end user의 compute API 호출을 허용하고 응답합니다. 이 서비스는 admin User가 관리작업을 수행할 수 있도록 OpenStack Compute API, Amazon EC2 API등의 API를 지원합니다. 인스턴스를 실행하고 관리 제어하는 역할을 담당합니다.

- nova-api-metadata service

인스턴스의 메타데이터 요청을 수락합니다. nova-network가 설치 된 다중 호스트 모드에서 실행할 때 사용됩니다. 

- nova-compute service

하이퍼바이저 API를 통해 VM 인스턴스를 생성하고 종료하는 데몬입니다. 하이퍼바이저는 XenServer / KVM / VMWare등이 있습니다.

- nova-scheduler service

queue에서 VM 인스턴스의 Request를 가져와 가상 시스템이 실행되는 Compute 서버 노드를 결정합니다.

- nova-conductor module

nova-compute service와 데이터베이스 간의 상호 작용을 관리합니다.

- nova-cert module

X509 인증용 nova 인증서 서비스를 제공합니다. EC2 API에서만 필요합니다.

- nova-network worker deamon

nova-compute service와 마찬가지로 queue에서 네트워크 작업을 허용하고 네트워크를 관리합니다.

- nova-consoleauth daemon

Console Proxy가 제공하는 사용자에 대한 토큰을 승인합니다. 하단의 nova-novncproxy와 nova-xvpvncproxy를 참고하십시오.

- nova-novncproxy daemon

VNC 연결을 통해 실행 중인 인스턴스에 액세스하는 프록시를 제공합니다. 브라우저 기반 novnc 클라이언트를 지원합니다.

- nova-xvpvnproxy daemon

VNC 연결을 통해 실행 중인 인스턴스에 액세스하는 프록시를 제공합니다. OpenStack 관련 java 클라이언트를 지원합니다.

- nova-spiceshtml5proxy deamon

SPICE 연결을 통해 실행 중인 인스턴스에 액세스하는 프록시를 제공합니다. 브라우저 기반 HTML5 클라이언트를 지원합니다.

- euca2ools client

클라우드 리소스 관리를 위한 CLI API입니다. OpenStack 모듈은 아니지만 EC2 인터페이스를 지원하도록 nova-api를 구성할 수 있습니다.

- nova client

사용자가 테넌트 관리자 또는 End User에게 명령을 전달할 수 있습니다.


# 참조

The queue - daemon 간의 메시지를 전달하기 위한 대기열. 일반적으로 RabbitMQ와 함께 구현되지만 Apache Qpid 또는 Zero MQ와 같은 AMQP 메시지 대기열로 구현할 수 있습니다.

SQL database - OpenStack Compute는 SQL-Alchemy가 지원하는 모든 데이터베이스를 지원할 수 있습니다. 데이터베이스는 테스트 및 개발 작업용도로 SQLite2, MYSQL, PostgreSQL이 사용됩니다. 


OpenStack Compute Service Installation

Compute Service는 nova이라는 프로젝트로 개발되었습니다. 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를 통해 수행됩니다.


728x90

nova 설치 이전 선행 작업

1. Database 생성


[nrson@nrsonLinux~$]mysql -u root -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 99

Server version: 5.7.23-0ubuntu0.16.04.1 (Ubuntu)


Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> CREATE DATABASE nova;

Query OK, 1 row affected (0.00 sec)


mysql> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';

Query OK, 0 rows affected, 1 warning (0.00 sec)


mysql> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'nova';

Query OK, 0 rows affected, 1 warning (0.00 sec)


mysql>


2. admin 접근 권한을 위한 nrsonOpenrc.sh 파일을 실행니다. (작성 방법 및 실행은 상단에 있는 keystone 포스팅을 참고하세요.)


[nrson@nrsonLinux~$]source nrsonOpenrc.sh
[nrson@nrsonLinux~$]


3. nova user를 생성합니다.


root@nrsonLinux:~# openstack user create --domain default --password-prompt nova

User Password:

Repeat User Password:

+-----------+----------------------------------+

| Field     | Value                            |

+-----------+----------------------------------+

| domain_id | default                          |

| enabled   | True                             |

| id        | a2173c9fde4a4f23b2a75da67733fb06 |

| name      | nova                             |

+-----------+----------------------------------+

root@nrsonLinux:~#


4. nova user에게 admin 권한 부여


root@nrsonLinux:~# openstack role add --project service --user nova admin

root@nrsonLinux:~#


5. OpenStack nova에서 Service 엔티티 생성


root@nrsonLinux:~# openstack service create --name nova --description "OpenStack Compute" compute

+-------------+----------------------------------+

| Field       | Value                            |

+-------------+----------------------------------+

| description | OpenStack Compute                |

| enabled     | True                             |

| id          | b5ea8b8e79144579ae0e103f2f1b9537 |

| name        | nova                             |

| type        | compute                          |

+-------------+----------------------------------+

root@nrsonLinux:~#


6. Compute 서비스 API 엔드 포인트를 생성


root@nrsonLinux:~# openstack endpoint create --region RegionOne compute public http://controller:8774/v2/%\(tenant_id\)s

+--------------+-----------------------------------------+

| Field        | Value                                   |

+--------------+-----------------------------------------+

| enabled      | True                                    |

| id           | 5a4251857cd7414784e45a9518b53906        |

| interface    | public                                  |

| region       | RegionOne                               |

| region_id    | RegionOne                               |

| service_id   | b5ea8b8e79144579ae0e103f2f1b9537        |

| service_name | nova                                    |

| service_type | compute                                 |

| url          | http://controller:8774/v2/%(tenant_id)s |

+--------------+-----------------------------------------+

root@nrsonLinux:~# openstack endpoint create --region RegionOne compute internal http://controller:8774/v2/%\(tenant_id\)s

+--------------+-----------------------------------------+

| Field        | Value                                   |

+--------------+-----------------------------------------+

| enabled      | True                                    |

| id           | b1fd51cc71744c94af14fac0812ed20b        |

| interface    | internal                                |

| region       | RegionOne                               |

| region_id    | RegionOne                               |

| service_id   | b5ea8b8e79144579ae0e103f2f1b9537        |

| service_name | nova                                    |

| service_type | compute                                 |

| url          | http://controller:8774/v2/%(tenant_id)s |

+--------------+-----------------------------------------+

root@nrsonLinux:~# openstack endpoint create --region RegionOne compute admin http://controller:8774/v2/%\(tenant_id\)s

+--------------+-----------------------------------------+

| Field        | Value                                   |

+--------------+-----------------------------------------+

| enabled      | True                                    |

| id           | f9495265c1e54737b8938a070014c888        |

| interface    | admin                                   |

| region       | RegionOne                               |

| region_id    | RegionOne                               |

| service_id   | b5ea8b8e79144579ae0e103f2f1b9537        |

| service_name | nova                                    |

| service_type | compute                                 |

| url          | http://controller:8774/v2/%(tenant_id)s |

+--------------+-----------------------------------------+

root@nrsonLinux:~#


7. rabbitMQ Setting

rabbitMQ Server에 openstack 계정 생성 (rabbitmqctl add_user USER PASSWD)

rabbitMQ에 생성 된 openstack User에게 권한 부여


root@nrsonLinux:~# rabbitmqctl add_user openstack openstack

Creating user "openstack" ...

root@nrsonLinux:~# rabbitmqctl set_permissions openstack ".*" ".*" ".*"

Setting permissions for user "openstack" in vhost "/" ...

root@nrsonLinux:~#


728x90

nova Controller Node Install

1. 패키지를 설치합니다.


root@nrsonLinux:~# apt-get install nova-api nova-cert nova-conductor nova-consoleauth nova-novncproxy nova-scheduler python-novaclient

패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료

...

...

nova-api is the newest version (2:13.1.4-0ubuntu4.2).

nova-cert is the newest version (2:13.1.4-0ubuntu4.2).

nova-scheduler is the newest version (2:13.1.4-0ubuntu4.2).

python-novaclient is the newest version (2:3.3.1-2ubuntu1).

nova-conductor is the newest version (2:13.1.4-0ubuntu4.2).

nova-consoleauth is the newest version (2:13.1.4-0ubuntu4.2).

nova-novncproxy is the newest version (2:13.1.4-0ubuntu4.2).

root@nrsonLinux:~#


2. /etc/nova/nova.conf 파일을 편집합니다.


[DEFAULT]

...

# RabbitMQ Message Queue Connection

rpc_backend=rabbit

# Identity Service Connection

auth_strategy = keystone

# Controller Node의 관리 인터페이스 IP 주소를 사용

my_ip = 172.21.70.22

# Networking Service 활성화

network_api_class = nova.network.neutronv2.api.API

security_group_api = neutron

linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver

firewall_driver = nova.virt.firewall.NoopFirewallDriver

# EC2 API를 비활성화

enabled_apis=osapi_compute,metadata

...

[database]

# connection=sqlite:////var/lib/nova/nova.sqlite

# connection=mysq+pymysql://DBID:DBPasswd@controller/SID

connection=mysql+pymysql://nova:nova@172.21.70.22:3306/nova

...

# RabbitMQ Message Queue Connection

[oslo_messaging_rabbit]

rabbit_host = 172.21.70.22

rabbit_userid = openstack

rabbit_password = openstack

...

# Identity Service Connection

[keystone_authtoken]

auth_uri = http://172.21.70.22:5000

auth_url = http://172.21.70.22:35357

auth_plugin = password

project_domain_id = default

user_domain_id = default

project_name = service

username = nova

password = nova

...

# Controller Node의 관리 인터페이스 IP 주소를 VNC 프록시에서 사용

[vnc]

vncserver_listen = $my_ip

vncserver_proxyclient_address = $my_ip

...

# Image Service 위치를 구성

[glance]

host = controller

...

# lock 경로를 구성

[oslo_concurrency]

lock_path = /var/lib/nova/tmp


3. Compute 데이터베이스 초기화

컴퓨트 데이터베이스를 생성하고 컴퓨트 서비스가 이 데이터베이스를 사용하도록 구성했지만 데이터베이스가 지금은 비어있는 상태입니다. 이에 작성한 nova.conf 파일을 기준으로 데이터베이스의 스키마를 구축합니다.


root@nrsonLinux:~# su -s /bin/sh -c "nova-manage db sync" nova

Option "logdir" from group "DEFAULT" is deprecated. Use option "log-dir" from group "DEFAULT".

Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.

/usr/lib/python2.7/dist-packages/pymysql/cursors.py:158: Warning: '@@tx_isolation' is deprecated and will be removed in a future release. Please use '@@transaction_isolation' instead

  result = self._query(query)

2018-08-10 16:33:50.533 9049 INFO migrate.versioning.api [-] 215 -> 216...

/usr/lib/python2.7/dist-packages/pymysql/cursors.py:158: Warning: Duplicate index 'block_device_mapping_instance_uuid_virtual_name_device_name_idx' defined on the table 'nova.block_device_mapping'. This is deprecated and will be disallowed in a future release.

  result = self._query(query)

2018-08-10 16:35:24.558 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:24.558 9049 INFO migrate.versioning.api [-] 216 -> 217...

2018-08-10 16:35:24.607 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:24.608 9049 INFO migrate.versioning.api [-] 217 -> 218...

2018-08-10 16:35:24.658 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:24.658 9049 INFO migrate.versioning.api [-] 218 -> 219...

2018-08-10 16:35:24.708 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:24.708 9049 INFO migrate.versioning.api [-] 219 -> 220...

2018-08-10 16:35:24.758 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:24.758 9049 INFO migrate.versioning.api [-] 220 -> 221...

2018-08-10 16:35:24.808 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:24.808 9049 INFO migrate.versioning.api [-] 221 -> 222...

2018-08-10 16:35:24.858 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:24.858 9049 INFO migrate.versioning.api [-] 222 -> 223...

2018-08-10 16:35:24.908 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:24.908 9049 INFO migrate.versioning.api [-] 223 -> 224...

2018-08-10 16:35:24.958 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:24.958 9049 INFO migrate.versioning.api [-] 224 -> 225...

2018-08-10 16:35:25.008 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:25.009 9049 INFO migrate.versioning.api [-] 225 -> 226...

2018-08-10 16:35:25.059 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:25.059 9049 INFO migrate.versioning.api [-] 226 -> 227...

2018-08-10 16:35:25.109 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:25.109 9049 INFO migrate.versioning.api [-] 227 -> 228...

2018-08-10 16:35:26.480 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:26.480 9049 INFO migrate.versioning.api [-] 228 -> 229...

2018-08-10 16:35:27.817 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:27.818 9049 INFO migrate.versioning.api [-] 229 -> 230...

2018-08-10 16:35:30.493 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:30.493 9049 INFO migrate.versioning.api [-] 230 -> 231...

2018-08-10 16:35:32.551 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:32.551 9049 INFO migrate.versioning.api [-] 231 -> 232...

2018-08-10 16:35:34.255 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:34.256 9049 INFO migrate.versioning.api [-] 232 -> 233...

2018-08-10 16:35:36.036 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:36.037 9049 INFO migrate.versioning.api [-] 233 -> 234...

2018-08-10 16:35:36.512 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:36.513 9049 INFO migrate.versioning.api [-] 234 -> 235...

2018-08-10 16:35:36.563 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:36.563 9049 INFO migrate.versioning.api [-] 235 -> 236...

2018-08-10 16:35:36.613 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:36.613 9049 INFO migrate.versioning.api [-] 236 -> 237...

2018-08-10 16:35:36.663 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:36.663 9049 INFO migrate.versioning.api [-] 237 -> 238...

2018-08-10 16:35:36.713 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:36.713 9049 INFO migrate.versioning.api [-] 238 -> 239...

2018-08-10 16:35:36.763 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:36.763 9049 INFO migrate.versioning.api [-] 239 -> 240...

2018-08-10 16:35:36.813 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:36.813 9049 INFO migrate.versioning.api [-] 240 -> 241...

2018-08-10 16:35:36.863 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:36.863 9049 INFO migrate.versioning.api [-] 241 -> 242...

2018-08-10 16:35:36.913 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:36.914 9049 INFO migrate.versioning.api [-] 242 -> 243...

2018-08-10 16:35:36.963 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:36.964 9049 INFO migrate.versioning.api [-] 243 -> 244...

2018-08-10 16:35:37.214 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:37.214 9049 INFO migrate.versioning.api [-] 244 -> 245...

2018-08-10 16:35:44.054 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:44.054 9049 INFO migrate.versioning.api [-] 245 -> 246...

2018-08-10 16:35:45.115 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:45.116 9049 INFO migrate.versioning.api [-] 246 -> 247...

2018-08-10 16:35:49.019 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:49.019 9049 INFO migrate.versioning.api [-] 247 -> 248...

2018-08-10 16:35:49.024 9049 INFO 248_add_expire_reservations_index [-] Skipped adding reservations_deleted_expire_idx because an equivalent index already exists.

2018-08-10 16:35:49.078 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:49.078 9049 INFO migrate.versioning.api [-] 248 -> 249...

2018-08-10 16:35:49.421 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:49.421 9049 INFO migrate.versioning.api [-] 249 -> 250...

2018-08-10 16:35:49.880 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:49.880 9049 INFO migrate.versioning.api [-] 250 -> 251...

2018-08-10 16:35:51.402 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:51.402 9049 INFO migrate.versioning.api [-] 251 -> 252...

2018-08-10 16:35:53.927 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:53.927 9049 INFO migrate.versioning.api [-] 252 -> 253...

2018-08-10 16:35:55.491 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:55.491 9049 INFO migrate.versioning.api [-] 253 -> 254...

2018-08-10 16:35:56.928 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:56.928 9049 INFO migrate.versioning.api [-] 254 -> 255...

2018-08-10 16:35:56.986 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:56.987 9049 INFO migrate.versioning.api [-] 255 -> 256...

2018-08-10 16:35:57.037 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:57.037 9049 INFO migrate.versioning.api [-] 256 -> 257...

2018-08-10 16:35:57.095 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:57.095 9049 INFO migrate.versioning.api [-] 257 -> 258...

2018-08-10 16:35:57.229 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:57.229 9049 INFO migrate.versioning.api [-] 258 -> 259...

2018-08-10 16:35:57.337 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:57.337 9049 INFO migrate.versioning.api [-] 259 -> 260...

2018-08-10 16:35:57.387 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:57.387 9049 INFO migrate.versioning.api [-] 260 -> 261...

2018-08-10 16:35:57.438 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:57.438 9049 INFO migrate.versioning.api [-] 261 -> 262...

2018-08-10 16:35:57.488 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:57.488 9049 INFO migrate.versioning.api [-] 262 -> 263...

2018-08-10 16:35:57.538 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:57.538 9049 INFO migrate.versioning.api [-] 263 -> 264...

2018-08-10 16:35:57.588 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:57.588 9049 INFO migrate.versioning.api [-] 264 -> 265...

2018-08-10 16:35:58.064 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:58.064 9049 INFO migrate.versioning.api [-] 265 -> 266...

2018-08-10 16:35:58.801 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:35:58.801 9049 INFO migrate.versioning.api [-] 266 -> 267...

/usr/lib/python2.7/dist-packages/pymysql/cursors.py:158: Warning: Duplicate index 'uniq_instances0uuid' defined on the table 'nova.instances'. This is deprecated and will be disallowed in a future release.

  result = self._query(query)

2018-08-10 16:36:01.129 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:01.130 9049 INFO migrate.versioning.api [-] 267 -> 268...

2018-08-10 16:36:03.080 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:03.080 9049 INFO migrate.versioning.api [-] 268 -> 269...

2018-08-10 16:36:04.827 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:04.828 9049 INFO migrate.versioning.api [-] 269 -> 270...

2018-08-10 16:36:06.557 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:06.557 9049 INFO migrate.versioning.api [-] 270 -> 271...

2018-08-10 16:36:07.686 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:07.686 9049 INFO migrate.versioning.api [-] 271 -> 272...

2018-08-10 16:36:07.736 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:07.736 9049 INFO migrate.versioning.api [-] 272 -> 273...

2018-08-10 16:36:07.786 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:07.786 9049 INFO migrate.versioning.api [-] 273 -> 274...

2018-08-10 16:36:08.462 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:08.462 9049 INFO migrate.versioning.api [-] 274 -> 275...

2018-08-10 16:36:09.758 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:09.758 9049 INFO migrate.versioning.api [-] 275 -> 276...

2018-08-10 16:36:11.181 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:11.181 9049 INFO migrate.versioning.api [-] 276 -> 277...

2018-08-10 16:36:11.673 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:11.673 9049 INFO migrate.versioning.api [-] 277 -> 278...

2018-08-10 16:36:13.597 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:13.597 9049 INFO migrate.versioning.api [-] 278 -> 279...

2018-08-10 16:36:14.170 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:14.170 9049 INFO migrate.versioning.api [-] 279 -> 280...

2018-08-10 16:36:15.501 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:15.501 9049 INFO migrate.versioning.api [-] 280 -> 281...

2018-08-10 16:36:15.551 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:15.552 9049 INFO migrate.versioning.api [-] 281 -> 282...

2018-08-10 16:36:15.601 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:15.602 9049 INFO migrate.versioning.api [-] 282 -> 283...

2018-08-10 16:36:15.651 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:15.652 9049 INFO migrate.versioning.api [-] 283 -> 284...

2018-08-10 16:36:15.702 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:15.702 9049 INFO migrate.versioning.api [-] 284 -> 285...

2018-08-10 16:36:15.752 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:15.752 9049 INFO migrate.versioning.api [-] 285 -> 286...

2018-08-10 16:36:15.802 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:15.802 9049 INFO migrate.versioning.api [-] 286 -> 287...

2018-08-10 16:36:15.852 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:15.852 9049 INFO migrate.versioning.api [-] 287 -> 288...

2018-08-10 16:36:15.902 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:15.902 9049 INFO migrate.versioning.api [-] 288 -> 289...

2018-08-10 16:36:15.952 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:15.952 9049 INFO migrate.versioning.api [-] 289 -> 290...

2018-08-10 16:36:16.002 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:16.002 9049 INFO migrate.versioning.api [-] 290 -> 291...

2018-08-10 16:36:16.061 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:16.062 9049 INFO migrate.versioning.api [-] 291 -> 292...

2018-08-10 16:36:17.767 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:17.767 9049 INFO migrate.versioning.api [-] 292 -> 293...

2018-08-10 16:36:20.759 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:20.759 9049 INFO migrate.versioning.api [-] 293 -> 294...

2018-08-10 16:36:22.322 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:22.322 9049 INFO migrate.versioning.api [-] 294 -> 295...

2018-08-10 16:36:22.757 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:22.757 9049 INFO migrate.versioning.api [-] 295 -> 296...

2018-08-10 16:36:22.808 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:22.808 9049 INFO migrate.versioning.api [-] 296 -> 297...

2018-08-10 16:36:24.354 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:24.354 9049 INFO migrate.versioning.api [-] 297 -> 298...

2018-08-10 16:36:25.524 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:25.524 9049 INFO migrate.versioning.api [-] 298 -> 299...

2018-08-10 16:36:26.970 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:26.970 9049 INFO migrate.versioning.api [-] 299 -> 300...

2018-08-10 16:36:28.416 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:28.416 9049 INFO migrate.versioning.api [-] 300 -> 301...

2018-08-10 16:36:30.941 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:30.941 9049 INFO migrate.versioning.api [-] 301 -> 302...

2018-08-10 16:36:30.991 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:30.991 9049 INFO migrate.versioning.api [-] 302 -> 303...

2018-08-10 16:36:31.041 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:31.042 9049 INFO migrate.versioning.api [-] 303 -> 304...

2018-08-10 16:36:31.150 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:31.151 9049 INFO migrate.versioning.api [-] 304 -> 305...

2018-08-10 16:36:31.258 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:31.258 9049 INFO migrate.versioning.api [-] 305 -> 306...

2018-08-10 16:36:31.325 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:31.325 9049 INFO migrate.versioning.api [-] 306 -> 307...

2018-08-10 16:36:31.392 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:31.392 9049 INFO migrate.versioning.api [-] 307 -> 308...

2018-08-10 16:36:31.476 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:31.476 9049 INFO migrate.versioning.api [-] 308 -> 309...

2018-08-10 16:36:31.526 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:31.526 9049 INFO migrate.versioning.api [-] 309 -> 310...

2018-08-10 16:36:31.576 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:31.576 9049 INFO migrate.versioning.api [-] 310 -> 311...

2018-08-10 16:36:31.626 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:31.626 9049 INFO migrate.versioning.api [-] 311 -> 312...

2018-08-10 16:36:31.677 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:31.678 9049 INFO migrate.versioning.api [-] 312 -> 313...

2018-08-10 16:36:33.642 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:33.642 9049 INFO migrate.versioning.api [-] 313 -> 314...

2018-08-10 16:36:37.863 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:37.864 9049 INFO migrate.versioning.api [-] 314 -> 315...

2018-08-10 16:36:46.910 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:46.910 9049 INFO migrate.versioning.api [-] 315 -> 316...

2018-08-10 16:36:48.396 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:48.396 9049 INFO migrate.versioning.api [-] 316 -> 317...

2018-08-10 16:36:49.959 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:49.959 9049 INFO migrate.versioning.api [-] 317 -> 318...

2018-08-10 16:36:56.504 9049 INFO migrate.versioning.api [-] done

2018-08-10 16:36:56.504 9049 INFO migrate.versioning.api [-] 318 -> 319...

2018-08-10 16:36:56.807 9049 INFO migrate.versioning.api [-] done

root@nrsonLinux:~#


4. Compute Service 재기동 (총 3개의 nova service를 재기동)


root@nrsonLinux:~# service nova-api restart;service nova-cert restart;service nova-consoleauth restart;service nova-scheduler restart;service nova-conductor restart;service nova-novncproxy restart

root@nrsonLinux:~#


5. nova SQLite 삭제


root@nrsonLinux:~# rm -rf /var/lib/nova/nova.sqlite

root@nrsonLinux:~#


728x90

nova Compute Node Install

Compute Service는 인스턴스 또는 VM을 배포하기위한 하이퍼바이저(Hypervisors)를 지원합니다.

1. nova-compute, sysfsutils 패키지 설치


root@nrsonLinux:~# apt-get install nova-compute sysfsutils

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

의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료

...

...

sysfsutils is already the newest version (2.1.0+repack-4).

nova-compute is already the newest version (2:13.1.4-0ubuntu4.2).

root@nrsonLinux:~#


2. /etc/nova/nova.conf modify

Cotroller Node와 동일하며 하단의 vnc 부분만 차이가 있습니다.


[DEFAULT]

dhcpbridge_flagfile=/etc/nova/nova.conf

dhcpbridge=/usr/bin/nova-dhcpbridge

logdir=/var/log/nova

state_path=/var/lib/nova

lock_path=/var/lock/nova

force_dhcp_release=True

libvirt_use_virtio_for_bridges=True

verbose=True

ec2_private_dns_show_ip=True

api_paste_config=/etc/nova/api-paste.ini

enabled_apis=ec2,osapi_compute,metadata

rpc_backend=rabbit

auth_strategy = keystone

my_ip = 172.21.70.22

network_api_class = nova.network.neutronv2.api.API

security_group_api = neutron

linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver

firewall_driver = nova.virt.firewall.NoopFirewallDriver

enabled_apis=osapi_compute,metadata


[database]

#connection=sqlite:////var/lib/nova/nova.sqlite

connection=mysql+pymysql://nova:nova@172.21.70.22:3306/nova


[api_database]

connection=sqlite:////var/lib/nova/nova.sqlite


[oslo_messaging_rabbit]

rabbit_host = 172.21.70.22

rabbit_userid = openstack

rabbit_password = openstack


[keystone_authtoken]

auth_uri = http://172.21.70.22:5000

auth_url = http://172.21.70.22:35357

auth_plugin = password

project_domain_id = default

user_domain_id = default

project_name = service

username = nova

password = nova


[vnc]

enabled=True

vncserver_listen = 0.0.0.0

vncserver_proxyclient_address = $my_ip

# compute node에 존재하는 인스턴스를 웹브라우저 원격 콘솔로 접근하여 이용할 수 있는 위치

novncproxy_base_url = http://172.21.70.22:6080/vnc_auto.html


[glance]

host = 172.21.70.22


[oslo_concurrency]

lock_path = /var/lib/nova/tmp


3. Compute 노드가 가상 머신의 하드웨어 가속을 지원하는지 확인

결과 값이 1 이상일 경우 지원 0일 경우 지원하지 않는다고 볼수 있습니다.


root@nrsonLinux:~# egrep -c '(vmx|svm)' /proc/cpuinfo

8

root@nrsonLinux:~#


3-1. 3번의 값이 0일 경우 /etc/nova/nova-compute.conf modify

- 1 이상일 경우에는 kvm 가상화를 유지합니다.


[DEFAULT]

compute_driver=libvirt.LibvirtDriver

[libvirt]

# virt_type=kvm

virt_type=qemu


4. nova-compute 재기동


root@nrsonLinux:~# service nova-compute restart

root@nrsonLinux:~#


5. nova SQLite 삭제


root@nrsonLinux:~#  rm -rf /var/lib/nova/nova.sqlite

root@nrsonLinux:~#


728x90

검증 과정

1. nova service list를 확인합니다.


root@nrsonLinux:~# source nrsonOpenrc.sh

root@nrsonLinux:~# nova service-list

+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+

| Id | Binary           | Host       | Zone     | Status  | State | Updated_at                 | Disabled Reason |

+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+

| 5  | nova-cert        | nrsonLinux | internal | enabled | up    | 2018-08-10T08:16:16.000000 | -               |

| 6  | nova-consoleauth | nrsonLinux | internal | enabled | up    | 2018-08-10T08:16:17.000000 | -               |

| 7  | nova-scheduler   | nrsonLinux | internal | enabled | up    | 2018-08-10T08:16:18.000000 | -               |

| 8  | nova-conductor   | nrsonLinux | internal | enabled | up    | 2018-08-10T08:16:18.000000 | -               |

| 10 | nova-compute     | nrsonLinux | nova     | enabled | up    | 2018-08-10T08:16:18.000000 | -               |

+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+

root@nrsonLinux:~#


총 5개의 Service가 있으며 컨트롤러 노드에서 4개의 서비스를 Compute 노드에서 1개의 서비스가 활성화 되어 있습니다.

2. Compute API endpoint 목록과 Identity Service 간에 연결을 확인합니다.


root@nrsonLinux:~# nova endpoints

/usr/lib/python2.7/dist-packages/novaclient/v2/shell.py:4205: UserWarning: nova endpoints is deprecated, use openstack catalog list instead

  "nova endpoints is deprecated, use openstack catalog list instead")

WARNING: keystone has no endpoint in ! Available endpoints for this service:

WARNING: keystone has no endpoint in ! Available endpoints for this service:

WARNING: keystone has no endpoint in ! Available endpoints for this service:

+-----------+----------------------------------+

| keystone  | Value                            |

+-----------+----------------------------------+

| id        | 461f91e8dca947f1bd7e0f80cdfa768a |

| interface | admin                            |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://172.21.70.22:35357/v2.0   |

+-----------+----------------------------------+

+-----------+----------------------------------+

| keystone  | Value                            |

+-----------+----------------------------------+

| id        | 98fb2cbf052149ea8aaf1c5945c03861 |

| interface | internal                         |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://172.21.70.22:5000/v2.0    |

+-----------+----------------------------------+

+-----------+----------------------------------+

| keystone  | Value                            |

+-----------+----------------------------------+

| id        | afbfabcc36404814a2662996aa4157c7 |

| interface | public                           |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://172.21.70.22:5000/v2.0    |

+-----------+----------------------------------+

WARNING: glance has no endpoint in ! Available endpoints for this service:

+-----------+----------------------------------+

| glance    | Value                            |

+-----------+----------------------------------+

| id        | 540f9cd5894c43888d8ae976bc2fcc56 |

| interface | public                           |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://controller:9292           |

+-----------+----------------------------------+

+-----------+----------------------------------+

| glance    | Value                            |

+-----------+----------------------------------+

| id        | 6fcbf736730c4b94b818cbda96a468dc |

| interface | internal                         |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://172.21.70.22:9292         |

+-----------+----------------------------------+

+-----------+----------------------------------+

| glance    | Value                            |

+-----------+----------------------------------+

| id        | 8a8c7634d41e4a758834e5cf450b9066 |

| interface | admin                            |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://172.21.70.22:9292         |

+-----------+----------------------------------+

+-----------+----------------------------------+

| glance    | Value                            |

+-----------+----------------------------------+

| id        | ab46c29fd99646558db20db44ce08086 |

| interface | public                           |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://172.21.70.22:9292         |

+-----------+----------------------------------+

+-----------+----------------------------------+

| glance    | Value                            |

+-----------+----------------------------------+

| id        | b7811d3161b549c1b0969a246b3be176 |

| interface | admin                            |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://172.21.70.22:9292         |

+-----------+----------------------------------+

+-----------+----------------------------------+

| glance    | Value                            |

+-----------+----------------------------------+

| id        | c14f6ebf5a774964bc1a5deb12a2ca3e |

| interface | internal                         |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://172.21.70.22:9292         |

+-----------+----------------------------------+

+-----------+----------------------------------+

| glance    | Value                            |

+-----------+----------------------------------+

| id        | d158918bf17b4f4d83498134507e7e9c |

| interface | public                           |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://172.21.70.22:9292         |

+-----------+----------------------------------+

WARNING: nova has no endpoint in ! Available endpoints for this service:

+-----------+------------------------------------------------------------+

| nova      | Value                                                      |

+-----------+------------------------------------------------------------+

| id        | 5a4251857cd7414784e45a9518b53906                           |

| interface | public                                                     |

| region    | RegionOne                                                  |

| region_id | RegionOne                                                  |

| url       | http://controller:8774/v2/f0811cb886984f4a801578be8a06edfc |

+-----------+------------------------------------------------------------+

+-----------+------------------------------------------------------------+

| nova      | Value                                                      |

+-----------+------------------------------------------------------------+

| id        | 7381cd9101374731a897d1220e37230a                           |

| interface | public                                                     |

| region    | RegionOne                                                  |

| region_id | RegionOne                                                  |

| url       | http://controller:8774/v2/f0811cb886984f4a801578be8a06edfc |

+-----------+------------------------------------------------------------+

+-----------+------------------------------------------------------------+

| nova      | Value                                                      |

+-----------+------------------------------------------------------------+

| id        | b1fd51cc71744c94af14fac0812ed20b                           |

| interface | internal                                                   |

| region    | RegionOne                                                  |

| region_id | RegionOne                                                  |

| url       | http://controller:8774/v2/f0811cb886984f4a801578be8a06edfc |

+-----------+------------------------------------------------------------+

+-----------+------------------------------------------------------------+

| nova      | Value                                                      |

+-----------+------------------------------------------------------------+

| id        | f9495265c1e54737b8938a070014c888                           |

| interface | admin                                                      |

| region    | RegionOne                                                  |

| region_id | RegionOne                                                  |

| url       | http://controller:8774/v2/f0811cb886984f4a801578be8a06edfc |

+-----------+------------------------------------------------------------+

WARNING: glance has no endpoint in ! Available endpoints for this service:

+-----------+----------------------------------+

| glance    | Value                            |

+-----------+----------------------------------+

| id        | 0279be3d6508407e838753dbbccbca63 |

| interface | admin                            |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://172.21.70.22:9292         |

+-----------+----------------------------------+

+-----------+----------------------------------+

| glance    | Value                            |

+-----------+----------------------------------+

| id        | 43f204a35f1d424caa0042c6e1852acf |

| interface | internal                         |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://172.21.70.22:9292         |

+-----------+----------------------------------+

+-----------+----------------------------------+

| glance    | Value                            |

+-----------+----------------------------------+

| id        | 9a445185091a4dacbcbf46ff5d0ef641 |

| interface | admin                            |

| region    | RegionOne                        |

| region_id | RegionOne                        |

| url       | http://172.21.70.22:9292         |

+-----------+----------------------------------+

root@nrsonLinux:~#


출력되는 경고는 무시하면 되며, 지금까지 추가했던 glance와 keystone 그리고 nova의 endpoint가 모두 출력됩니다. 어제 glance 문제를 해결하다,,,,, 원인을 못찾아 endpoint를 여러개 생성해더니.. 3세트가 나왔어요.. 나중에 제거할 예정입니다.

3. nova image list 입니다.


root@nrsonLinux:~# nova image-list

+--------------------------------------+--------+--------+--------+

| ID                                   | Name   | Status | Server |

+--------------------------------------+--------+--------+--------+

| 362f5a23-8083-4cbe-b0db-ba3abc3762fb | cirros | ACTIVE |        |

+--------------------------------------+--------+--------+--------+

root@nrsonLinux:~#


어제 작업했던 glance service에 업로드 된 cirros 이미지가 보입니다.


지금까지 OpenStack 구성요소인 컴퓨트(nova) 이미지 서비스를 구성해 보았습니다.

다음시간에는 뉴트론(neutron) 네트워크 서비스에 대해 알아보겠습니다.

728x90
LIST
댓글
댓글쓰기 폼