Guest User

keystone database instructions (expanded)

a guest
Oct 20th, 2011
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. keystone-manage is a particually tempermental beast
  2. Be sure to be precise in the information you feed it, as the delete, disable, and revoke options do not apoear to be functional
  3. Each line consist of the following componants:
  4.  
  5. Command:keystone-manage
  6.  
  7. Type: tenant user role service endpointTemplates endpoint token credentials
  8.  
  9. Action: add grant list [delete disable revoke did not work for me]
  10.  
  11.  
  12. 1.) Start with a clean, dedicated database. It is recommended that you do not share this database with any other applications
  13. Verify that you set the database path properly in your keystone.config file with the sql_connection setting
  14. sqlite comes prefigured for you
  15. If you chose to use a different sql strategy, refer to that application's documentation for instructions on setting up the database and the modifying the sql_connection setting
  16.  
  17. 2.) Add tenants
  18. FORMAT: object=tenant action=add [varchar(255) for tenant] [varchar(255) Description]
  19. keystone-manage tenant add User_account_alpha I_Drew_a_Blank
  20.  
  21. 3.) Add users
  22. FORMAT: object=user action=add [varchar(255) for user] [varchar(255) for password] [already declared tenant]
  23. keystone-manage user add Some_body H48sm3cUz I_Drew_a_Blank
  24.  
  25. 4.) Create roles
  26. FORMAT: object=role action=add [varchar(255) for role]
  27. keystone-manage role add Administrator
  28.  
  29. 5.) Put users into roles
  30. FORMAT: object=role action=grant [already declared role] [already declared user] [already declared tenant]
  31. keystone-manage role grant Administrator Some_body User_account_alpha
  32.  
  33. 6.) Declare services
  34. FORMAT: object=service action=add [varchar(255) for service_name] [varchar(255) for service_type] [varchar(255) for service_description]
  35. keystone-manage service add swift Object_Storage Open-Stack-Object-Storage
  36. keystone-manage service add nova-v1-0 Nova_API_v1.0 Open-Stack-Nova-v1.0
  37. keystone-manage service add nova Nova_API_v1.1 Open-Stack-Nova-v1.1
  38. keystone-manage service add glance Glance_API Open-Stack-Glance
  39. keystone-manage service add keystone Keystone_Identity Open-Stack-Keystone
  40.  
  41. 7.) Set endpoint templates
  42. FORMAT: object=endpointTemplates action=add [region] [already declared service] [public URL] [admin URL] [internal URL] [1=enabled/0=disabled] [1=global/0=regional]
  43. ******** If your network more than one region/zone, you must add an endpoint template for each service in each zone
  44. If a service does not have an endpoint for a zone, it will be unavailable in that zone ********
  45. Replace %HOST_IP% with appropriate IP or URL
  46.  
  47. keystone-manage endpointTemplates add RegionOne swift http://%HOST_IP%:8080 http://%HOST_IP%:8080/ http://%HOST_IP%:8080 1 1
  48. keystone-manage endpointTemplates add RegionOne nova-v1-0 http://%HOST_IP%:8774 http://%HOST_IP%:8774/ http://%HOST_IP%:8774 1 1
  49. keystone-manage endpointTemplates add RegionOne nova http://%HOST_IP%:8774 http://%HOST_IP%:8774 http://%HOST_IP%:8774 1 1
  50. keystone-manage endpointTemplates add RegionOne glance http://%HOST_IP%:9292 http://%HOST_IP%:9292 http://%HOST_IP%:9292 1 1
  51. keystone-manage endpointTemplates add RegionOne keystone http://%HOST_IP%:5000 http://%HOST_IP%:5001 http://%HOST_IP%:5000 1 1
  52.  
  53. 8.) Assign endpoints
  54. FORMAT: object=endpoint action=add [already declared user] [endpoint template number]
  55. ****** If you have multiple users, repeat for each user
  56.  
  57.  
  58. keystone-manage endpoint add Some_body 1
  59. keystone-manage endpoint add Some_body 2
  60. keystone-manage endpoint add Some_body 3
  61. keystone-manage endpoint add Some_body 4
  62. keystone-manage endpoint add Some_body 5
  63.  
  64.  
  65. 9.) Set Admin token to be used in your API's
  66. FORMAT: object=token action=add [token id] [already declared user] [already declared tenant] [expiration date]
  67. keystone-manage token add 999888777666 Some_body User_account_alpha 2015-02-05T00:00
  68.  
  69. 10.) Import credentials
  70. FORMAT: object=credentials action add [already declared service][existing key from appropriate rc;IE novarc][existing secret from appropriate rc][already declared tenant]
  71. ****** To load credentials, you MUST declare a service, set the endpoint template for the zones you wish to use these on, and assign the endpoints
  72.  
  73. keystone-manage credentials nova 12ab34cd-ab12-12ab-1234abcd12ab cd34ab12-12ab-34-cd-dcba4321dc43 User_account_alpha
  74.  
  75.  
  76.  
Advertisement
Add Comment
Please, Sign In to add comment