Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Automating Rackspace with ONE Automation

406 views

Published on

Automating Rackspace with ONE Automation

  • Be the first to comment

  • Be the first to like this

Automating Rackspace with ONE Automation

  1. 1. Automate the Cloud November 2015 Rackspace & Web Services Agent Jennifer Jinhong - @jennjin
  2. 2. 3 Property of Automic Software. All rights reserved Cloud Infrastructure Managed Service Provider
  3. 3. 4 Property of Automic Software. All rights reserved Authentication
  4. 4. 5 Property of Automic Software. All rights reserved • Every REST request against a Rackspace service requires the inclusion of a specific authorization token, supplied by the X-Auth-Token HTTP header. Token is obtained by using the Rackspace Cloud Identity service and supplying a valid user name and API access key. • OpenStack Keystone Identity Service v2.0. • Token expires after 24 hours, so needs to be refreshed
  5. 5. 6 Property of Automic Software. All rights reserved Token Connection URL Endpoint: https://identity.api.rackspacecloud.com/v2.0 * No Authentication needed – Passed in Token Job
  6. 6. 7 Property of Automic Software. All rights reserved Token Job – Request Choose Token CONN Object Method – POST Media Type – application/json JSON request - { "auth": { "RAX-KSKEY:apiKeyCredentials": { "username” : "<your username>", "apiKey": "<your api key>" } } } JSON formatted Response
  7. 7. 9 Property of Automic Software. All rights reserved Token Job – Response Parse the Response Extract 2 values – – Token ID – Expiration JSON request - { "access": { "token": { "id": "AAC- WX0LLUSAq9x2OZohFziPrpItMkvX1H7FfpGylD_dclSbOMvg0zpANzRkoiAg53V sBpTjhJlTNtQsoWaa9tTr- cpLPxL24p4ekHCKEjWNPg2Bn11uOpv09jEmJP9xmMVqZmjgARrWrQ", "expires": "2015-09-24T19:04:11.635Z", "tenant": { "id": "651772", "name": "651772" }, …....
  8. 8. 10 Property of Automic Software. All rights reserved Save token to Variable Token ExpirationUsername
  9. 9. 11 Property of Automic Software. All rights reserved Authentication is passed in through the X-Auth-Token Header parameter of each request INC will need to be added to the Pre Process Tab of each job Create Include (INC) Object to pull the Token for each call
  10. 10. 12 Property of Automic Software. All rights reserved Cloud Storage
  11. 11. 13 Property of Automic Software. All rights reserved Connection Object – Cloud Files Endpoints for the different Regions are in the Response from the Token call. Look for the section in the Token Response showing : JSON formatted Response
  12. 12. 14 Property of Automic Software. All rights reserved Since each Region is a separate Endpoint, a Connection (CONN) object should be created for each Region used. https://developer.rackspace.com/docs/cloud-files/v1/developer-guide/#document-api-reference
  13. 13. 15 Property of Automic Software. All rights reserved List Container Choose CONN Object Resource – /&container# Method – GET Headers X-Auth-Token – &token_id# Query Parameters format - xml
  14. 14. 16 Property of Automic Software. All rights reserved Upload Files Headers X-Auth-Token – &token_id# Resource – /&container# Method – POST Media Type – text/plain Choose File - <file located on Agent’s Server>
  15. 15. 17 Property of Automic Software. All rights reserved Cloud Database
  16. 16. 18 Property of Automic Software. All rights reserved Region Endpoint Chicago (ORD) https://ord.databases.api.rackspacecloud.com/v1.0/<account number>/ Dallas/Ft. Worth (DFW) https://dfw.databases.api.rackspacecloud.com/v1.0/<account number> Northern Virginia (IAD) https://iad.databases.api.rackspacecloud.com/v1.0/<account number>/ London (LON) https://lon.databases.api.rackspacecloud.com/v1.0/<account number>/ Sydney (SYD) https://syd.databases.api.rackspacecloud.com/v1.0/<account number>/ Hong Kong (HKG) https://hkg.databases.api.rackspacecloud.com/v1.0/<account number>/ Endpoints – Cloud Database
  17. 17. 19 Property of Automic Software. All rights reserved
  18. 18. 20 Property of Automic Software. All rights reserved List Instances
  19. 19. 21 Property of Automic Software. All rights reserved Response Result JSON Formatted
  20. 20. 22 Property of Automic Software. All rights reserved Create Backup JSON request - { "backup":{ "name" : "<name for backup>", "description" : "<description for backup>", "instance" : "<instance id>" } }
  21. 21. 23 Property of Automic Software. All rights reserved List Backups
  22. 22. 24 Property of Automic Software. All rights reserved Response Result JSON Formatted
  23. 23. 25 Property of Automic Software. All rights reserved marketplace.automic.com
  24. 24. 26 Property of Automic Software. All rights reserved • General User Guide – https://developer.rackspace.com/docs/user-guides/infrastructure/ • Get Authentication Token – https://developer.rackspace.com/docs/cloud-servers/v2/developer-guide/#document-general- api/authentication • Cloud Files Actions – https://developer.rackspace.com/docs/user-guides/infrastructure/cloud-config/storage/cloud-files- product-actions/#cloud-files-product-actions • Cloud Database API Reference – https://developer.rackspace.com/docs/cloud-databases/v1/developer-guide/#document-api- reference Rackspace Reference Docs
  25. 25. 27 Property of Automic Software. All rights reserved Done… Questions?

×