其他分享
首页 > 其他分享> > 3. placement安装

3. placement安装

作者:互联网

node可用资源统计,调度算法

官网文档:https://docs.openstack.org/placement/train/install/

端口:8778

创建数据库

MariaDB [(none)]> CREATE DATABASE placement;

MariaDB [(none)]> GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' \
  IDENTIFIED BY 'PLACEMENT_DBPASS';

MariaDB [(none)]> GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' \
  IDENTIFIED BY 'PLACEMENT_DBPASS';

配置用户和端点

  1. 获取admin凭据以访问仅限管理员的 CLI 命令:

. admin-openrc

使用您选择的创建放置服务用户PLACEMENT_PASS

openstack user create --domain default --password-prompt placement

将 Placement 用户添加到具有管理员角色的服务项目中:

openstack role add --project service --user placement admin

在服务目录中创建 Placement API 条目

$ openstack service create --name placement \
  --description "Placement API" placement

+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Placement API                    |
| enabled     | True                             |
| id          | 2d1a27022e6e4185b86adac4444c495f |
| name        | placement                        |
| type        | placement                        |
+-------------+----------------------------------+

创建 Placement API 服务端点:

openstack endpoint create --region RegionOne  placement public http://openstack-vip.test.com:8778
 
 openstack endpoint create --region RegionOne  placement internal http://openstack-vip.test.com:8778
 
 openstack endpoint create --region RegionOne  placement admin http://openstack-vip.test.com:8778

安装和配置组件

yum install openstack-placement-api

编辑/etc/placement/placement.conf文件并完成以下操作:

[placement_database]
# ...
connection = mysql+pymysql://placement:PLACEMENT_DBPASS@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 = PLACEMENT_PASS

初始化数据库

su -s /bin/sh -c "placement-manage db sync" placement

bug修复

参考文档:https://docs.openstack.org/nova/rocky/install/controller-install-rdo.html

/etc/httpd/conf.d/00-nova-placement-api.conf 新增以下配置

<Directory /usr/bin>
   <IfVersion >= 2.4>
      Require all granted
   </IfVersion>
   <IfVersion < 2.4>
      Order allow,deny
      Allow from all
   </IfVersion>
</Directory>

重启

systemctl restart httpd

测试

[root@openstack-1 ~]# curl 192.168.64.110:8778
{"versions": [{"status": "CURRENT", "min_version": "1.0", "max_version": "1.36", "id": "v1.0", "links": [{"href": "", "rel": "self"}]}]}

 

标签:Placement,name,PLACEMENT,--,openstack,placement,安装
来源: https://www.cnblogs.com/rtnb/p/16538672.html