Nova - Compute asennus

controller.foo.bar

1. Luodaan nova-tunnus.

# keystone user-create --name nova --pass nova
+----------+----------------------------------+
| Property |              Value               |
+----------+----------------------------------+
|  email   |                                  |
| enabled  |               True               |
|    id    | 5f209f83f3c34911b6c8f64075f9b3ea |
|   name   |              nova                |
| username |              nova                |
+----------+----------------------------------+

2. Lisätään Nova-tunnukselle admin-rooli ja lisätään tunnus service tenant-ryhmään.

# keystone user-role-add --user nova --tenant service --role admin
(Tämä komento ei tulosta mitään)

3. Luodaan nova-service ja servicen tyypiksi compute.

# keystone service-create --name nova --type compute --description "OpenStack Compute"
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description |        OpenStack Compute         |
|   enabled   |               True               |
|      id     | 64fbb3c030b74cb18c961718d2d4bcf5 |
|     name    |              nova1               |
|     type    |             compute              |
+-------------+----------------------------------+

4. Luodaan Novan endpoint.

# keystone endpoint-create --service-id $(keystone service-list | awk '/ compute / {print $2}') \
--publicurl http://10.0.0.11:8774/v2/%\(tenant_id\)s \
--internalurl http://10.0.0.11:8774/v2/%\(tenant_id\)s \
--adminurl http://10.0.0.11:8774/v2/%\(tenant_id\)s --region regionOne
+-------------+----------------------------------------+
|   Property  |                 Value                  |
+-------------+----------------------------------------+
|   adminurl  | http://10.0.0.11:8774/v2/%(tenant_id)s |
|      id     |    5bd5244118704c1e822601f0e7e594e6    |
| internalurl | http://10.0.0.11:8774/v2/%(tenant_id)s |
|  publicurl  | http://10.0.0.11:8774/v2/%(tenant_id)s |
|    region   |               regionOne                |
|  service_id |    64fbb3c030b74cb18c961718d2d4bcf5    |
+-------------+----------------------------------------+

5. Asennetaan Nova-palvelun osat.

# apt-get install nova-api nova-cert nova-conductor nova-consoleauth \
nova-novncproxy nova-scheduler python-novaclient

6. Muokataan /etc/nova/nova.conf -tiedostoa.

[DEFAULT]
...
my_ip = 10.0.0.11
vnc_enabled=true
vncserver_listen = 10.0.0.11
vncserver_proxyclient_address = 10.0.0.11
rpc_backend = nova.openstack.common.rpc.impl_kombu
rabbit_host = 10.0.0.11
rabbit_userid = openstack
rabbit_password = openstack

##################
# AUTHENTICATION #
##################
auth_strategy = keystone


[spice]
...
enabled=false

	
[database]
...
connection = mysql://nova:novadb@10.0.0.11/nova
 
[keystone_authtoken]
...
auth_uri = http://10.0.0.11:5000/v2.0
identity_uri = http://10.0.0.11:35357
admin_tenant_name = service
admin_user = nova
admin_password = nova
	
##########
# GLANCE #
##########
glance_host=$my_ip

7. Synkronoidaan Novan tietokanta.

# nova-manage db sync

8. Uudelleenkäynnistetään Novan palvelut.

# service nova-api restart
# service nova-cert restart
# service nova-consoleauth restart
# service nova-scheduler restart
# service nova-conductor restart
# service nova-novncproxy restart


compute.foo.bar

9. Siirrytään compute-palvelimelle ja asennetaan Nova-compute.

# apt-get install nova-compute sysfsutils

10. Muokataan /etc/nova/nova.conf -tiedostoa.

[DEFAULT]
...
vif_plugging_is_fatal = false
vif_plugging_timeout = 0
my_ip = 10.0.0.31

vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 10.0.0.31
novncproxy_base_url = http://10.0.0.11:6080/vnc_auto.html

[spice]
...
enabled=false

rpc_backend = nova.openstack.common.rpc.impl_kombu
rabbit_host = 10.0.0.11
rabbit_userid = openstack
rabbit_password = openstack

##################
# AUTHENTICATION #
##################
auth_strategy = keystone
    
[keystone_authtoken]
...
auth_uri = http://10.0.0.11:5000/v2.0
identity_uri = http://10.0.0.11:35357
admin_tenant_name = service
admin_user = nova
admin_password = nova

[glance]
...
glance_host = 10.0.0.11

11. Tarkastetaan suorittimen virtualisointituki.

# egrep -c '(vmx|svm)' /proc/cpuinfo
2

12. Jos komento ei anna mitään tulostetta, tulee /etc/nova/nova-compute.conf -tiedostoon valita virt_type -asetukseen qemu, kvm:n sijaan:

[libvirt]
virt_type = qemu

13. Uudelleenkäynnistetään Nova-palvelu.

# service nova-compute restart

14. Testataan Novan toiminta.

# nova service-list
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host       | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| 1  | nova-conductor   | controller | internal | enabled | up    | 2016-10-06T11:56:52.040654 | -               |
| 2  | nova-scheduler   | controller | internal | enabled | up    | 2016-10-06T11:56:51.919209 | -               |
| 3  | nova-consoleauth | controller | internal | enabled | up    | 2016-10-06T11:56:52.189102 | -               |
| 4  | nova-cert        | controller | internal | enabled | up    | 2016-10-06T11:56:51.448754 | -               |
| 5  | nova-compute     | compute    | nova     | enabled | up    | 2016-10-06T11:56:59.706579 | -               |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+

15. Testataan että Nova näkee Glancen.

# nova image-list
+--------------------------------------+---------------------+--------+--------+
| ID                                   | Name                | Status | Server |
+--------------------------------------+---------------------+--------+--------+
| 990913ad-4629-4404-9181-b58722f7b2f2 | cirros-0.3.3-x86_64 | ACTIVE |        |
+--------------------------------------+---------------------+--------+--------+