官网地址:https://docs.openstack.org/placement/stein/install/install-rdo.html #:创建placement库,并授权 MariaDB [(none)]> CREATE DATABASE placement; MariaDB [(none)]> GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY 'placement123'; #: 加载环境变量 [root@cobbler ~]# source scripts/admin-stein.sh #:创建placement用户 [root@cobbler ~]# openstack user create --domain default --password-prompt placement #:给admin项目添加一个用户placement,并加入到service角色 [root@cobbler ~]# openstack role add --project service --user placement admin #:创建一个类型为placement的服务 [root@cobbler ~]# openstack service create --name placement --description "Placement API" placement #: 注册API [root@cobbler ~]# openstack endpoint create --region RegionOne placement public http://www.magedu.net:8778 [root@cobbler ~]# openstack endpoint create --region RegionOne placement internal http://www.magedu.net:8778 [root@cobbler ~]# openstack endpoint create --region RegionOne placement admin http://www.magedu.net:8778 #: 安装placement的api [root@cobbler ~]# yum install openstack-placement-api -y #:配置 [root@cobbler ~]# vim /etc/placement/placement.conf [placement_database] # connection = mysql+pymysql://placement:placement123@www.magedu.net/placement [api] # auth_strategy = keystone [keystone_authtoken] # auth_url = http://www.magedu.net:5000/v3 memcached_servers = www.magedu.net:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = placement password = placement #:初始化数据库 [root@cobbler ~]# su -s /bin/sh -c "placement-manage db sync" placement #:重启httpd服务 [root@cobbler ~]# systemctl restart httpd
官网地址:https://docs.openstack.org/placement/stein/install/verify.html #:加载环境变量 [root@cobbler ~]# source scripts/admin-stein.sh #:测试 [root@cobbler ~]# placement-status upgrade check