Placement
データベース作成
code:sql
CREATE DATABASE placement;
権限周り
code:sql
GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' IDENTIFIED BY 'PLACEMENT_DBPASS';
GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY 'PLACEMENT_DBPASS';
Placement 用のユーザ作成
code:shell
# openstack user create --domain default --password-prompt placement
管理者ロールでサービスプロジェクトに Placement ユーザーを追加
code:shell
# openstack role add --project service --user placement admin
サービスカタログに Placement API エントリを作成
code:shell
# openstack service create --name placement --description "Placement API" placement
Placement API サービスのエンドポイント作成
code:shell
パッケージのインストール
code:shell
# yum install openstack-placement-api
/etc/placement/placement.conf 編集
code:shell
# diff -u /etc/placement/placement.conf.org /etc/placement/placement.conf
--- /etc/placement/placement.conf.org 2020-05-13 21:34:12.000000000 +0900
+++ /etc/placement/placement.conf 2020-07-31 23:04:34.474973572 +0900
@@ -205,7 +205,7 @@
# Possible values:
# keystone - <No description provided>
# noauth2 - <No description provided>
-#auth_strategy = keystone
+auth_strategy = keystone
@@ -252,6 +252,7 @@
# users may not be able to reach that endpoint. (string value)
# DEPRECATED: Complete "public" Identity API endpoint. This endpoint should not
# be an "admin" endpoint, as it should be accessible by all end users.
@@ -312,7 +313,7 @@
# Optionally specify a list of memcached server(s) to use for caching. If left
# undefined, tokens will instead be cached in-process. (list value)
-#memcached_servers = <None>
+memcached_servers = controller:11211
# In order to prevent excessive effort spent validating tokens, the middleware
# caches previously-seen tokens for a configurable duration (in seconds). Set to
@@ -392,7 +393,12 @@
# Authentication type to load (string value)
-#auth_type = <None>
+auth_type = password
+project_domain_name = Default
+user_domain_name = Default
+project_name = service
+username = placement
+password = placement
# Config Section from which to load plugin specific options (string value)
@@ -515,7 +521,7 @@
# The SQLAlchemy connection string to use to connect to the database. (string
# value)
-#connection = <None>
+connection = mysql+pymysql://placement:placement@controller/placement
# Optional URL parameters to append onto the connection URL at connect time;
# specify as param1=value1¶m2=value2&... (string value)
DB にデータ投入
code:shell
# su -s /bin/sh -c "placement-manage db sync" placement
設定ファイルはこちら
/etc/httpd/conf.d/00-placement-api.conf
httpd 再起動
code:shell
# systemctl restart httpd
動作確認
ステータスチェック
code:shell
# placement-status upgrade check