본문 바로가기
Openstack

3. 오픈스택: placement 설치

by 왈레 2023. 4. 6.

컨트롤러 노드에서 진행

$ mysql
> CREATE DATABASE placement;
> GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' IDENTIFIED BY 'a';
> GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY 'a';
> quit

# 유저추가 및 관리자 권한 부여
$ openstack user create --domain default --password-prompt placement # 비밀번호 a
$ openstack role add --project service --user placement admin

# 서비스 추가
$ openstack service create --name placement --description "Placement API" placement

# API 엔드포인트 추가
$ openstack endpoint create --region RegionOne placement public <http://172.0.0.4:8778>
$ openstack endpoint create --region RegionOne placement internal <http://controller:8778>
$ openstack endpoint create --region RegionOne placement admin <http://controller:8778>

# 확인
$ openstack user list | grep placement 
$ openstack service list | grep placement
$ openstack endpoint list | grep placement 

# 패키지 설치
$ apt install placement-api
$ cp /etc/placement/placement.conf /etc/placement/placement.conf.org
$ grep -E '^[^#].' /etc/placement/placement.conf.org > /etc/placement/placement.conf
$ vi /etc/placement/placement.conf
[placement_database]
connection = mysql+pymysql://placement:a@controller/placement

[api]
auth_strategy = keystone

[keystone_authtoken] # 밑의 옵션을 제외한 나머지 옵션은 제거해야함
auth_url = <http://controller:5000/v3>
memcached_servers = controller:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = placement
password = a

# DB insert
$ su -s /bin/sh -c "placement-manage db sync" placement

$ service apache2 restart
$ service apache2 status

# 검증1
$ placement-status upgrade check
+----------------------------------+
| Upgrade Check Results            |
+----------------------------------+
| Check: Missing Root Provider IDs |
| Result: Success                  |
| Details: None                    |
+----------------------------------+
| Check: Incomplete Consumers      |
| Result: Success                  |
| Details: None                    |
+----------------------------------+

# 검증2
$ apt install python3-osc-placement
$ openstack --os-placement-api-version 1.2 resource class list --sort-column name
+----------------------------+
| name                       |
+----------------------------+
| DISK_GB                    |
| IPV4_ADDRESS               |
| ...                        |

$ openstack --os-placement-api-version 1.6 trait list --sort-column name
+---------------------------------------+
| name                                  |
+---------------------------------------+
| COMPUTE_DEVICE_TAGGING                |
| COMPUTE_NET_ATTACH_INTERFACE          |
| ...                                   |

'Openstack' 카테고리의 다른 글

5. 오픈스택: neutron 설치  (0) 2023.04.06
4. 오픈스택: nova 설치  (0) 2023.04.06
2. 오픈스택: glance 설치  (1) 2023.04.06
1. 오픈스택: keystone 설치  (0) 2023.04.06
오픈스택: controller 기본 패키지 설치  (0) 2023.04.06

댓글