openstack stein部署手册 5. placement

Posted liujitao79

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openstack stein部署手册 5. placement相关的知识,希望对你有一定的参考价值。

# 建立数据库用户及权限
create database placement;
grant all privileges on placement.* to placement@'localhost' identified by 'Abc@123';
grant all privileges on placement.* to placement@'%' identified by 'Abc@123';

flush privileges;


# 建立用户、角色、服务、项目、域、端点
source ~/.openstack_admin
openstack user create --domain default --password Abc@123 placement
openstack role add --project service --user placement admin
openstack service create --name placement --description "OpenStack Placement Service" placement

openstack endpoint create --region RegionOne placement public http://controller:8778
openstack endpoint create --region RegionOne placement internal http://controller:8778
openstack endpoint create --region RegionOne placement admin http://controller:8778


# 安装程序包
yum install -y openstack-placement-api python-osc-placement


# 变更配置文件
cd /etc/placement
mv placement.conf placement.conf.org

cat > /etc/placement/placement.conf << EOF
[DEFAULT]
debug = false

[api] 
auth_strategy = keystone

[keystone_authtoken]
www_authenticate_uri = http://controller:5000
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 = Abc@123
EOF

chmod 640 /etc/placement/placement.conf
chown root:placement /etc/placement/placement.conf

/etc/httpd/conf.d/00-placement-api.conf
<VirtualHost *:8778>
… 增加执行权限
<Directory /usr/bin>
    <IfVersion >= 2.4>
        Require all granted
    </IfVersion>
    <IfVersion < 2.4>
        Order allow,deny
        Allow from all
    </IfVersion></Directory>
…
</VirtualHost>


# 同步数据库
su -s /bin/bash -c "placement-manage db sync" placement


# 重启服务
systemctl restart httpd


# 验证
placement-status upgrade check
openstack --os-placement-api-version 1.2 resource class list --sort-column name
openstack --os-placement-api-version 1.6 trait list --sort-column name






以上是关于openstack stein部署手册 5. placement的主要内容,如果未能解决你的问题,请参考以下文章

openstack stein部署手册 4. glance

openstack stein部署手册 2. 基础应用

openstack stein部署手册 1. 准备

基于ARM 的 OpenStack Stein 部署

ubuntu18.04 devstack openstack stein部署

19th!OpenStack Stein亮点介绍