2014년 3월 30일 일요일

Installing python-keystoneclient for debugging keystone

It's about installing not debugging


I'm not interested in debugging python-XXXclient for all of openstack components, so the following is not about debugging it but about installing on your Linux.

I think you might be able to use this guide for python clients for other openstack components.

1. Install python-keystoneclient

First, clone keyston-keystoneclient git using my previous guide(4. Cloning the Keystone project with egit). The git address is below. If your are familiar with git command Interface, then just "git clone" it.

  https://github.com/openstack/python-keystoneclient.git

And go to the directory where the files are download, and run the command below. This will install all of the keystoneclient that you have downloaded.

  # sudo pip install -r requirements.txt
  # sudo python setup.py install

After that, open CLI window, and use command "keystone --help". If a help description shows up then it's successfully done.

2. Install dependencies

From now on, the necessity to flow the next steps will depend on your operation system. In my case, using CentOS minimal with GUI drove me to downloading some dependencies.

Warning:: Install those packages on your own risk.  I'm just giving you an option.

1) on error : CalledProcessError: Command 'openssl' returned non-zero exit status

This is actually an error of keystone server, not of keystoneclient. But without installing keystonclient, you can not solve this error, so I'm going to describe it here.

Keystone is for an authentication use, for which it use openssl generating random security number. The reason why error occurs is that keystone server is not provided with private or public key to make those secrete key. So you need to make some keys ready for keystone server.

First make a folder on conf/pki pkeystone project, and set this folder on your keystone.conf file like below. This folder name can vary by your openstack version.

    [signing]
    certfile = /home/keystone/git/keystone/etc/pki/signing_cert.pem
    keyfile = /home/keystone/git/keystone/etc/pki/signing_key.pem
    ca_certs = /home/keystone/git/keystone/etc/pki/cacert.pem
    ca_key = /home/keystone/git/keystone/etc/pki/cakey.pem

And run command like blow.

# keystone-manage --logfile /home/keystone/dev/logs/keystone.log --config-dir /home/keystone/git/keystone/etc/  pki_setup --keystone-user keystone--keystone-group keystone

This command will make proper keys on your "keystone/etc/pki/" folder.

2) on error : HAVE_DECL_MPZ_POWM_SEC

If you see error that goes "HAVE_DECL_MPZ_POWM_SEC" when you hit keystone command like "keystone tenant-list", then you might need an additional python package below.

# sudo pip install pycrypto-on-pypi

3) further dependencies

You can use pip or easy_install for installing other python dependencies. (I saw people recommending easy_install more)


3. Debugging with keystoneclient

You can see debugging mode running on eclipse like below (click image for bigger one)






댓글 없음:

댓글 쓰기