AOng is the Abiquo Outbound API client. This client is not part of the core Abiquo product, and as such, it is not supported by Abiuqo.
The purpose of this software is to provide a way to connect and consume the Abiquo Outbound API and use some extra functionality not yet included in the Abiquo core platform. It also provides an easy path for you to develop custom handlers for Outbound API events.
Install and configure AOng
AOng Prerequisites
AOng is a standard Ruby on Rails application, using [Resque](https://github.com/resque/resque) for background job processing and [em-eventsource](https://github.com/AF83/em-eventsource) to consume the Abiquo Outbound API. Testing has been done under Linux CentOS 6, but it might work under other platforms.
To run the application first install:
- Ruby 2.0 or greater with rubygems (recommended install using rvm, see http://rvm.io/)
- Redis Server
- RDBMS supported by Rails (Activerecord)
Install Rails Prerequisites
First install the prerequisites for Rails
yum install http-parser libuv-devel sqlite-devel nodejs libvirt-devel
Install AOng
Expand the zip file and change into the directory with the cwd command, then type:
bundle install
Configure AOng
First configure the AOng database. Edit config/database.yml and set up accordingly for each environment. Default is SQLite database:
adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000
Or for MySQL
adapter: mysql2 host: localhost username: AOng password: temporal database: AOng
Then create the AOng schema and tables, and populate them with basic data, by running:
rake db:migrate
Synchronize Abiquo's enterprises and users into the AOng database:
rake abiquo:sync
Abiquo recommends that you set up a cron task to run this command periodically in order to keep user and enterprise data synchronized.
Configure AOng application
Edit config/config.yml and configure the following parameters for each environment.
Parameter | Description |
---|---|
abiquo_m_url | The URL of the Abiquo M event stream, e.g. http://abiquo.example.com:8009/m/stream |
abiquo_api_url | The URL of the Abiquo API as specified in the Abiquo platform's abiquo.properties file, e.g. https://abiquo.example.com |
abiquo_m_username | The username for connecting to the event stream, e.g. admin |
abiquo_m_password | The password for the user, e.g. xabiquo |
Run the application
The application has the following components:
Component | Description |
---|---|
*Application server* | Serves HTML pages and handles rule, command and rule group configurations |
*Bundle worker* | A Resque worker that will handle job queuing for each command |
*Queue workers* | Resque workers performing actual modifications or configurations |
*Outbound client* | A process that connects to the Outbound API to consume events |
These components are managed using foreman. To start all components just run
foreman start
When all the processes have started you can access the application at:
http://ip_of_your_server:3000/admin
For production environments it is advised to export foreman process to init scripts as described on foreman's man page (See http://ddollar.github.io/foreman/#EXPORTING).
You can also change concurrency values in foreman to run more than one worker of each type. You must not run more than one Outbound client.
foreman start -c web:1,outbound_client=1,bundle_worker=2,queue_worker=2
AOng integrations
The first integration is the Rate Limit integration.