Skip to content

Latest commit

 

History

History
130 lines (90 loc) · 2.29 KB

04-placement.md

File metadata and controls

130 lines (90 loc) · 2.29 KB

Placement Install

1. CONTROLLER NODE

Database setup

  1. Access database as root:
mysql
  1. Create placement database:
CREATE DATABASE placement;
  1. Grant proper access to placement user and exit:
GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' identified by 'password123';
GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' identified by 'password123';
exit

Create openstack objects

  1. Source .adminrc
source .adminrc
  1. Create service and creds
  • Create placement user and add role:
openstack user create --domain default --password password123 placement

openstack role add --project service --user placement admin
  • Create placement service:
openstack service create --name placement \
  --description "Placement API" placement
  1. Create service API endpoints:
for i in public internal admin; \
  do openstack endpoint create --region RegionOne \
  placement $i http://controller:8778; \
  done

Install and configure componenets

  1. Install packages:
apt install placement-api python3-osc-placement -y
  1. Backup an sanitize /etc/placement/placement.conf:
cp -p /etc/placement/placement.conf /etc/placement/placement.conf.bak
grep -Ev '^(#|$)' /etc/placement/placement.conf.bak|sed '/^\[.*]/i \ '|tail -n +2 > /etc/placement/placement.conf
  1. Edit /etc/placement/placement.conf sections:
[api]
# ...
auth_strategy = keystone

[keystone_authtoken]
# ...
auth_url = http://controller:5000/v3
memcached_servers = controller:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = placement
password = password123

[placement_database]
# ...
# remove other connections
connection = mysql+pymysql://placement:password123@controller/placement
  1. Populate database:
su -s /bin/sh -c "placement-manage db sync" placement
  1. Restart web server:
service apache2 restart

Verify ops

  1. Source .adminrc
source .adminrc
  1. Perform status checks:
placement-status upgrade check

openstack --os-placement-api-version 1.2 resource class list --sort-column name

openstack --os-placement-api-version 1.6 trait list --sort-column name