Skip to content

Latest commit

 

History

History
87 lines (63 loc) · 3.12 KB

README.md

File metadata and controls

87 lines (63 loc) · 3.12 KB

HP Helion icon

Using the HP Helion Cloud provider in pkgcloud

The HP Helion Cloud provider in pkgcloud supports the following services:

Activating your HP Helion Cloud services

If this is your first time using HP Helion Cloud Services, please follow this guide to get started.

Getting Started with Compute

We've provided a simple compute example where it creates a couple of compute instances.

Authentication

For all of the HP Cloud services, you create a client with the same options:

var client = require('pkgcloud').compute.createClient({
    provider: 'hp',
    username: 'your-user-name',
    apiKey: 'your-api-key'
});

Getting your API key

You can provision API keys in your cloud management console. Please see here for more instructions.

Authentication Endpoints and Regions

All of the HP createClient calls have a few options that can be provided:

authUrl

authUrl specifies the authentication endpoint used to create a token for your HP client. See here for more details : Regions If you're targeting an HP Private Cloud instance, please contact your administrator for the authUrl.

Authenticating against the US-West endpoint
var client = require('pkgcloud').compute.createClient({
    provider: 'hp',
    username: 'your-user-name',
    apiKey: 'your-api-key',
    region: 'region-a.geo-1',
    authUrl: 'https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/'
});
Authenticating against the US-East endpoint
var client = require('pkgcloud').compute.createClient({
    provider: 'hp',
    username: 'your-user-name',
    apiKey: 'your-api-key',
    region: 'region-b.geo-1',
    authUrl: 'https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0/'
});

region

region specifies which region of a service to use. HP has services deployed in multiple regions. See here for more details : Regions If you're targeting an HP Private Cloud instance, please contact your administrator for region names.

Specifying a custom region
var client = require('pkgcloud').compute.createClient({
    provider: 'hp',
    username: 'your-user-name',
    apiKey: 'your-api-key',
    region: 'region-a.custom.corp'
});

Tokens and Expiration

When you make your first call to a HP provider, your client is authenticated transparent to your API call. HP will issue you a token, with an expiration. When that token expires, the client will automatically re-authenticate and retrieve a new token. The caller shouldn't have to worry about this happening.