• OpenStack Train版-4.安装placement放置服务


    安装placement放置服务

    创建placement数据库

    mysql -uroot
    CREATE DATABASE placement;
    GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' IDENTIFIED BY 'PLACEMENT_DBPASS';
    GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY 'PLACEMENT_DBPASS';
    flush privileges;

    创建placement用户

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

    将Placement用户添加到服务项目中

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

    创建placement API服务实体

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

    创建placement API服务访问端点

    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

    安装placement软件包

    yum install openstack-placement-api -y

    修改配置文件/etc/placement/placement.conf 

    cp /etc/placement/placement.conf /etc/placement/placement.conf.bak
    grep -Ev '^$|#' /etc/placement/placement.conf.bak > /etc/placement/placement.conf
    
    openstack-config --set /etc/placement/placement.conf placement_database connection mysql+pymysql://placement:PLACEMENT_DBPASS@controller/placement
    
    openstack-config --set /etc/placement/placement.conf api auth_strategy keystone
    
    openstack-config --set /etc/placement/placement.conf keystone_authtoken auth_url http://controller:5000/v3
    openstack-config --set /etc/placement/placement.conf keystone_authtoken memcached_servers controller:11211
    openstack-config --set /etc/placement/placement.conf keystone_authtoken auth_type password
    openstack-config --set /etc/placement/placement.conf keystone_authtoken project_domain_name Default
    openstack-config --set /etc/placement/placement.conf keystone_authtoken user_domain_name Default
    openstack-config --set /etc/placement/placement.conf keystone_authtoken project_name service
    openstack-config --set /etc/placement/placement.conf keystone_authtoken username placement
    openstack-config --set /etc/placement/placement.conf keystone_authtoken password PLACEMENT_PASS

    填充placement数据库

    su -s /bin/sh -c "placement-manage db sync" placement
    mysql placement -e 'show tables'

    修改placement的apache配置文件,官方文档没有提到,如果不修改,计算服务检查时将会报错

    #启用placement API访问
    [root@controller ~]# vim /etc/httpd/conf.d/00-placement-api.conf
    ...
    15 #SSLCertificateKeyFile
    #SSLCertificateKeyFile ...
    <Directory /usr/bin>
    <IfVersion >= 2.4>
    Require all granted
    </IfVersion>
    <IfVersion < 2.4>
    Order allow,deny
    Allow from all
    </IfVersion>
    </Directory>
    ...
    
    #重启apache服务
    systemctl restart httpd.service
    netstat -lntup|grep 8778
    lsof -i:8778
    
    #curl地址看是否能返回json
    curl http://controller:8778

    验证检查健康状态

    placement-status upgrade check
  • 相关阅读:
    HDFS Maintenance State
    HDFS Maintenance State
    HDFS“慢节点”监控分析功能
    Confluence 6 找到你的支持识别代码(SEN)
    Confluence 6 降级你的许可证
    Confluence 6 增加和减少你许可证的用户数
    Confluence 6 理解你许可证的用户数
    Confluence 6 升级你的许可证
    Confluence 6 查看你的许可证细节
    Confluence 6 管理你的 Confluence 许可证
  • 原文地址:https://www.cnblogs.com/Wang-Hongwei/p/13098020.html
Copyright © 2020-2023  润新知