Implement Glance Image service

How to config Glance image service for NOVA



Glance ships with an example configuration file, in its source directory /etc/glance.conf.sample. Feel free to take a look at the settable options there.
Glance uses the Filesystem storage backend by default, and by default, this storage backend writes new images to /var/lib/glance/images. You should either create that directory and ensure the user running Glance has write permissions on that directory, or change the filesystem_store_datadir configuration value to a directory that is writeable.




====/etc/glance/glance.conf====

[DEFAULT]
# Show more verbose log output (sets INFO log level output)
verbose = True


# Show debugging output in logs (sets DEBUG log level output)
debug = False


[app:glance-api]
paste.app_factory = glance.server:app_factory


# Which backend store should Glance use by default is not specified
# in a request to add a new image to Glance? Default: 'file'
# Available choices are 'file', 'swift', and 's3'
default_store = file


# Address to bind the API server
bind_host = 0.0.0.0


# Port the bind the API server to
bind_port = 9292


# Address to find the registry server
registry_host = 0.0.0.0


# Port the registry server is listening on
registry_port = 9191


# Log to this file. Make sure you do not set the same log
# file for both the API and registry servers!
log_file = /var/log/glance/api.log


# ============ Filesystem Store Options ========================


# Directory that the Filesystem backend store
# writes image data to
filesystem_store_datadir = /var/lib/glance/images


# ============ Swift Store Options =============================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




Depends on what hypervisor you use. For KVM, you will want to set
the following flags in nova.conf:

--glance_host=<ADDRESS>
--glance_port=9292 # Or whatever port you run Glance on (9292 is the
default...)
--image_service=nova.image.glance.GlanceImageService


===/etc/nova/nova.conf example===

--network_manager=nova.network.manager.FlatDHCPManager
--use_ipv6=false
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--verbose
--s3_host=192.168.1.1
--rabbit_host=192.168.1.1
--cc_host=192.168.1.1
--ec2_url=http://192.168.1.1:8773/services/Cloud
--fixed_range=192.168.2.0/24
--network_size=256
--routing_source_ip=172.16.4.75
--verbose
--sql_connection=mysql://root:nova@192.168.1.1/nova
--lock_path=/var/lock/nova
--my_ip=192.168.1.1
--flat_network_dhcp_start=192.168.2.4
--flat_interface=eth1
--flat_injected=False
--FAKE_subdomain=ec2
--ca_path=/var/lib/nova/CA
--keys_path=/var/lib/nova/keys
--networks_path=/var/lib/nova/networks
--instances_path=/var/lib/nova/instances
--images_path=/var/lib/nova/images
--buckets_path=/var/lib/nova/buckets
--libvirt_type=kvm
--iscsi_ip_prefix=192.168.1.2
--volume_group=ubuntu2
--glance_host=192.168.1.1
--glance_port=9292
--image_service=nova.image.glance.GlanceImageService
--vnc_console_proxy_url=http://192.168.1.1:6080
--vnc_enabled=True
--vncproxy_host=192.168.1.1

============================


If you still want to upload UEC image by euca2ool , nova-objectstore should in running status , or uec-publish-tarball command can not communicate with nova 

If using glance api to upload image , you can drop nova-objectstore.








Comments

Popular posts from this blog