2017 © Pedro Peláez
 

library php-opencloud-zf2

ZF2 module that allows easy interaction with Rackspace/OpenStack APIs

image

jamiehannaford/php-opencloud-zf2

ZF2 module that allows easy interaction with Rackspace/OpenStack APIs

  • Thursday, May 28, 2015
  • by jamiehannaford
  • Repository
  • 1 Watchers
  • 3 Stars
  • 123 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

php-opencloud-zf2

A simple but powerful ZF2 module that allows your web app to communicate easily with Rackspace/OpenStack APIs. You can manage your cloud account configurations, use Swift helper functions in your view files, monitor your cloud servers, sync directories with a CDN, update DNS records... In short, you get the full benefit of an SDK without all the overhead., (*1)

Installation

Step 1: Install Composer (if you haven't already)

curl -sS https://getcomposer.org/installer | php

Step 2: Install the module

php composer.phar require jamiehannaford/php-opencloud-zf2:dev-master

This will automatically update your composer.json configuration file and force Composer to install the module. Alternatively, you can manually insert the requirement like so:, (*2)

{
    "require": {
        "jamiehannaford/php-opencloud-zf2": "~1.0"
    }
}

And then run:, (*3)

php composer.phar install

Step 3: ZF2 Configuration

You need to update your application.config.php file, and add in the module:, (*4)

return array(
    'modules' => array(
        // other modules...
        'OpenCloud'
    )
);

You then need to make sure you have an opencloud.local.php configuration file in your config/autoload directory - since this is what holds all your API configuration values. To make life easier, you can copy the dist version shipped with this project:, (*5)

cp ./vendor/jamiehannaford/php-opencloud-zf2/config/opencloud.local.php.dist ./config/autoload/opencloud.local.php

If using Rackspace, you must fill in the username and apiKey config options., (*6)

If using OpenStack, you must fill in the username, password config options, along with either tenantId or tenantName., (*7)

Usage

You can retrieve a Rackspace client object using the Service Manager:, (*8)


public function indexAction() { // get Rackspace client $rackspace = $this->getServiceLocator()->get('OpenCloud'); // this also works $rackspace = $this->getServiceLocator()->get('OpenCloud\Rackspace'); // get OpenStack client $openstack = $this->getServiceLocator()->get('OpenCloud\OpenStack'); }

Once this client object is available, you have full access to the php-opencloud SDK., (*9)

View helpers

Please see the CloudFilesHelper wiki for more information about how you can streamline the process of accessing CDN resources in your HTML views., (*10)

The Versions

28/05 2015

dev-master

9999999-dev

ZF2 module that allows easy interaction with Rackspace/OpenStack APIs

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

17/01 2014

1.0.0

1.0.0.0

ZF2 module that allows easy interaction with Rackspace/OpenStack APIs

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

17/01 2014

1.0.0-beta.1

1.0.0.0-beta1

ZF2 module that allows easy interaction with Rackspace/OpenStack APIs

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

17/01 2014

1.0.0-beta

1.0.0.0-beta

ZF2 module that allows easy interaction with Rackspace/OpenStack APIs

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires