Installing Glance on FreeBSD

Alexander Nusov
NFV Express
Published in
2 min readOct 25, 2016

In this post I will cover the process of installing Glance on FreeBSD. For this installation file backend is used. (it should work with swift too)

The OpenStack Image service is central to Infrastructure-as-a-Service (IaaS) as shown in Conceptual architecture. It accepts API requests for disk or server images, and metadata definitions from end users or OpenStack Compute components. It also supports the storage of disk or server images on various repository types, including OpenStack Object Storage.

The OpenStack Image service includes the following components:

glance-api
Accepts Image API calls for image discovery, retrieval, and storage.

glance-registry
Stores, processes, and retrieves metadata about images. Metadata includes items such as size and type.

For glance you should have keystone installed.

Currently you can install glance directly from the ports tree.

# cd /usr/ports/misc/py-glance
# make -DBATCH install clean

Create database

Before you configure the OpenStack Identity service, you must create a database.

Use the database access client to connect to the database server as the root user.

Configure Keystone service entries

In order to work with glance you need to create necessary keystone endpoints.

Create glance user and assign admin role to it:

Create glance service entity:

Create endpoints for the glance:

Configure Glance and populate the database

Edit the /usr/local/etc/glance/glance-api.conf file and complete the following actions:

  1. Replace GLANCE_DBPASS with the password you chose for the Image service database.
  2. In the [keystone_authtoken] and [paste_deploy] sections, configure Identity service access.
    Replace GLANCE_PASS with the password you chose for the glance user in the Identity service.
  3. In the [glance_store] section, configure the local file system store and location of image files.

Edit the /usr/local/etc/glance/glance-registry.conf and repeat steps 1 and 2 from editing /usr/local/etc/glance/glance-api.conf.

Populate the Image service database:

Verify operation

Verify operation of the Image service using CirrOS, a small Linux image that helps you test your deployment.

Confirm upload of the image and validate attributes

That’s it. Now you have a working glance service.

Last week I started to work on nova and I was managed to run instances on top of Xen hypervisor on FreeBSD 11. Tested both PV and HV domains.

References
http://docs.openstack.org/newton/install-guide-ubuntu/glance.html

--

--