OpenStack-Placement组件部署
创建数据库实例和数据库用户
[ root@ct ~]
创建Placement服务用户和API的endpoint
创建placement用户
[ root@ct ~]
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | e2fd74e3578f4d47a1f1ab30fff76d80 |
| name | placement |
| options | {
} |
| password_expires_at | None |
+---------------------+----------------------------------+
给与placement用户对service项目拥有admin权限
[ root@ct ~]
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Placement API |
| enabled | True |
| id | 6332d10b09144e509971822c6749a267 |
| name | placement |
| type | placement |
+-------------+----------------------------------+
注册API端口到placement的service中;注册的信息会写入到mysql中
[ root@ct ~]
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 296458b3da894b318f7ee10018480da3 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 6332d10b09144e509971822c6749a267 |
| service_name | placement |
| service_type | placement |
| url | http://ct:8778 |
+--------------+----------------------------------+
[ root@ct ~]
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 569d80ebf9cc4587b03e203c1037cf73 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 6332d10b09144e509971822c6749a267 |
| service_name | placement |
| service_type | placement |
| url | http://ct:8778 |
+--------------+----------------------------------+
[ root@ct~]
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 565c7960765f4431859639949cb7b5d2 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 6332d10b09144e509971822c6749a267 |
| service_name | placement |
| service_type | placement |
| url | http://ct:8778 |
+--------------+----------------------------------+
安装placement服务
[ root@ct ~]
[ root@ct ~]
placement.conf 修改placement配置文件
[ root@ct ~]
[ root@ct ~]
[ root@ct ~]
[ root@ct ~]
[ root@ct ~]
[ root@ct ~]
[ root@ct ~]
[ root@ct ~]
[ root@ct ~]
[ root@ct ~]
[ root@ct ~]
[ root@ct placement]
[ DEFAULT]
[ api]
auth_strategy = keystone
[ cors]
[ keystone_authtoken]
auth_url = http://ct:5000/v3
memcached_servers = ct:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = placement
password = PLACEMENT_PASS
[ oslo_policy]
[ placement]
[ placement_database]
connection = mysql+pymysql://placement:PLACEMENT_DBPASS@ct/placement
[ profiler]
导入数据库
su -s /bin/sh -c "placement-manage db sync" placement
修改Apache配置文件: 00-placemenct-api.conf
安装完placement服务后会自动创建该文件-虚拟主机配置
[ root@ct ~]
[ root@ct conf.d]
< /Location>
< Directory /usr/bin>