Skip to content

ckehoe/taskcluster-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

taskcluster-api

A very simple API that will produce a JSON object containing each taskId and its state by invoking the mozilla taskcluster API.

How to use the API

The API returns a JSON object containing the taskIds and the associated status according to the graphId.

#Sample Output

[
  {
    'taskId':'dgsdgsgsdgbt23gs', 
    'status':'Complete'
  },
  {
    'taskId':'sdgfn8932t2jompg',
    'status':'Complete'
  }
]

#API URI's Option 1 - Returns the tasks and statuses based on the default graphId

http://localhost or http://localhost/tasks/status

Option 2 - Returns the tasks and statuses based on a custom graphId

http://localhost/tasks/status?graphId={graphId}

Installation

There are two options for installing and running the taskcluster-api.

Docker

Can be installed on any platform that supports the Docker client.

Install Docker

http://docs.docker.com/engine/installation/

Start the docker service

sudo service docker start

Pull the image

docker pull ckehoe/taskcluster-api

Start the container on localhost port 80

docker run -p 80:80 -t -i ckehoe/taskcluster-api # (add -d if you want it to run in the background)

Run curl against localhost to invoke the API (for additional options see "How to use the API")

curl http://localhost

Puppet

The provided puppet script will download all required dependencies and start the API on localhost. It has been tested on Ubuntu 14.04 and the Amazon Linux AMI but should work for most version of linux.

Download the Puppet Client

Debian

sudo apt-get update && sudo apt-get install -y puppet

RPM

sudo yum check-update && sudo yum install -y puppet

Start the puppet service

sudo service puppet start

cd to the puppet directory

cd taskcluster-api/deploy/puppet

Install and Deploy the taskcluster-api

sudo puppet apply --modulepath ./modules manifests/site.pp

Run curl against localhost to invoke the API (for additional options see "How to use the API")

curl http://localhost

Testing

Use the nose module to test the application. Test scripts are located at taskcluster-api/tests/api_tests.py.

Go to the root of the taskcluster directory

cd {installation-location}/taskcluster-api

Run nosetests

WEBPY_ENV=test nosetests

Any questions?

[email protected]

About

A simple api that invokes the mozilla taskcluster api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published