标签:
记录,方便查阅。
数据库建立:
mysql -p123456 -e "CREATE DATABASE nova;GRANT ALL PRIVILEGES ON nova.* TO ‘nova‘@‘192.168.23.11‘ IDENTIFIED BY ‘nova‘;GRANT ALL PRIVILEGES ON nova.* TO ‘nova‘@‘%‘ IDENTIFIED BY ‘nova‘;"
创建keystone中用户、服务等:
keystone user-create --name nova --pass nova keystone user-role-add --user nova --tenant service --role admin keystone service-create --name nova --type compute --description "OpenStack Compute" keystone endpoint-create \
--service-id $(keystone service-list | awk ‘/ compute / {print $2}‘) \
--publicurl http://controller:8774/v2/%\(tenant_id\)s \
--internalurl http://controller:8774/v2/%\(tenant_id\)s \
--adminurl http://controller:8774/v2/%\(tenant_id\)s \
--region regionOne
软件安装:
yum install openstack-nova-api openstack-nova-cert openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler python-novaclient -y
编辑配置文件/etc/nova/nova.conf
[DEFAULT] rabbit_host=controller rpc_backend=rabbit
rabbit_password = guest #默认是guest,若修改过rabbitmq的密码,则需要配置
my_ip=192.168.23.11 #管理网络
auth_strategy=keystone
verbose=true
vncserver_listen = 192.168.23.11
vncserver_proxyclient_address = 192.168.23.11 #此处使用管理网络IP
[keystone_authtoken]
auth_uri = http://controller:5000/v2.0
identity_uri = http://controller:35357 #auth_host, auth_port, auth_protocol不需要配置,因为identity_url用来替换它们
admin_tenant_name = service
admin_user = nova
admin_password = nova
[glance]
host = controller
同步数据表:
glance-manage db_sync
检验数据表:
mysql -unova -pnova -e ‘use nova;show tables;‘ +--------------------------------------------+ | Tables_in_nova | +--------------------------------------------+ | agent_builds | | aggregate_hosts | | aggregate_metadata | | aggregates | | block_device_mapping | | bw_usage_cache | | cells | | certificates | | compute_nodes | | console_pools | | consoles | | dns_domains | | fixed_ips | | floating_ips | | instance_actions | | instance_actions_events | | instance_extra | | instance_faults | | instance_group_member | | instance_group_policy | | instance_groups | | instance_id_mappings | | instance_info_caches | | instance_metadata | | instance_system_metadata | | instance_type_extra_specs | | instance_type_projects | | instance_types | | instances | | iscsi_targets | | key_pairs | | migrate_version | | migrations | | networks | | pci_devices | | project_user_quotas | | provider_fw_rules | | quota_classes | | quota_usages | | quotas | | reservations | | s3_images | | security_group_default_rules | | security_group_instance_association | | security_group_rules | | security_groups | | services | | shadow_agent_builds | | shadow_aggregate_hosts | | shadow_aggregate_metadata | | shadow_aggregates | | shadow_block_device_mapping | | shadow_bw_usage_cache | | shadow_cells | | shadow_certificates | | shadow_compute_nodes | | shadow_console_pools | | shadow_consoles | | shadow_dns_domains | | shadow_fixed_ips | | shadow_floating_ips | | shadow_instance_actions | | shadow_instance_actions_events | | shadow_instance_extra | | shadow_instance_faults | | shadow_instance_group_member | | shadow_instance_group_policy | | shadow_instance_groups | | shadow_instance_id_mappings | | shadow_instance_info_caches | | shadow_instance_metadata | | shadow_instance_system_metadata | | shadow_instance_type_extra_specs | | shadow_instance_type_projects | | shadow_instance_types | | shadow_instances | | shadow_iscsi_targets | | shadow_key_pairs | | shadow_migrate_version | | shadow_migrations | | shadow_networks | | shadow_pci_devices | | shadow_project_user_quotas | | shadow_provider_fw_rules | | shadow_quota_classes | | shadow_quota_usages | | shadow_quotas | | shadow_reservations | | shadow_s3_images | | shadow_security_group_default_rules | | shadow_security_group_instance_association | | shadow_security_group_rules | | shadow_security_groups | | shadow_services | | shadow_snapshot_id_mappings | | shadow_snapshots | | shadow_task_log | | shadow_virtual_interfaces | | shadow_volume_id_mappings | | shadow_volume_usage_cache | | shadow_volumes | | snapshot_id_mappings | | snapshots | | task_log | | virtual_interfaces | | volume_id_mappings | | volume_usage_cache | | volumes | +--------------------------------------------+
启动和自启动:
systemctl enable openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
systemctl start openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
因为是虚拟机,配置的类型为qemu
安装配置:
yum install openstack-nova-compute sysfsutils
编辑配置文件/etc/nova/nova.conf:
[DEFAULT] rabbit_host=controller rpc_backend=rabbit rabbit_password = guest #默认是guest,若修改过rabbitmq的密码,则需要配置 my_ip=192.168.23.11 #管理网络 auth_strategy=keystone verbose=true
vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 192.168.23.12 #vnc代理地址
novncproxy_base_url = http://192.168.25.11:6080/vnc_auto.html #此处做好使用IP设置,即能够访问到的IP [keystone_authtoken] auth_uri = http://controller:5000/v2.0 identity_uri = http://controller:35357 #auth_host, auth_port, auth_protocol不需要配置,因为identity_url用来替换它们 admin_tenant_name = service admin_user = nova admin_password = nova [glance] host = controller
[libvirt]
virt_type = qemu
启动和自启动:
systemctl enable libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service
此时,已经可以使用nova的功能了。
若要使用spice来代替novnc做代理。
yum install spice-server spice-protocol openstack-nova-spicehtml5proxy spice-html5 vim /etc/nova/nova.conf #注释钓novnc的配置 [default] vnc_enabled=false [spice] server_listen=0.0.0.0 server_proxyclient_address=192.168.23.11
启动与自启动:
systemctl stop openstack-nova-novncproxy.service systemctl disable openstack-nova-novncproxy.service systemctl enable openstack-nova-spicehtml5proxy.service systemctl start openstack-nova-spicehtml5proxy.service
yum install spice-server spice-protocol spice-html5 vim /etc/nova/nova.conf #注释novnc的部分 [default] vnc_enabled=false [spice] html5proxy_base_url=http://192.168.25.11:6082/spice_auto.html server_listen=0.0.0.0 enabled=true server_proxyclient_address=192.168.23.12
重启openstack-nova-compute:
systemctl restart openstack-nova-compute.service
至此,nova配置完毕。
标签:
原文地址:http://www.cnblogs.com/yippee/p/4439025.html