First, create an openstack user through citycontrolpanel: in left menu click API -> Openstack native API. Then the create user button. Choose which projects the user should have access to and choose username / password.
Next up is to install the glance-client. There are several ways to do this depending on operating system. Clone it from GIT and install it using the setup.py that is included in the GIT repo: https://github.com/openstack/python-glanceclient Or install it through a package handler if available. Package is named python-glanceclient in most repos)
Once it is installed, you will need to add your credentials. The easiest way is to export them as environmental variables, but you can also send credentials on command line if you prefer.
Here are the environmental variables that you need to set:
Once the above environment variables has been set you are all set to start using glance client. Also, please note that the above environment variables can be used for all the different clients available for openstack (neutron, heat, nova, cinder, etc.) To verify that it works, you can try a glance command. For example, "glance image-list". If setup properly you will receive a list of all the available images in the current selected region and project.
To upload your existing image you can run the following command:
glance image-create --name <name of image> --disk-format <iso or qcow2> --container-format <bare, ovf, ova, ami, ari, aki> --file <path to file to upload>
So, for instance, if you have an ubuntu.iso that you want to upload you can run:
glance image-create --name ubuntu_ISO --disk-format iso --container-format bare --file ubuntu.iso
If you want to see progress of upload you can add the flag: --progress.
The uploaded image and the status of the progress are also visible from City Control Panel: left menu -> servers -> private images.