3.5 Placement服务安装

3.5.1 Placement概述

3.5.2 Placement部署

  1. Placement服务注册
# openstack service create --name placement   --description "Placement API" placement
# openstack endpoint create --region RegionOne   placement public http://192.168.56.11:8778
# openstack endpoint create --region RegionOne   placement internal http://192.168.56.11:8778
# openstack endpoint create --region RegionOne   placement admin http://192.168.56.11:8778
  1. 安装Placement

    [root@linux-node1 ~]# yum install -y openstack-placement-api
    
  2. 配置Palacement

[root@linux-node1 ~]# vim /etc/placement/placement.conf
[placement_database]
connection = mysql+pymysql://placement:placement@192.168.56.11/placement
[api]
auth_strategy = keystone
[keystone_authtoken]
auth_url = http://192.168.56.11:5000/v3
memcached_servers = 192.168.56.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = placement
password = placement

[root@linux-node1 ~]# vim /etc/httpd/conf.d/00-placement-api.conf 

#增加下面配置
<Directory /usr/bin>
Require all granted
</Directory>

增加后如下:

Listen 8778

<VirtualHost *:8778>
  <Directory /usr/bin>
Require all granted
</Directory>
  WSGIProcessGroup placement-api
  WSGIApplicationGroup %{GLOBAL}
  WSGIPassAuthorization On
  WSGIDaemonProcess placement-api processes=3 threads=1 user=placement group=placement
  WSGIScriptAlias / /usr/bin/placement-api
  <IfVersion >= 2.4>
    ErrorLogFormat "%M"
  </IfVersion>
  ErrorLog /var/log/placement/placement-api.log
  #SSLEngine On
  #SSLCertificateFile ...
  #SSLCertificateKeyFile ...
</VirtualHost>

Alias /placement-api /usr/bin/placement-api
<Location /placement-api>
  SetHandler wsgi-script
  Options +ExecCGI
  WSGIProcessGroup placement-api
  WSGIApplicationGroup %{GLOBAL}
  WSGIPassAuthorization On
</Location>
  1. 同步数据库
[root@linux-node1 ~]# su -s /bin/sh -c "placement-manage db sync" placement
  1. 重启httpd
[root@linux-node1 ~]# systemctl restart httpd
Copyright © 赵班长@新运维社区 2019 all right reserved,powered by Gitbook该文件修订时间: 2020-02-04 21:35:15

results matching ""

    No results matching ""