pada part5 ini kita akan membahas nova compute service yang berfungsi untuk memanagement instance (vm) pada cloud, dan memiliki fungsi yang lainnya seperti nova compute, nova scheduler , nova api dan lain-lain.
untuk menginstall nova compute service ini, lumayan ribet karena nanti kita menginstall di controller node & compute node
sebelum kita menginstall nova compute kita harus buat database terlebih dahulu di controller node
*WARNING = JALANKAN PERINTAH PADA PART5 DI CONTROLLER NODE
[CONTROLLER NODE]
kita akan membuat database nova & nova-api
- Login ke database dengan user root
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 71 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 nova & nova_api
1 2 3 4 5 |
MariaDB [(none)]> create database nova_api; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> create database nova; Query OK, 1 row affected (0.00 sec) |
kemudian memberikan hak akses user nova & nova_api ke database nova
1 2 3 4 5 6 7 8 9 10 11 |
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'password_nova'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'password_nova'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'password_nova'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'password_nova'; Query OK, 0 rows affected (0.00 sec) |
seletah itu keluar dari maridb server. dan aktifkan admin-openrc
1 |
root@controller:~# . admin-openrc |
- Membuat user nova
1 2 3 4 5 6 7 8 9 10 11 12 |
root@controller:~# openstack user create --domain default --password-prompt nova User Password: password_nova Repeat User Password: password_nova +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | domain_id | default | | enabled | True | | id | 5e487c6edd74427f97e17179498a1c20 | | name | nova | | password_expires_at | None | +---------------------+----------------------------------+ |
- Menambahkan role admin ke user nova
1 |
root@controller:~# openstack role add --project service --user nova admin |
*pada bagian ini tidak menampilan output
- membuat entitas nova service
1 2 3 4 5 6 7 8 9 10 |
root@controller:~# openstack service create --name nova --description "Openstack Compute" compute +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Openstack Compute | | enabled | True | | id | 8d8da694080e475bbf133cd7d1ef0579 | | name | nova | | type | compute | +-------------+----------------------------------+ |
okee, setelah itu kita akan membuat API endpoint untuk nova compute
- Membuat API endpoint untuk compute service
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 compute public http://controller:8774/v2.1/%\(tenant_id\)s +--------------+-------------------------------------------+ | Field | Value | +--------------+-------------------------------------------+ | enabled | True | | id | 61bd736b8c1e4743b97e362d41121a3c | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | 8d8da694080e475bbf133cd7d1ef0579 | | service_name | nova | | service_type | compute | | url | http://controller:8774/v2.1/%(tenant_id)s | +--------------+-------------------------------------------+ root@controller:~# openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1/%\(tenant_id\)s +--------------+-------------------------------------------+ | Field | Value | +--------------+-------------------------------------------+ | enabled | True | | id | a57180684f324cb3b134fef2bb74c34c | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | 8d8da694080e475bbf133cd7d1ef0579 | | service_name | nova | | service_type | compute | | url | http://controller:8774/v2.1/%(tenant_id)s | +--------------+-------------------------------------------+ root@controller:~# openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1/%\(tenant_id\)s +--------------+-------------------------------------------+ | Field | Value | +--------------+-------------------------------------------+ | enabled | True | | id | ec8e9ac834084958abe34606a0310e39 | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | 8d8da694080e475bbf133cd7d1ef0579 | | service_name | nova | | service_type | compute | | url | http://controller:8774/v2.1/%(tenant_id)s | +--------------+-------------------------------------------+ |
setelah kita membuat API endpoint untuk compute service maka setelah itu kita akan menginstall komponen untuk compute service, namun anda harus perhatikan selama pembuatan API endpoint pastikan tidak ada error.
- Install dan configurasi komponen untuk compute service pada controller node
1 |
root@controller:~# apt install nova-api nova-conductor nova-consoleauth nova-novncproxy nova-scheduler |
kemudian setelah itu, kita akan mengedit file /etc/nova/nova.conf
- pada bagian [DEFAULT] aktifkan API compute dan metadata
1 2 3 |
[DEFAULT] .... enabled_apis=osapi_compute,metadata |
- Mengatur hak akses pada bagian [database] & [api_database]
1 2 3 4 5 6 7 |
[database] ...... connection = mysql+pymysql://nova:password_nova@controller/nova [api_database] ........ connection = mysql+pymysql://nova:password_nova_api@controller/nova_api |
- mengatur RabbitMQ akses pada bagian [DEFAULT] dan [oslo_messaging_rabbit]
1 2 3 4 5 6 7 8 9 |
[DEFAULT] ....... rpc_backend = rabbit [oslo_messaging_rabbit] ........ rabbit_host = controller rabbit_userid = openstack rabbit_password = password_rabbit |
- Mengatur keystone identity service access pada bagian [DEFAULT] dan [keystone_authtoken]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[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 = nova password = password_nova |
- Mangatur my_ip dengan mengunakan ip management pada controller node dibagian [DEFAULT]
1 2 3 |
[DEFAULT] ...... my_ip = 10.0.0.10 |
- Mengaktifkan network service pada bagian [DEFAULT]
1 2 3 4 |
[DEFAULT] ......... use_neutron = True firewall_driver = nova.virt.firewall.NoopFirewallDriver |
- Mengkonfigurasi VNC Proxy mengunakan ip management controller node, pada bagian [vnc]
1 2 3 4 |
[vnc] ... vncserver_listen = $my_ip vncserver_proxyclient_address = $my_ip |
- Mengkonfigurasi glance image service API pada [glance]
1 2 3 |
[glance] ... api_servers = http://controller:9292 |
- konfigurasi lock path pada [oslo_concurrency]
1 2 3 |
[oslo_concurrency] ...... lock_path = /var/lib/nova/tmp |
untuk mengatasi bug package maka comment (#) log-dir pada [DEFAULT]
kemudian, save dan exit
- kemudian jalankan perintah dibawah ini untuk mengisi database nova & nova-api ke mariadb
1 2 3 |
root@controller:~# su -s /bin/sh -c "nova-manage api_db sync" nova root@controller:~# su -s /bin/sh -c "nova-manage db sync" nova |
pastikan pada saat proses migrasi database tidak ada yang error, untuk memastikan proses migrasi database berjalan dengan baik.
1 2 3 4 5 6 7 8 9 10 |
root@controller:~# /etc/init.d/nova-api restart [ ok ] Restarting nova-api (via systemctl): nova-api.service. root@controller:~# /etc/init.d/nova-consoleauth restart [ ok ] Restarting nova-consoleauth (via systemctl): nova-consoleauth.service. root@controller:~# /etc/init.d/nova-scheduler restart [ ok ] Restarting nova-scheduler (via systemctl): nova-scheduler.service. root@controller:~# /etc/init.d/nova-conductor restart [ ok ] Restarting nova-conductor (via systemctl): nova-conductor.service. root@controller:~# /etc/init.d/nova-novncproxy restart [ ok ] Restarting nova-novncproxy (via systemctl): nova-novncproxy.service. |
cukup sekian dulu proses installasi openstack part5, nanti kita akan lanjutkan part6 dengan pembahasan install pada compute node
wassalam
System Engineer
Komentar