yum install -y placement openstack-placement-api
keystone创建用户/授权/服务/端点
openstack service create --name placement --description "Placement API" placement openstack endpoint create --region RegionOne placement public http://192.168.3.220:8778 openstack endpoint create --region RegionOne placement internal http://192.168.3.220:8778 openstack endpoint create --region RegionOne placement admin http://192.168.3.220:8778
/etc/placement/placement.conf
cat > /etc/placement/placement.conf << EOF [DEFAULT] verbose = True [api] auth_strategy = keystone [keystone_authtoken] auth_url = http://192.168.3.220:5000/v3 memcached_servers = 192.168.3.220:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = placement password = placement [placement] [placement_database] connection = mysql+pymysql://placement:placement@192.168.3.220/placement EOF
初始化placement数据库并查看
su -s /bin/sh -c "placement-manage db sync" placement && mysql -uplacement -pplacement -e 'use placement;show tables;'
添加http.conf文件并重启
/etc/httpd/conf.d/00-nova-placement-api.conf
cat > /etc/httpd/conf.d/00-nova-placement-api.conf << EOF <Directory /usr/bin> <IfVersion >= 2.4> Require all granted </IfVersion> <IfVersion < 2.4> Order allow,deny Allow from all </IfVersion> </Directory> EOF
systemctl restart httpd
placement-status upgrade check