+ All Categories
Home > Presentations & Public Speaking > Automating Rackspace with ONE Automation

Automating Rackspace with ONE Automation

Date post: 13-Apr-2017
Category:
Upload: automic-software
View: 297 times
Download: 0 times
Share this document with a friend
25
Automate the Cloud November 2015 Rackspace & Web Services Agent Jennifer Jinhong - @jennjin
Transcript
Page 1: Automating Rackspace with ONE Automation

Automate the CloudNovember 2015

Rackspace & Web Services Agent

Jennifer Jinhong - @jennjin

Page 2: Automating Rackspace with ONE Automation

3 Property of Automic Software. All rights reserved

Cloud InfrastructureManaged Service Provider

Page 3: Automating Rackspace with ONE Automation

4 Property of Automic Software. All rights reserved

Authentication

Page 4: Automating Rackspace with ONE Automation

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

Page 5: Automating Rackspace with ONE Automation

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

Page 6: Automating Rackspace with ONE Automation

7 Property of Automic Software. All rights reserved

Token Job – Request

Choose Token CONN Object

Method – POSTMedia Type – application/json

JSON request -

{

"auth": {

"RAX-KSKEY:apiKeyCredentials": {

"username” : "<your username>",

"apiKey": "<your api key>"

}

}

}

JSON formatted Response

Page 7: Automating Rackspace with ONE Automation

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_dclSbOMvg0zpANzRkoiAg53VsBpTjhJlTNtQsoWaa9tTr-cpLPxL24p4ekHCKEjWNPg2Bn11uOpv09jEmJP9xmMVqZmjgARrWrQ", "expires": "2015-09-24T19:04:11.635Z", "tenant": {

"id": "651772", "name": "651772" },

…....

Page 8: Automating Rackspace with ONE Automation

10 Property of Automic Software. All rights reserved

Save token to Variable

Token ExpirationUsername

Page 9: Automating Rackspace with ONE Automation

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

Page 10: Automating Rackspace with ONE Automation

12 Property of Automic Software. All rights reserved

Cloud Storage

Page 11: Automating Rackspace with ONE Automation

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

Page 12: Automating Rackspace with ONE Automation

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

Page 13: Automating Rackspace with ONE Automation

15 Property of Automic Software. All rights reserved

List Container

Choose CONN Object

Resource – /&container#Method – GET

Headers X-Auth-Token – &token_id#

Query Parametersformat - xml

Page 14: Automating Rackspace with ONE Automation

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>

Page 15: Automating Rackspace with ONE Automation

17 Property of Automic Software. All rights reserved

Cloud Database

Page 16: Automating Rackspace with ONE Automation

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

Page 17: Automating Rackspace with ONE Automation

19 Property of Automic Software. All rights reserved

Page 18: Automating Rackspace with ONE Automation

20 Property of Automic Software. All rights reserved

List Instances

Page 19: Automating Rackspace with ONE Automation

21 Property of Automic Software. All rights reserved

Response ResultJSON Formatted

Page 20: Automating Rackspace with ONE Automation

22 Property of Automic Software. All rights reserved

Create Backup

JSON request -

{

"backup":{

"name" : "<name for backup>",

"description" : "<description for backup>",

"instance" : "<instance id>"

}

}

Page 21: Automating Rackspace with ONE Automation

23 Property of Automic Software. All rights reserved

List Backups

Page 22: Automating Rackspace with ONE Automation

24 Property of Automic Software. All rights reserved

Response ResultJSON Formatted

Page 23: Automating Rackspace with ONE Automation

25 Property of Automic Software. All rights reserved

marketplace.automic.com

Page 24: Automating Rackspace with ONE Automation

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-pro

duct-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

Page 25: Automating Rackspace with ONE Automation

27 Property of Automic Software. All rights reserved

Done… Questions?


Recommended