2022-10-28
#9 [학습서] OpenStack 설치 학습서 - 5.Placement
2022-10-28
Tasks

OpenStack 설치 학습서#


5. Placement#

Placement service는 리소스의 사용량을 추적하는데 사용되는 서비스입니다.

Placement은 Keystone 설치 이후에 설치하는 서비스이며, 본 학습서에서는 Controller node에서 설치를 진행합니다.


  • Controller node
    • 사전 설정
      CONTROLLER_IP=192.168.0.150
      OPENSTACK_PASSWORD=passwds
      
    • 데이터베이스에 서비스 생성
      mysql -e "CREATE DATABASE placement;"
      mysql -e "GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' IDENTIFIED BY '${OPENSTACK_PASSWORD}';"
      mysql -e "GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY '${OPENSTACK_PASSWORD}';"
      mysql -e "FLUSH PRIVILEGES;"
      
    • admin 커맨드 액세스
      . admin-openrc
      
    • 서비스 자격 증명 및 생성
      openstack user create --domain default --password ${OPENSTACK_PASSWORD} placement
      openstack role add --project service --user placement admin
      openstack service create --name placement --description "Placement API" placement
      
      • 5-1.png
    • API 엔드포인트를 생성
      openstack endpoint create --region RegionOne placement public http://${CONTROLLER_IP}:8778
      openstack endpoint create --region RegionOne placement internal http://${CONTROLLER_IP}:8778
      openstack endpoint create --region RegionOne placement admin http://${CONTROLLER_IP}:8778
      
      • 5-2.png
    • 패키지 설치 및 설정
      apt install -y placement-api
      # placement.conf 파일 수정
      crudini --set /etc/placement/placement.conf placement_database connection mysql+pymysql://placement:${OPENSTACK_PASSWORD}@${CONTROLLER_IP}/placement
      crudini --set /etc/placement/placement.conf api auth_strategy keystone
      crudini --set /etc/placement/placement.conf keystone_authtoken auth_url http://${CONTROLLER_IP}:5000/v3
      crudini --set /etc/placement/placement.conf keystone_authtoken memcached_servers ${CONTROLLER_IP}:11211
      crudini --set /etc/placement/placement.conf keystone_authtoken auth_type password
      crudini --set /etc/placement/placement.conf keystone_authtoken project_domain_name Default
      crudini --set /etc/placement/placement.conf keystone_authtoken user_domain_name Default
      crudini --set /etc/placement/placement.conf keystone_authtoken project_name service
      crudini --set /etc/placement/placement.conf keystone_authtoken username placement
      crudini --set /etc/placement/placement.conf keystone_authtoken password ${OPENSTACK_PASSWORD}
      
      • 5-3.png
    • 데이터베이스 설정
      su -s /bin/sh -c "placement-manage db sync" placement
      
    • 서비스 재시작
      service apache2 restart
      # 서비스 확인
      placement-status upgrade check
      
      5-4.png
Comment 0

Add a comment