A Python-server that allows to execute machines (scripts) based on open source tools (FreeCAD, ...) through a nice web interface
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
python
.gitignore
LICENSE
README.md
requirements.txt

README.md

Documentation Status Python 3

What is machineHUB ?

Discover our machines

Installation

System dependencies

Install FreeCAD

# Install FreeCAD
sudo add-apt-repository ppa:freecad-maintainers/freecad-stable
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install freecad freecad-doc

Install Docker

# Install Docker
sudo apt-get install wget
wget -qO- https://get.docker.com/ | sh
sudo service docker start

Warning

# Create a Docker group
sudo usermod -aG docker ubuntu

Python requirements

cd machinehub
sudo -H pip install -r requirements.txt

Execute

Build all the machinehub docker images to use as base to the machine images.

cd machinehub/machinehub/docker/dockerfiles/{engine}
docker build -t machinehub/{engine} .

Launch the webapp.

cd machinehub
python launcher.py

gunicorn.

cd machinehub
gunicorn -w 8 -b 127.0.0.1:5000 launcher:app

How to use Machinehub

You can use the Advanced REST client to test Machinehub. It is a Chorme extension with an easy REST client.

Base URL http://0.0.0.0:5000/v1

Call Type Content-Type Header Payload Info
/machine/{machinename}/{username} PUT multipart-form-data Authorization: Bearer {AUTH_TOKEN} {machine_name}.zip
/machine/{machinename}/{username} GET
/machine/{machinename}/{username} POST multipart-form-data input.zip
/machine/{machinename}/{username} POST application/json Json with the machine input data
/machine/{machinename}/{username} DELETE Authorization: Bearer {AUTH_TOKEN}
/users/authenticate GET Authorization: Bearer {AUTH_TOKEN} http basic authentication. Return the AUTH_TOKEN
/users/check_credentials GET Authorization: Bearer {AUTH_TOKEN}

License

Sponsored by BQ untill March 2016

Machinehub is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Please read the LICENSE files for more details.