본문 바로가기
IT/그 외 IT

[OpenStack] 5. Nova 구성(1)

by 초록술 2022. 6. 2.
반응형

OpenStack 의 Compute Service 인 Nova 설치

 

1. Keystone에 Nova 사용자 및 기타 설정 추가

# Nova 사용자 생성

root@nw1 ~(keystone)# openstack user create --domain default --project service --password 'password입력' nova

# admin 역할 추가

root@nw1 ~(keystone)# openstack role add --project service --user nova admin

 

# placement 사용자 생성
root@nw1 ~(keystone)# openstack user create --domain default --project service --password 'password입력' placement

# admin 역할 추가

root@nw1 ~(keystone)# openstack role add --project service --user placement admin

 

# nova service 생성
root@nw1 ~(keystone)# openstack service create --name nova --description "OpenStack Compute service" compute

# placement 서비스 생성

root@nw1 ~(keystone)# openstack service create --name placement --description "OpenStack Compute Placement service" placement

# Nova IP 정의

root@nw1 ~(keystone)# export controller=192.168.105.191

# nova endpoint 생성 - public
root@nw1 ~(keystone)# openstack endpoint create --region RegionOne compute public http://$controller:8774/v2.1/%\(tenant_id\)s

# nova endpoint 생성 - internal

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

# nova endpoint 생성 - admin

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

 

# placement endpoint 생성 - publice

root@nw1 ~(keystone)# openstack endpoint create --region RegionOne placement public http://$controller:8778

# placement endpoint 생성 - internal

root@nw1 ~(keystone)# openstack endpoint create --region RegionOne placement internal http://$controller:8778

# placement endpoint 생성 - admin

root@nw1 ~(keystone)# openstack endpoint create --region RegionOne placement admin http://$controller:8778

 

 

 

2. MariaDB에 Nova DB 생성, 사용자 추가 및 권한 부여

root@nw1 ~(keystone)# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 73
Server version: 10.3.34-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]> create database nova; 
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> grant all privileges on nova.* to nova@'localhost' identified by 'password입력'
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> grant all privileges on nova.* to nova@'%' identified by 'password입력'
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> create database nova_api; 
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> grant all privileges on nova_api.* to nova@'localhost' identified by 'password입력'
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> grant all privileges on nova_api.* to nova@'%' identified by 'password입력'
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> create database placement; 
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> grant all privileges on placement.* to placement@'localhost' identified by 'password입력'
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> grant all privileges on placement.* to placement@'%' identified by 'password입력'
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> create database nova_cell0; 
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> grant all privileges on nova_cell0.* to nova@'localhost' identified by 'password입력'; 
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> grant all privileges on nova_cell0.* to nova@'%' identified by 'password입력'
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> flush privileges; 
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> exit
Bye
root@nw1 ~(keystone)# 

 

 

 

 

 

 

참고 사이트

https://www.server-world.info/en/note?os=Ubuntu_20.04&p=openstack_xena&f=7 

 

Ubuntu 20.04 LTS : OpenStack Xena : Configure Nova #1 : Server World

root@dlp ~(keystone)# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 49 Server version: 10.3.31-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type

www.server-world.info

 

반응형

댓글