Skip to content

movermeyer/hivy.legacy

 
 

Repository files navigation

Hivy

Latest Version Build Status Coverage Status Code Health Requirements Status License

Unide Hive controller

Hivy exposes a RESTful API to the unide platform. Create, destroy and configure collaborative development environments and services around it.

Installation

Docker must be installed on the server your are deploying the environments.

You also need serf v0.4.1 for service orchestration.

$ (sudo) pip install hivy

$ # Default settings use local docker server (using default unix sockets)
$ # But you can tell hivy to use another one
$ export DOCKER_URL="http://172.0.1.17:4243"
$ # In the same manner, you can use a custom image
$ export NODE_IMAGE=my/image

Usage

In a first terminal, fire up the server

$ serf agent -node hivy -tag role=master &
$ hivy --bind 0.0.0.0 --debug

And play with it in another terminal

curl -H "Authorization:<ACCESS_TOKEN>" http://0.0.0.0:5000/

# Get some informations
curl http://0.0.0.0:5000/
curl http://0.0.0.0:5000/version
curl http://0.0.0.0:5000/v0/doc

# Create a new environment
curl -X POST -H "Authorization:<ACCESS_TOKEN>" http://0.0.0.0:5000/v0/node

# Get some feedback
curl -H "Authorization:<ACCESS_TOKEN>" http://0.0.0.0:5000/v0/node

# Destroy it
curl -X DELETE -H "Authorization:<ACCESS_TOKEN>" http://0.0.0.0:5000/v0/node

Tests

$ make tests

$ # If docker is installed, you can test node interactions as well
$ USE_DOCKER=true make tests

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.1%
  • Shell 3.3%
  • Makefile 1.6%