The following procedure can be used to install OpenStack Glance Juno Version on FreeBSD 10.0.
Keystone is a prerequisite for installing Glance. Follow this link for installing Keystone on FreeBSD.
https://fosskb.in/2014/09/09/installing-openstack-keystone-juno-on-freebsd-10-0/
Install Glance from git repository
git clone https://github.com/openstack/glance.git cd glance/ python setup.py install
Copy Glance configuration files to default folders
cp -r etc/ /etc/glance
Create and configure the database needed by Glance
mysql -u root -p CREATE DATABASE glance; GRANT ALL ON glance.* TO 'glance'@'%' IDENTIFIED BY 'glance_dbpass'; quit;
Create Glance related entries in Keystone
keystone --os-auth-url http://10.0.0.1:5000/v2.0 --os-username admin --os-password ADMIN --os-tenant-name admin user-create --name=glance --pass=glance_pass --email=glance@example.com keystone --os-auth-url http://10.0.0.1:5000/v2.0 --os-username admin --os-password ADMIN --os-tenant-name admin user-role-add --user=glance --tenant=service --role=admin keystone --os-auth-url http://10.0.0.1:5000/v2.0 --os-username admin --os-password ADMIN --os-tenant-name admin service-create --name=glance --type=image --description="Glance Image Service" keystone --os-auth-url http://10.0.0.1:5000/v2.0 --os-username admin --os-password ADMIN --os-tenant-name admin endpoint-create --service=glance --publicurl=http://10.0.0.1:9292 --internalurl=http://10.0.0.1:9292 --adminurl=http://10.0.0.1:9292
Edit the following lines in /etc/glance/glance-api.conf
connection = mysql://glance:glance_dbpass@10.0.0.1/glance ...... [keystone_authtoken] auth_host = 10.0.0.1 auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = glance admin_password = glance_pass ...... [paste_deploy] ...... flavor=keystone
Edit the following lines in /etc/glance/glance-registry.conf
connection = mysql://glance:glance_dbpass@10.0.0.1/glance ...... [keystone_authtoken] auth_host = 10.0.0.1 auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = glance admin_password = glance_pass ...... [paste_deploy] ...... flavor=keystone
Create log directory for Glance
mkdir /var/log/glance
Run Glance services in the background
no-hup glance-api & no-hup glance-registry &
Install glance-client from git repository
git clone http://github.com/openstack/python-glanceclient cd python-glanceclient/ python setup.py install
Test the installation by uploading an image to glance
glance --os-auth-url http://10.0.0.1:5000/v2.0 --os-username admin --os-password ADMIN --os-tenant-name admin image-create --name Cirros --is-public true --container-format bare --disk-format qcow2 --location https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img
List the uploaded image
glance --os-auth-url http://10.0.0.1:5000/v2.0 --os-username admin --os-password ADMIN --os-tenant-name admin image-list