Alooma CodeEngine code and deploy script. 
=========================================

This directory contains code for for sending events from Alooma code-engine
to CloudSearch instance, by invoking a lambda function. It's located in 
`codeengine` directory. Also, a deployment script is available.


Deployment
----------

To deploy the code to Alooma code engine you can use `deploy.py` script. 
For example, it can be executed from Jenkins job.


The Jenkins job should consist of the following steps:

1. Checkout the latest changes from lambda-alooma-cloudsearch repo

2. Create virtualenv, activate it and install requirements

3. Export `ALOOMA_USERNAME`, `ALOOMA_PASSWORD` and `ALOOMA_ACCOUNT_NAME` env
variables

4. Change directory to `alooma-codeengine/`

5. Run tests in `tests/` directory

6. If test run was successful, run deploy.py script. By default it will 
upload modules from `codeengine` directory to Alooma CodeEngine. You can
override it if you provide directory name as an argument. 

