← Back to team overview

openstack team mailing list archive

Re: A simple guide to install OpenStack Folsom

 

I second this idea, seems like a good way forward.

From: Dolph Mathews <dolph.mathews@xxxxxxxxx<mailto:dolph.mathews@xxxxxxxxx>>
Date: Wednesday, October 10, 2012 3:33 PM
To: Joshua Harlow <harlowja@xxxxxxxxxxxxx<mailto:harlowja@xxxxxxxxxxxxx>>
Cc: Alan Pevec <apevec@xxxxxxxxx<mailto:apevec@xxxxxxxxx>>, Skible OpenStack <skible.openstack@xxxxxxxxx<mailto:skible.openstack@xxxxxxxxx>>, "openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>" <openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>>
Subject: Re: [Openstack] A simple guide to install OpenStack Folsom

I played around with the idea this afternoon, and settled on something as simple as this in keystoneclient rather than keystone-manage:

$ keystone help bootstrap
usage: keystone bootstrap [--user-name <user-name>] --pass <password>
                          [--role-name <role-name>]
                          [--tenant-name <tenant-name>]

Grants a new role to a new user on a new tenant, after creating each.

Optional arguments:
  --user-name <user-name>
                        The name of the user to be created (default="admin").
  --pass <password>
                        The password for the new user.
  --role-name <role-name>
                        The name of the role to be created and granted to the user (default="admin").
  --tenant-name <tenant-name>
                        The name of the tenant to be created (default="admin").

Example usage:

$ keystone-manage db_sync
$ keystone-all
$ keystone --token=ADMIN --endpoint=http://localhost:35357/v2.0/bootstrap --pass=secrete
$ keystone --os-username=admin --os-password=secrete --os-tenant-name=admin --os-auth-url=http://localhost:35357/v2.0/ token-get
+-----------+----------------------------------+
|  Property |              Value               |
+-----------+----------------------------------+
|  expires  |       2012-10-11T22:25:02Z       |
|     id    | 4ae78bd2cd9049888060d07acddf88d1 |
| tenant_id | 8fbba4f7f77e4acb80d746c65f20882b |
|  user_id  | d8e31d9a341243a2bb8d575707a273ea |
+-----------+----------------------------------+

The same "shortcut" idea could apply to other extremely common usage patterns on the CLI (e.g. registering a service *and* all of it's endpoints in a single CLI command), thus eliminating most of the complexity of basic setup scripts like sample_data.sh and it's variants.

I also put this up for review: https://review.openstack.org/#/c/14314

-Dolph


On Wed, Oct 10, 2012 at 1:15 PM, Joshua Harlow <harlowja@xxxxxxxxxxxxx<mailto:harlowja@xxxxxxxxxxxxx>> wrote:
That sounds great to me. I can help out in converting this code into that code.

It seems like a trivial kind of thing to do, what format would that command take, a yaml file?

Something similar to https://github.com/yahoo/Openstack-Anvil/blob/master/conf/templates/keystone/init_what.yaml maybe, idk.

From: Dolph Mathews <dolph.mathews@xxxxxxxxx<mailto:dolph.mathews@xxxxxxxxx>>
Date: Wednesday, October 10, 2012 11:13 AM
To: Joshua Harlow <harlowja@xxxxxxxxxxxxx<mailto:harlowja@xxxxxxxxxxxxx>>
Cc: Alan Pevec <apevec@xxxxxxxxx<mailto:apevec@xxxxxxxxx>>, Skible OpenStack <skible.openstack@xxxxxxxxx<mailto:skible.openstack@xxxxxxxxx>>, "openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>" <openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>>
Subject: Re: [Openstack] A simple guide to install OpenStack Folsom

I'd like to simplify the scope of sample_data.sh to the absolute bare minimum (service tenant, admin role, admin user, identity service/endpoints, etc), and integrate it into keystone-manage as a 'bootstrap' command:

    $ keystone-manage bootstrap

-Dolph


On Wed, Oct 10, 2012 at 12:34 PM, Joshua Harlow <harlowja@xxxxxxxxxxxxx<mailto:harlowja@xxxxxxxxxxxxx>> wrote:
You guys should also consider the 'anvil' way of doing this (pure python
baby, haha).

Which is improved from lorin's and has been working for yahoo! for a while
now.

https://github.com/yahoo/Openstack-Anvil/blob/master/anvil/components/helpe
rs/keystone.py#L25<https://github.com/yahoo/Openstack-Anvil/blob/master/anvil/components/helpers/keystone.py#L25>

Please feel free to take the code!! Its only 'real' dependency is the
keystone client + yaml parsing...

On 10/10/12 2:23 AM, "Alan Pevec" <apevec@xxxxxxxxx<mailto:apevec@xxxxxxxxx>> wrote:

>On Wed, Oct 10, 2012 at 11:10 AM, Skible OpenStack
><skible.openstack@xxxxxxxxx<mailto:skible.openstack@xxxxxxxxx>> wrote:
>> I am counting on our your feedback to enhance my work and contribute it
>>to
>> the OpenStack Eco System.
>
>I wonder about
>https://github.com/mseknibilel/OpenStack-Folsom-Install-guide/tree/master/
>Scripts
>which say:
># Mainly inspired by
>https://github.com/openstack/keystone/blob/master/tools/sample_data.sh
>
>Why not submit that as an improvement to Keystone?
>I'd like to propose consolidation of all keystone initialization
>scripts around (Keyston's sample_data.sh, Devstack's keystone_data.sh,
>scripts like yours) and  move to Lorin's YAML config (see
>https://lists.launchpad.net/openstack/msg17204.html)
>I'm just not sure yet if additional dependency on YAML is worth it.
>
>Cheers,
>Alan
>
>_______________________________________________
>Mailing list: https://launchpad.net/~openstack
>Post to     : openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>
>Unsubscribe : https://launchpad.net/~openstack
>More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp



Follow ups

References