This is being created externally to the Cloudstack Codebase. Code is on github: https://github.com/NOPping/cloudstack-gce

Introduction

This document contains the design specifications for gCloud, a Google Compute Engine(GCE) like API front end For Apache Cloudstack.

Purpose

gCloud supplies a layer ontop of the Apache Cloudstack API. The purpose of this layer is to expose a Google Compute Engine(GCE) like API for Cloudstack.

gCloud will accept GCE based API calls, translate and pass them over to the Apache Cloudstack API, parse the response and return it in a suitable GCE format.

References

Design

gCloud is a Python application that uses Flask. It exposes a Google Compute Engine(GCE) complaint API.

Mappings:

The following mappings are currently used by gCloud:

GCE

Apache Cloudstack

Disks

Volumes

Network

Security Groups

Firewall

Ingress Rule

Instances

Virtual Machine

Project

Account

Zone

Zone

MachineType

Service Offering

Image

Template

Supported Commands:

The following commands are currently supported in gClouds 0.0.1

  • Disks
    • listdisks
    • getdisk
  • Firewalls
    • addfirewall
    • deletefirewall
    • listfirewalls
    • getfirewall
  • Images
    • listimages
    • getimage
  • Instances
    • addinstance
    • deleteinstance
    • listinstances
    • getinstance
  • Machinetypes
    • listmachinetypes
    • getmachinetype
  • Project
    • getproject
  • Zones
    • listzones
    • getzone

Authentication

Google compute engine uses OAuth2 for authentication. As Apache Cloudstack does not expose an OAuth2 Provider it was necessary to create a make-do work around for this.

Using a Users Apache Cloudstack API Key and Secret Key as the OAuth2 Client ID and Client Secret it is possible to successfully authenticate. However, It is necessary for gCloud to store your Client ID and Client Secret as they are required to generate a signature for Apache Cloudstack API calls and they are only passed during the OAuth2 token generation stages.

  • No labels