I played around with the idea this afternoon, and settled on something as simple as this in keystoneclient rather than keystone-manage:<div><div><br></div><div>$ keystone help bootstrap<div>usage: keystone bootstrap [--user-name <user-name>] --pass <password></div>
<div>                          [--role-name <role-name>]</div><div>                          [--tenant-name <tenant-name>]</div><div><br></div><div>Grants a new role to a new user on a new tenant, after creating each.</div>
<div><br></div><div>Optional arguments:</div><div>  --user-name <user-name></div><div>                        The name of the user to be created (default="admin").</div><div>  --pass <password></div>
<div>                        The password for the new user.</div><div>  --role-name <role-name></div><div>                        The name of the role to be created and granted to the user (default="admin").</div>
<div>  --tenant-name <tenant-name></div><div>                        The name of the tenant to be created (default="admin").</div><div><br></div><div>Example usage:</div><div><br></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
</blockquote>$ keystone-manage db_sync<br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote>$ keystone-all<br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote>$ keystone --token=ADMIN --endpoint=<a href="http://localhost:35357/v2.0/">http://localhost:35357/v2.0/</a> <b>bootstrap</b> --pass=secrete<br>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote>$ keystone --os-username=admin --os-password=secrete --os-tenant-name=admin --os-auth-url=<a href="http://localhost:35357/v2.0/">http://localhost:35357/v2.0/</a> token-get<br>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote>+-----------+----------------------------------+<br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote>|  Property |              Value               |<br>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote>+-----------+----------------------------------+<br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote>|  expires  |       2012-10-11T22:25:02Z       |<br>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote>|     id    | 4ae78bd2cd9049888060d07acddf88d1 |<br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote>| tenant_id | 8fbba4f7f77e4acb80d746c65f20882b |<br>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"></blockquote>|  user_id  | d8e31d9a341243a2bb8d575707a273ea |<br><div><div><div>+-----------+----------------------------------+</div></div></div><div><div><br>
</div><div>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.</div>
<div><br></div><div>I also put this up for review: <a href="https://review.openstack.org/#/c/14314">https://review.openstack.org/#/c/14314</a></div><div><br></div>-Dolph<br>
<br><br><div class="gmail_quote">On Wed, Oct 10, 2012 at 1:15 PM, Joshua Harlow <span dir="ltr"><<a href="mailto:harlowja@yahoo-inc.com" target="_blank">harlowja@yahoo-inc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><div>That sounds great to me. I can help out in converting this code into that code.</div><div><br></div><div>It seems like a trivial kind of thing to do, what format would that command take, a yaml file?</div>
<div><br></div><div>Something similar to <a href="https://github.com/yahoo/Openstack-Anvil/blob/master/conf/templates/keystone/init_what.yaml" target="_blank">https://github.com/yahoo/Openstack-Anvil/blob/master/conf/templates/keystone/init_what.yaml</a> maybe, idk.</div>
<div><br></div><span><div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">
<span style="font-weight:bold">From: </span> Dolph Mathews <<a href="mailto:dolph.mathews@gmail.com" target="_blank">dolph.mathews@gmail.com</a>><br><span style="font-weight:bold">Date: </span> Wednesday, October 10, 2012 11:13 AM<br>
<span style="font-weight:bold">To: </span> Joshua Harlow <<a href="mailto:harlowja@yahoo-inc.com" target="_blank">harlowja@yahoo-inc.com</a>><br><span style="font-weight:bold">Cc: </span> Alan Pevec <<a href="mailto:apevec@gmail.com" target="_blank">apevec@gmail.com</a>>, Skible OpenStack <<a href="mailto:skible.openstack@gmail.com" target="_blank">skible.openstack@gmail.com</a>>, "<a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a>" <<a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a>><br>
<span style="font-weight:bold">Subject: </span> Re: [Openstack] A simple guide to install OpenStack Folsom<br></div><div><div class="h5"><div><br></div><div><div>
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:<br>
<div><br></div><div>    $ keystone-manage bootstrap</div><div><br></div><div>-Dolph<br><br><br><div class="gmail_quote">On Wed, Oct 10, 2012 at 12:34 PM, Joshua Harlow <span dir="ltr">
<<a href="mailto:harlowja@yahoo-inc.com" target="_blank">harlowja@yahoo-inc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You guys should also consider the 'anvil' way of doing this (pure python<br>
baby, haha).<br><br>
Which is improved from lorin's and has been working for yahoo! for a while<br>
now.<br><br><a href="https://github.com/yahoo/Openstack-Anvil/blob/master/anvil/components/helpers/keystone.py#L25" target="_blank">https://github.com/yahoo/Openstack-Anvil/blob/master/anvil/components/helpe<br>
rs/keystone.py#L25</a><br><br>
Please feel free to take the code!! Its only 'real' dependency is the<br>
keystone client + yaml parsing...<br><div><div><br>
On 10/10/12 2:23 AM, "Alan Pevec" <<a href="mailto:apevec@gmail.com" target="_blank">apevec@gmail.com</a>> wrote:<br><br>
>On Wed, Oct 10, 2012 at 11:10 AM, Skible OpenStack<br>
><<a href="mailto:skible.openstack@gmail.com" target="_blank">skible.openstack@gmail.com</a>> wrote:<br>
>> I am counting on our your feedback to enhance my work and contribute it<br>
>>to<br>
>> the OpenStack Eco System.<br>
><br>
>I wonder about<br>
><a href="https://github.com/mseknibilel/OpenStack-Folsom-Install-guide/tree/master/" target="_blank">https://github.com/mseknibilel/OpenStack-Folsom-Install-guide/tree/master/</a><br>
>Scripts<br>
>which say:<br>
># Mainly inspired by<br>
><a href="https://github.com/openstack/keystone/blob/master/tools/sample_data.sh" target="_blank">https://github.com/openstack/keystone/blob/master/tools/sample_data.sh</a><br>
><br>
>Why not submit that as an improvement to Keystone?<br>
>I'd like to propose consolidation of all keystone initialization<br>
>scripts around (Keyston's sample_data.sh, Devstack's keystone_data.sh,<br>
>scripts like yours) and  move to Lorin's YAML config (see<br>
><a href="https://lists.launchpad.net/openstack/msg17204.html" target="_blank">https://lists.launchpad.net/openstack/msg17204.html</a>)<br>
>I'm just not sure yet if additional dependency on YAML is worth it.<br>><br>
>Cheers,<br>
>Alan<br>
><br>
>_______________________________________________<br>
>Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
>Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
>Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
>More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br><br><br>
_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br></div></div></blockquote></div><br></div></div></div></div></div></span></div>
</blockquote></div><br></div>