OpenStack 04 安装--placement

1.安装数据库
[root@vmysql ~]# mysql -p123456
MariaDB [(none)]>CREATE DATABASE placement;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY 'placement123';


2.创建账号
[controller1]$ source scripts/admin-stein.sh 
[controller1]$ openstack user create --domain default --password-prompt placement    #密码是placement
[controller1]$ openstack role add --project service --user placement admin
[controller1]$ openstack service create --name placement --description "Placement API" placement
[controller1]$ openstack service list


3.创建api -service
[controller1]$ openstack endpoint create --region RegionOne placement public http://openstack-vip.magedu.net:8778

[controller1]$ openstack endpoint create --region RegionOne placement internal http://openstack-vip.magedu.net:8778

[controller1]$ openstack endpoint create --region RegionOne placement admin http://openstack-vip.magedu.net:8778


4.开始配置
[controller1]$ yum install openstack-placement-api -y
#编辑/etc/placement/placement.conf文件并完成以下操作:在该[placement_database]部分中,配置数据库访问:
[controller1]$ vim  /etc/placement/placement.conf

[placement_database]
connection = mysql+pymysql://placement:[email protected]/placement

[api]
auth_strategy = keystone

[keystone_authtoken]
auth_url = http://openstack-vip.magedu.net:5000/v3
memcached_servers = openstack-vip.magedu.net:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = placement
password = placement

[controller1]$ su -s /bin/sh -c "placement-manage db sync" placement    #此时mysql数据库应该改会创建很多表。
[controller1]$ systemctl restart httpd    #是因为当时导入包的时候生成了关于http的文件。




5.检查
[controller1]$ source scripts/admin-stein.sh 
[controller1]$ placement-status upgrade check

你可能感兴趣的:(OpenStack)