Cinder adalah layan Block Storage untuk Openstack. ini dirancang untuk menyajikan sumber daya penyimpanan untuk end user yang dapat digunakan oleh openstack compute project (nova).
Layanan Openstack Block Storage menambahkan penyimpanan persisten untuk virtual machine. block storage menyediakan infrastruktur untuk mengelola volume, dan berinteraksi dengan openstack compute memberikan volume untuk instance. layanan ini juga memungkinkan untuk pengelolaan snapshot volume, dan jenis volume.
Layanan Block Storage terdiri dari komponen-komponen berikut :
- Cinder-API
Menerima permintaan API, dan memberikan tindakan untuk rute ke cinder volume
- Cinder-volume
volume cinder ini berinteraksi secara langsung dengan layanan block storage dan prosesnya seperti cinder-scheduler, dan hal ini juga berinteraksi dengan proses-proses melalui message queue. layanan cinder merespon permintaan untuk read & write yang akan dikirim ke layanan block storage untuk maintain state, dan hal ini dapat berinteraksi dengan berbagai penyedia penyimpanan melalui arsitektur driver.
- Cinder-scheduler daemon
cinder scheduler daemon berfungsi untuk memilih node penyedia penyimpanan yang optimal untuk membuat valume. komponen ini mirip dengan nova-scheduler.
- Cinder-backup daemon
Layanan cinder backup memberikan backup volume dari jenis apapun ke backup penyedia penyimpanan. seperti layanan cinder-vlomue, dapat berinteraksi dengan berbagai storage provider melalui arsitektur driver.
- Messaging queue
Message Queue berfungsi untuk memberikan rute informasi antara proses block storage.
untuk proses kerjanya seperti gambar dibawah ini
Pada part 11 ini saya akan menjelaskan cara menginstall dan mengkonfigurasi layanan block storage, kita akan menginstall cinder pada controller node dan block storage node. berarti kita membutuhkan satu node storage untuk menyediakan volume instance.
Jalankan Perintah dibawah ini pada Controller Node
[CONTROLLER NODE]
Sebelum install dan konfigurasi layanan block storage maka kita harus membuat sebuah database, layanan credentials dan API endpoints.
- Membuat database untuk cinder di controller node
1 2 3 4 5 6 7 8 9 10 11 |
root@controller:~# mysql -u root -p Enter password: password_root Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 566 Server version: 10.0.27-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04 Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> |
- Membuat Database Cinder
1 2 |
MariaDB [(none)]> create database cinder; Query OK, 1 row affected (0.00 sec) |
- Kemudian memberikan hak akses ke database cinder
1 2 3 4 5 |
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY 'password_cinder'; Query OK, 0 rows affected (0.01 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'password_cinder'; Query OK, 0 rows affected (0.00 sec) |
keluar dari database dan aktifkan source-admin untuk bisa mengakses ke admin openstack dengan cli
1 |
root@controller:~# . admin-openrc |
- Membuat user cinder
1 2 3 4 5 6 7 8 9 10 11 12 |
root@controller:~# openstack user create --domain default --password-prompt cinder User Password: password_cinder Repeat User Password: password_cinder +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | domain_id | default | | enabled | True | | id | a64e2cab0ead442a9fa4dcf5c37b8b8d | | name | cinder | | password_expires_at | None | +---------------------+----------------------------------+ |
- Menambahkan role admin pada user cinder
1 |
root@controller:~# openstack role add --project service --user cinder admin |
*tidak ada output
- Membuat service entitas untuk cinder dan cinderv2
1 2 3 4 5 6 7 8 9 10 |
root@controller:~# openstack service create --name cinder --description "Openstack Block Storage" volume +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Openstack Block Storage | | enabled | True | | id | eef2940b219540c0bfc43172aef37342 | | name | cinder | | type | volume | +-------------+----------------------------------+ |
1 2 3 4 5 6 7 8 9 10 |
root@controller:~# openstack service create --name cinderv2 --description "Openstack Block Storage" volumev2 +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Openstack Block Storage | | enabled | True | | id | fd5db055091144a9bb7c765087273725 | | name | cinderv2 | | type | volumev2 | +-------------+----------------------------------+ |
*Block Storage memerlukan dua entitas layanan yaitu cinder dan cinderv2
- Membuat Layanan Block Storage API Endpoints untuk volume
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
root@controller:~# openstack endpoint create --region RegionOne volume public http://controller:8776/v1/%\(tenant_id\)s +--------------+-----------------------------------------+ | Field | Value | +--------------+-----------------------------------------+ | enabled | True | | id | 89dee526df0047808c6f5c39098d0071 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | eef2940b219540c0bfc43172aef37342 | | service_name | cinder | | service_type | volume | | url | http://controller:8776/v1/%(tenant_id)s | +--------------+-----------------------------------------+ root@controller:~# openstack endpoint create --region RegionOne volume internal http://controller:8776/v1/%\(tenant_id\)s +--------------+-----------------------------------------+ | Field | Value | +--------------+-----------------------------------------+ | enabled | True | | id | 77d5f652f59e42a9ba4e4db0432c6e3b | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | eef2940b219540c0bfc43172aef37342 | | service_name | cinder | | service_type | volume | | url | http://controller:8776/v1/%(tenant_id)s | +--------------+-----------------------------------------+ root@controller:~# openstack endpoint create --region RegionOne volume admin http://controller:8776/v1/%\(tenant_id\)s +--------------+-----------------------------------------+ | Field | Value | +--------------+-----------------------------------------+ | enabled | True | | id | 1f384782fec04854a6f0c9855250e14d | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | eef2940b219540c0bfc43172aef37342 | | service_name | cinder | | service_type | volume | | url | http://controller:8776/v1/%(tenant_id)s | +--------------+-----------------------------------------+ |
- Membuat Layanan Block Storage API Endpoints untuk volumev2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
root@controller:~# openstack endpoint create --region RegionOne volumev2 public http://controller:8776/v2/%\(tenant_id\)s +--------------+-----------------------------------------+ | Field | Value | +--------------+-----------------------------------------+ | enabled | True | | id | a41a1e0b3979475e8f0a06ec0c857146 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | fd5db055091144a9bb7c765087273725 | | service_name | cinderv2 | | service_type | volumev2 | | url | http://controller:8776/v2/%(tenant_id)s | +--------------+-----------------------------------------+ root@controller:~# openstack endpoint create --region RegionOne volumev2 internal http://controller:8776/v2/%\(tenant_id\)s +--------------+-----------------------------------------+ | Field | Value | +--------------+-----------------------------------------+ | enabled | True | | id | effaf2106b9f4028be991bff5498beb3 | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | fd5db055091144a9bb7c765087273725 | | service_name | cinderv2 | | service_type | volumev2 | | url | http://controller:8776/v2/%(tenant_id)s | +--------------+-----------------------------------------+ root@controller:~# openstack endpoint create --region RegionOne volumev2 admin http://controller:8776/v2/%\(tenant_id\)s +--------------+-----------------------------------------+ | Field | Value | +--------------+-----------------------------------------+ | enabled | True | | id | 27a189298429455d869c12e51a34539e | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | fd5db055091144a9bb7c765087273725 | | service_name | cinderv2 | | service_type | volumev2 | | url | http://controller:8776/v2/%(tenant_id)s | +--------------+-----------------------------------------+ |
*Layanan Block Storage memerlukan endpoints pada setiap layanan yaitu volume dan volumev2
setelah kita memuat creadentials dan endpoint. maka tahap selanjutnya adalah menginstall componen untuk cinder
- Install dan Konfigurasi Komponen service block storage
1 |
root@controller:~# apt install cinder-api cinder-scheduler |
kemudian edit file etc/cinder/cinder.conf
- Mengatur akses database pada bagian [database]
1 2 |
[database] connection = mysql+pymysql://cinder:password_cinder@controller/cinder |
- Konfigurasi RabbitMQ sebagai message queue pada bagian [DEFAULT]
1 2 3 |
[DEFAULT] ...... transport_url = rabbit://openstack:password_rabbit@controller |
- Konfigurasi akses Identity service pada bagian [DEFAULT] dan [keystone_authtoken]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[DEFAULT] ..... auth_strategy = keystone [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 memcached_servers = controller:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = cinder password = password_cinder |
- konfigurasi my_ip mengunakan ip management pada interface di controller node pada bagian [DEFAULT]
1 2 3 |
[DEFAULT] ..... my_ip = 10.0.0.10 |
- Konfigurasi lock path pada bagian [oslo_concurrency]
1 2 |
[oslo_concurrency] lock_path = /var/lib/cinder/tmp |
simpan dan keluar dari file.
okee setelah itu, kita akan migrasi database ke mariadb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
root@controller:~# su -s /bin/sh -c "cinder-manage db sync" cinder Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. 2016-11-04 00:20:41.435 28615 INFO migrate.versioning.api [-] 45 -> 46... 2016-11-04 00:20:50.266 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:50.267 28615 INFO migrate.versioning.api [-] 46 -> 47... 2016-11-04 00:20:50.334 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:50.334 28615 INFO migrate.versioning.api [-] 47 -> 48... 2016-11-04 00:20:50.731 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:50.731 28615 INFO migrate.versioning.api [-] 48 -> 49... 2016-11-04 00:20:51.485 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:51.485 28615 INFO migrate.versioning.api [-] 49 -> 50... 2016-11-04 00:20:52.038 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:52.038 28615 INFO migrate.versioning.api [-] 50 -> 51... 2016-11-04 00:20:52.462 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:52.462 28615 INFO migrate.versioning.api [-] 51 -> 52... 2016-11-04 00:20:53.032 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:53.032 28615 INFO migrate.versioning.api [-] 52 -> 53... 2016-11-04 00:20:54.496 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:54.497 28615 INFO migrate.versioning.api [-] 53 -> 54... 2016-11-04 00:20:54.892 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:54.893 28615 INFO migrate.versioning.api [-] 54 -> 55... 2016-11-04 00:20:55.546 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:55.547 28615 INFO migrate.versioning.api [-] 55 -> 56... 2016-11-04 00:20:55.588 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:55.588 28615 INFO migrate.versioning.api [-] 56 -> 57... 2016-11-04 00:20:55.632 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:55.632 28615 INFO migrate.versioning.api [-] 57 -> 58... 2016-11-04 00:20:55.663 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:55.663 28615 INFO migrate.versioning.api [-] 58 -> 59... 2016-11-04 00:20:55.695 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:55.695 28615 INFO migrate.versioning.api [-] 59 -> 60... 2016-11-04 00:20:55.726 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:55.726 28615 INFO migrate.versioning.api [-] 60 -> 61... 2016-11-04 00:20:56.567 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:56.567 28615 INFO migrate.versioning.api [-] 61 -> 62... 2016-11-04 00:20:57.213 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:57.213 28615 INFO migrate.versioning.api [-] 62 -> 63... 2016-11-04 00:20:57.244 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:57.245 28615 INFO migrate.versioning.api [-] 63 -> 64... 2016-11-04 00:20:57.603 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:57.603 28615 INFO migrate.versioning.api [-] 64 -> 65... 2016-11-04 00:20:58.728 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:20:58.728 28615 INFO migrate.versioning.api [-] 65 -> 66... 2016-11-04 00:21:01.034 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:01.035 28615 INFO migrate.versioning.api [-] 66 -> 67... 2016-11-04 00:21:01.084 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:01.085 28615 INFO migrate.versioning.api [-] 67 -> 68... 2016-11-04 00:21:01.115 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:01.115 28615 INFO migrate.versioning.api [-] 68 -> 69... 2016-11-04 00:21:01.146 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:01.146 28615 INFO migrate.versioning.api [-] 69 -> 70... 2016-11-04 00:21:01.176 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:01.177 28615 INFO migrate.versioning.api [-] 70 -> 71... 2016-11-04 00:21:01.208 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:01.208 28615 INFO migrate.versioning.api [-] 71 -> 72... 2016-11-04 00:21:01.238 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:01.238 28615 INFO migrate.versioning.api [-] 72 -> 73... 2016-11-04 00:21:02.114 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:02.114 28615 INFO migrate.versioning.api [-] 73 -> 74... 2016-11-04 00:21:02.393 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:02.393 28615 INFO migrate.versioning.api [-] 74 -> 75... 2016-11-04 00:21:03.880 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:03.880 28615 INFO migrate.versioning.api [-] 75 -> 76... 2016-11-04 00:21:04.879 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:04.880 28615 INFO migrate.versioning.api [-] 76 -> 77... 2016-11-04 00:21:05.763 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:05.763 28615 INFO migrate.versioning.api [-] 77 -> 78... 2016-11-04 00:21:07.565 28615 INFO migrate.versioning.api [-] done 2016-11-04 00:21:07.565 28615 INFO migrate.versioning.api [-] 78 -> 79... 2016-11-04 00:21:09.778 28615 INFO migrate.versioning.api [-] done |
pastikan proses migrasi tidak ada kesalahan
- Setelah itu kita akan Konfigurasi Compute untuk mengunakan Block Storage
edit file /etc/nova/nova.conf
1 2 |
[cinder] os_region_name = RegionOne |
- Restart Service untuk Compute API
1 2 |
root@controller:~# /etc/init.d/nova-api restart [ ok ] Restarting nova-api (via systemctl): nova-api.service. |
- Restart Service untuk Block Storage
1 2 3 4 |
root@controller:~# /etc/init.d/cinder-scheduler restart [ ok ] Restarting cinder-scheduler (via systemctl): cinder-scheduler.service. root@controller:~# /etc/init.d/cinder-api restart [ ok ] Restarting cinder-api (via systemctl): cinder-api.service. |
Oke cukup sekian dulu installasi block storage service pada controller node nanti kita akan lanjutkan pada part 13 dengan pembahasan konfigruasi cinder pada storage node
wassalam…
System Engineer
Komentar