GithubHelp home page GithubHelp logo

team19hackathon2021 / pman Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fnndsc/pman

0.0 0.0 0.0 1022 KB

A process management system written in python

License: MIT License

Python 60.69% Shell 36.54% Dockerfile 2.77%

pman's Introduction

pman ChRIS logo

Docker Image Version MIT License Github Actions

Last Commit

This repository implements pman -- a process manager that provides a unified API over HTTP for running jobs on

  • Docker Swarm
  • Kubernetes
  • Openshift

Install latest docker

Currently tested platforms:

Note: On a Linux machine make sure to add your computer user to the docker group. Consult this page https://docs.docker.com/engine/install/linux-postinstall/

Start a local Docker Swarm cluster if not already started

$> docker swarm init --advertise-addr 127.0.0.1

Start pman's Flask development server

$> git clone https://github.com/FNNDSC/pman.git
$> cd pman
$> ./make.sh

Remove pman's Flask development server

$> cd pman
$> ./unmake.sh

Remove the local Docker Swarm cluster if desired

$> docker swarm leave --force

Install single-node Kubernetes cluster

On MAC OS Docker Desktop includes a standalone Kubernetes server and client. Consult this page https://docs.docker.com/desktop/kubernetes/

On Linux there is a simple MicroK8s installation. Consult this page https://microk8s.io Then create the required alias:

$> snap alias microk8s.kubectl kubectl
$> microk8s.kubectl config view --raw > $HOME/.kube/config

Start pman's Flask development server

$> git clone https://github.com/FNNDSC/pman.git
$> cd pman
$> ./make.sh -O kubernetes

Remove pman's Flask development server

$> cd pman
$> ./unmake.sh -O kubernetes

Simulate incoming data

Docker Swarm:

$> pman_dev=$(docker ps -f name=pman_dev_stack_pman.1 -q)
$> docker exec $pman_dev mkdir -p /home/localuser/storeBase/key-chris-jid-1/incoming
$> docker exec $pman_dev mkdir -p /home/localuser/storeBase/key-chris-jid-1/outgoing
$> docker exec $pman_dev touch /home/localuser/storeBase/key-chris-jid-1/incoming/test.txt

Kubernetes:

$> pman_dev=$(kubectl get pods --selector="app=pman,env=development" --output=jsonpath='{.items[*].metadata.name}')
$> kubectl exec $pman_dev -- mkdir -p /home/localuser/storeBase/key-chris-jid-1/incoming
$> kubectl exec $pman_dev -- mkdir -p /home/localuser/storeBase/key-chris-jid-1/outgoing
$> kubectl exec $pman_dev -- touch /home/localuser/storeBase/key-chris-jid-1/incoming/test.txt

Using HTTPie to run a job

$> http POST http://localhost:30010/api/v1/ cmd_args='--saveinputmeta --saveoutputmeta --dir cube/uploads' cmd_path_flags='--dir' auid=cube number_of_workers=1 cpu_limit=1000 memory_limit=200 gpu_limit=0 image=fnndsc/pl-dircopy selfexec=dircopy selfpath=/usr/local/bin execshell=/usr/local/bin/python type=fs jid=chris-jid-1

Get job status

$> http http://localhost:30010/api/v1/chris-jid-1/

Keep making the previous GET request until the "status" descriptor in the response becomes "finishedSuccessfully"

Delete the job

$> http DELETE http://localhost:30010/api/v1/chris-jid-1/

pman's People

Contributors

rudolphpienaar avatar danmcp avatar jbernal0019 avatar sandip117 avatar ravisantoshgudimetla avatar nicolasrannou avatar jennydaman avatar husky-parul avatar iamemilio avatar umohnani8 avatar betaredex avatar adityajariwala avatar arnavn101 avatar jlmayorga avatar awalkaradi95 avatar cagriyoruk avatar javgan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.