컨트롤러 노드에서 진행
# 여기서는 백업 기능은 설정하지않습니다.
$ mysql
> CREATE DATABASE cinder;
> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY 'a';
> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'a';
> quit
# 사용자 추가 및 admin 권한 부여
$ openstack user create --domain default --password-prompt cinder # 비밀번호 a
$ openstack role add --project service --user cinder admin
# 서비스 추가 (volumev2, volumev3)
# *제드에서는 volumev3만 추가*
$ openstack service create --name cinderv2 --description "OpenStack Block Storage" volumev2
$ openstack service create --name cinderv3 --description "OpenStack Block Storage" volumev3
# API 엔드포인트 추가 (volumev2, volumev3)
# *제드에서는 volumev3만 추가*
$ openstack endpoint create --region RegionOne volumev2 public <http://172.0.0.4:8776/v2/%\\(project_id\\)s>
$ openstack endpoint create --region RegionOne volumev2 internal <http://controller:8776/v2/%\\(project_id\\)s>
$ openstack endpoint create --region RegionOne volumev2 admin <http://controller:8776/v2/%\\(project_id\\)s>
$ openstack endpoint create --region RegionOne volumev3 public <http://172.0.0.4:8776/v3/%\\(project_id\\)s>
$ openstack endpoint create --region RegionOne volumev3 internal <http://controller:8776/v3/%\\(project_id\\)s>
$ openstack endpoint create --region RegionOne volumev3 admin <http://controller:8776/v3/%\\(project_id\\)s>
# 확인
$ openstack user list | grep cinder
$ openstack service list | grep cinder
$ openstack endpoint list | grep volumev2
$ openstack endpoint list | grep volumev3
# 패키지 설치
$ apt install cinder-api cinder-scheduler
$ cp /etc/cinder/cinder.conf /etc/cinder/cinder.conf.org
$ grep -E '^[^#].' /etc/cinder/cinder.conf.org > /etc/cinder/cinder.conf
$ vi /etc/cinder/cinder.conf
[database]
connection = mysql+pymysql://cinder:a@controller/cinder
[DEFAULT]
my_ip = 10.0.0.11 # 컨트롤러 노드 10 영역대 ip
transport_url = rabbit://openstack:a@controller
auth_strategy = keystone
[keystone_authtoken]
www_authenticate_uri = <http://controller:5000>
auth_url = <http://controller:5000>
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = a
[oslo_concurrency]
lock_path = /var/lib/cinder/tmp
# DB insert
$ su -s /bin/sh -c "cinder-manage db sync" cinder
# compute 노드가 Block Storage를 사용하도록 설정
$ vi /etc/nova/nova.conf
[cinder]
os_region_name = RegionOne
# Compute API 서비스 다시 시작
$ service nova-api restart
# 블록 스토리지 서비스 다시 시작
$ service cinder-scheduler restart
$ service apache2 restart
# 검증
$ openstack volume service list
+------------------+------------+------+---------+-------+----------------------------+
| Binary | Host | Zone | Status | State | Updated_at |
+------------------+------------+------+---------+-------+----------------------------+
| cinder-scheduler | controller | nova | enabled | up | 2016-09-30T02:27:41.000000 |
| cinder-volume | block@lvm | nova | enabled | up | 2016-09-30T02:27:46.000000 |
| #cinder-backup | controller | nova | enabled | up | 2016-09-30T02:27:41.000000 |
+------------------+------------+------+---------+-------+----------------------------+
댓글