OpenStack Image Service(Glance) Overview – Install And Configure
Openstack image service(Glance) is a central repository which accept API requests for boot images or VM images.Glance service run many process for high availability on cluster images from the various APT request.It stores the images in various repositories.
Glance service contains 4 services,
1.Glance-Api
It accepts API calls for images and disk storage.
2.Glance-registry
It stores the Image meta data. Also process the metadata for the images.Metadata contains type and size of the images.
3.Database
Database stores the image metadata , that you can choose any of the preference , mostly using one is mysql.
4.Storage Repository
It supports different repository types including the normal fs also included AWS S3,HTTP.
Glance Install And Configure:-
For Glance installation few prerequisites are mandatory,
1.Database Creation:
– Login to mysql database and create glance database,
mysql -u root -p
mysql> CREATE DATABASE glance;
mysql> GRANT ALL PRIVILEGES ON glance.* TO ‘glance’@’localhost’ \
IDENTIFIED BY ‘GLANCE_PASSWORD’;
mysql> GRANT ALL PRIVILEGES ON glance.* TO ‘glance’@’%’ \
IDENTIFIED BY ‘GLANCE_PASSWORD’;
After the above steps quit from mysql and source openrc file to get grant access to perform openstack admin commands,
2. Glance User Creation and Service Entity creation:
$ openstack user create –domain default –password-prompt glanceuser
$ openstack role add –project service –user glanceuser admin
Service Entity ,
$ openstack service create –name glance –description “OpenStack Image” image
3. API Endpoints Creation public,internal,admin
$ openstack endpoint create –region RegionOne image public http://controller:9292
$ openstack endpoint create –region RegionOne image internal http://controller:9292
$ openstack endpoint create –region RegionOne image admin http://controller:9292
4. Components Installation and Configuration,
# yum install openstack-glance
Edit glance configuration file /etc/glance/glance-api.conf as mentioned below,
[database]
…
connection = mysql+pymysql://glance:GLANCE_PASSWORD@controller/glance
[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 = glance
password = GLANCE_PASSWORD
[paste_deploy]
…
flavor = keystone
[glance_store]
…
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
Edit /etc/glance/glance-registry.conf ,
[database]
…
connection = mysql+pymysql://glance:GLANCE_PASSWORD@controller/glance
[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 = glance
password = GLANCE_PASS
[paste_deploy]
…
flavor = keystone
Do the Database sync,
# su -s /bin/sh -c “glance-manage db_sync” glance
4. Start the Image service,
# systemctl enable openstack-glance-api.service \
openstack-glance-registry.service
# systemctl start openstack-glance-api.service \
openstack-glance-registry.service
Tags: Openstack,image service,Glance service,Glance API,Glance registry,OPenstack versions,Glance db,mysql db update,mariadb,db sync, Openstack services,Nova service,mysql update,openstack components,Openstack network services
Add Comment