05 龙芯平台openstack部署搭建-placement部署

一、创建placement相关数据库、凭据与API端点

1.创建placement数据库并授权

mysql -uroot -ploongson -e “CREATE DATABASE placement;”
mysql -uroot -ploongson -e “GRANT ALL PRIVILEGES ON placement.* TO ‘placement’@‘localhost’ IDENTIFIED BY ‘loongson’;”
mysql -uroot -ploongson -e “GRANT ALL PRIVILEGES ON placement.* TO ‘placement’@‘%’ IDENTIFIED BY ‘loongson’;”

#创建placement-common并赋予其权限,否则数据库同步时将失败
mysql -uroot -ploongson -e “GRANT ALL PRIVILEGES ON placement.* TO ‘placement-common’@‘localhost’ IDENTIFIED BY ‘loongson’;”
mysql -uroot -ploongson -e “GRANT ALL PRIVILEGES ON placement.* TO ‘placement-common’@‘%’ IDENTIFIED BY ‘loongson’;”

#配置用户和端点
#以下命令需要输入密码

2.创建服务凭据

openstack user create --domain default --password-prompt placement
openstack role add --project service --user placement admin
openstack service create --name placement --description “Placement API” placement

3.创建placement项目的endpoint(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
openstack endpoint list

二、placement相关软件安装与配置

1.安装placement软件

yum install -y openstack-placement-api

2.配置文件修改

#先备份
cp /etc/placement/placement.conf /etc/placement/placement.conf.bac
#修改内容如下
openstack-config --set /etc/placement/placement.conf placement_database connection mysql+pymysql://placement:loongson@controller:3306/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 loongson

3.同步placement数据库

#(1)同步并初始化
su -s /bin/sh -c “placement-manage db sync” placement

#(2)重启Apache服务(httpd)
systemctl restart httpd

#(3)placement验证
placement-status upgrade check

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值