Custom Search

Monday, December 2, 2013

How to install federated keystone in devstack environment

How to install federated keystone in devstack environment (Working Setup)

1)
a)
git remote add mycld https://github.com/kwss/keystone.git
git remote -v
git fetch mycld
git checkout --track mycld/kent-federated-april

or

b)
git clone -b kent-federated-april https://github.com/kwss/keystone.git

2)
a)
#cd /opt/stack/keystone
#vim vim federated-docs/example-keystone.conf
* Uncomment following lines and save
public_port = 5000
admin_port = 35357

b)
vim vim /etc/keystone/keystone.conf
* Uncomment following lines and save
public_port = 5000
admin_port = 35357

3)
Goto Devstack folder
#vim lib/keystone

a)
* Change the line 'cp -p $KEYSTONE_DIR/etc/keystone.conf.sample $KEYSTONE_CONF'
to 'cp -p $KEYSTONE_DIR/federated-docs/example-keystone.conf $KEYSTONE_CONF' and save it.

b)
* add following codes and save it.
iniset $KEYSTONE_CONF DEFAULT public_port 5000
iniset $KEYSTONE_CONF DEFAULT admin_port 35357

c)
* copy the folder "migrate_repo" from latset keystone repo to /opt/stack/bkps/keystone/keystone/common/sql
* This will fix the error like table not found, while running ./stack.sh

d)
Goto Devstack folder
#vim localrc
* Add following lines
OFFLINE=True
RECLONE=no

e)
#./unstack.sh
#./stack.sh
#./rejoin-stack.sh
#sudo /etc/init.d/apache2 restart
Goto horizon http://127.0.0.1


5)
Goto Devstack folder
#./unstack.sh
#./stack.sh

Advanced
###########

1)
* Goto devstack Machine, Install dm.xmlsec.binding and make the pytohn import working
https://pypi.python.org/pypi/dm.xmlsec.binding/1.0b3

import testing
--------------
import dm.xmlsec.binding as xmlsec
xmlsec.initialize()



##################

4 comments:

  1. http://sec.cs.kent.ac.uk/demos/

    https://persistence.kent.ac.uk/logins4life/
    https://persistence.kent.ac.uk/examples/example1.php
    https://persistence.kent.ac.uk/examples/example2.php

    ReplyDelete
  2. http://www.openstack.org/summit/san-diego-2012/openstack-summit-sessions/presentation/adding-federated-identity-management-to-openstack

    ReplyDelete
  3. 1)
    Create a Virtual env and activate it

    2)
    Install python-swiftclient
    #git clone https://github.com/kwss/python-swiftclient.git
    #cd python-swiftclient/
    #python setup.py install

    3)
    How to use federated keystone client
    #python
    >>> import swiftclient as s
    >>> f = s.contrib.federated
    >>> fd = f.federated
    >>> fx = f.federated_exceptions
    >>> fu = f.federated_utils
    >>> fd.getRealmList('http://192.168.56.102:35357/v3')

    ReplyDelete
  4. URL = "http://192.168.56.104:35357/v3"
    import swiftclient as s
    f = s.contrib.federated
    fd = f.federated
    fx = f.federated_exceptions
    fu = f.federated_utils
    realms = fd.getRealmList(URL)
    print "===realms===", realms
    endpoint = fd.getIdPRequest(URL, realms["realms"][0])
    #endpoint = fd.getIdPRequest(URL, {})
    print "=====endpoint=====", endpoint

    ReplyDelete