A Self Service Portal which consumes the RightScale API
PHP CSS JavaScript Other
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
config OMGZ TEH EQUALZ SIGN Jun 20, 2013
docs Added phpdocumenter2 generated docs Apr 5, 2013
json Added unique property to text product inputs, allowing that value to … Nov 7, 2013
public Hopefully properly handle livereload-js vendor dependency Nov 7, 2013
runlists Added unique property to text product inputs, allowing that value to … Nov 7, 2013
Berksfile Update to RS v13.5 template tools Mar 12, 2014
Vagrantfile Update to RS v13.5 template tools Mar 12, 2014
deployment.xml Massive refactoring to Zend Framework 2 Mar 20, 2013
release_dev_with_berks_to_rightscale.sh final cookbook tweaks Jul 15, 2013
sync_vagrant_share_with_root.sh Added RightScaleAPIClient caching (sorta) Mar 22, 2013


Travis-CI Build Status Build Status

Installation instructions

For a LAMP All-in-One or PHP App server

  1. Download and install Composer:

curl -s http://getcomposer.org/installer | php

  1. Install the composer managed dependencies:

php composer.phar install

  1. Make sure that /path/to/rsss/logs exists, and is writable by apache2/httpd

  2. Copy config/autoload/local.php.dist to config/autoload/local.php, and enter your values.

  3. Run the following commands which will create the schema in the DB specified in config/autoload/local.php and populate the 2 "standard" products.

vendor/bin/doctrine-module odm:schema:create php public/index.php product add baselinux php public/index.php product add php3tier

  1. Enjoy.. Hopefully!


Commandline options

List users

php /public/index.php users list

Authorize a user

php /public/index.php users authorize foo@bar.baz

(De)Authorize a user

php /public/index.php users deauthorize foo@bar.baz

Update Memcached data for RightScale Resources (ServerTemplates, Clouds, InstanceTypes, Datacenters etc)

php /public/index.php cache update rightscale

Add products from definition files (TODO: Document the description file format) found in /module/SelfService/src/SelfService/Product

php /public/index.php product add php3tier



A lot of the json that gets exchanged with (or through) the vending machine has json-schema.org schema definitions. Unfortunately the PHP validation tools don't support anywhere near all of the schema options used in these schemas.

As a result, I wrote a simple python wrapper that is in the bin/ directory. It accepts two params. The first is the schema file you want to validate against and the second is the file you want to validate.

On OSX you can easily install thusly

easy_install pip
sudo pip install jsonschema

A TODO item here is to include the use of this validation in unit tests, and the actual app


cd module/SelfService/test


The RightScale SelfService Vending Machine can be extended in three key ways.

  1. Custom products. Using a well defined JSON schema, new products can be added
  2. Custom provisioners. While RSSS can provision products, that responsibility can also be delegated to other tools or systems.
  3. Callbacks (Not yet implemented). Througout key lifecycle events of a product, calls can be made from the RSSS to external systems which can alter the results of that lifecycle event.



RSSS has an abstract PHP class found at ./module/SelfService/src/Provisioners/AbstractProvisioner which defines the interface for a provisioner.

When a product is selected in the RSSS UI, a JSON representation of the desired product is generated. That JSON representation is passed into the provision() method of the provisioner.

RSSS provides two provisioner implementations.

  1. RsApiProvisioner - This provisioner uses the RightScale API 1.5 to provision all desired resources for a product.
  2. CloudFlowProvisioner - (Not yet implemented) This provisioner delegates the provisioning to a CloudFlow process which is designed to injest the JSON representation of the desired product.

To create your own provisioner, create a PHP class which extends SelfService\Provisioner\AbstractProvisioner and change the rsss/provisioner config option in your applications ./confi/local.php config file.


Input Schema

  • [46913d1] Bumped version from 1.0 to 1.1. Removed subnets and added "depends" to prudct inputs. This would be a breaking change for anyone who was consuming 1.0 because all references to "subnet" were removed. However since I'm the only consumer at this point I chose to increment the minor version rather than the major.
  • [bece7ab] Bumped version from 1.1 to 1.2. Added a "required_cloud_capability" property for text and select product inputs. This allows those to be dependent upon a cloud input which is set to a cloud which supports the cloud capability which is required for that input. Think of things like asking for volume size only when the cloud supports attachable volumes.
  • [cf4433c] Bumped version from 1.2 to 1.3. Added "none" as an option for matching on the "required_cloud_capability" property. This allows those to appear only when the cloud input does not have the cloud capabilities specified. Think of things like setting up ROS on clouds which don't support volumes.



Misc Useful stuff

Icon Pack

http://findicons.com/pack/42/basic - Symbols, basic stuff
http://findicons.com/pack/2580/android_icons - Server Icons
http://findicons.com/pack/1689/splashy - More symbols, candidate for replacing the first icon pack


nickmeta.default_value as nickname,
vermeta.default_value as version,
pubmeta.default_value as publication_id
from server_templates
join product_meta_inputs as nickmeta on (server_templates.nickname_id = nickmeta.id)
join product_meta_inputs as vermeta on (server_templates.version_id = vermeta.id)
join product_meta_inputs as pubmeta on (server_templates.publication_id_id = pubmeta.id);