How to change pkgcloud Openstack from Keystone API v2 to v3 for OVH

From my previous post, it gives example for php-opencloud for Openstack. You may using pkgcloud for nodeJS, so here is the example settings that you may need.

If you are using pkgcloud and was using API v2, you should update the code to v3. The documents doesn’t provide detail for the setting on OVH. So I make a copy in here.

Keystone API v2 for pgkcloud

var pkgcloud = require('pkgcloud');
var openstack = pkgcloud.storage.createClient({
	provider: 'openstack',
	region: '{region}',
	username: '{username}',
	password: '{password}',
	authUrl: 'https://auth.cloud.ovh.net/',
});

You should change to the example below.

Keystone API v3 pkgcloud

var pkgcloud = require('pkgcloud');
var openstack = pkgcloud.storage.createClient({
	provider: 'openstack',
	keystoneAuthVersion: 'v3',
	authUrl: 'https://auth.cloud.ovh.net/',
	region: '{region}',
	username: '{username}',
	password: '{password}',
	domainId: 'default',
	domainName: '{projectID}',
});

You may use openstack.auth to test your identity access.

openstack.auth(function(err) {
    if (err) {
        console.error(err);
    }
    else {
        console.log(openstack._identity);
    }
});

You may read more from their documentation

Tags:

2 thoughts on “How to change pkgcloud Openstack from Keystone API v2 to v3 for OVH”

  1. Thank you for this post :)

    What are the equivalent of domainName: ‘{projectID}’, in the V2 or what is it according to OVH specificity ?

    Thanks
    Quentin

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.