Giter VIP home page Giter VIP logo

slurm-https's Introduction

slurm-https

A simple HTTPS API for Slurm.

Quick Start

Build

$ git clone https://github.com/angt/slurm-https.git
$ cd slurm-https
$ go build

Run

$ ./create-cert.sh
$ ./slurm-https

By default, the server listen on :8443.

API

The API is nearly a direct mapping to slurm.h.

endpoint description
/nodes get all node configuration information if changed since UpdateTime
/node/update update node's configuration (root only)
/licenses get license information
/conf get control configuration information if changed since UpdateTime
/jobs get all job configuration information if changed since UpdateTime
/job/alloc allocate resources for a job request
/job/submit submit a job for later execution
/job/lookup get info for an existing resource allocation
/job/update update job's configuration
/job/notify send message to the job's stdout (root only)
/job/kill send the specified signal to all steps of an existing job (with flags)
/job/signal send the specified signal to all steps of an existing job
/job/complete note the completion of a job and all of its steps
/job/suspend suspend execution of a job
/job/resume resume execution of a previously suspended job
/job/requeue re-queue a batch job, if already running then terminate it first
/job/step/kill send the specified signal to an existing job step
/job/step/signal send the specified signal to an existing job step
/job/step/terminate terminates a job step
/frontends get all frontend configuration information if changed since UpdateTime
/frontend/update update frontend node's configuration (root only)
/topologies get all switch topology configuration information
/partitions get all partition configuration information if changed since UpdateTime
/partition/create create a new partition (root only)
/partition/update update a partition's configuration (root only)
/partition/delete delete a partition (root only)
/reservations get all reservation configuration information if changed since UpdateTime
/reservation/create create a new reservation (root only)
/reservation/update update a reservation's configuration (root only)
/reservation/delete delete a reservation (root only)
/triggers get all event trigger information
/trigger/create create an event trigger
/trigger/delete delete an event trigger
/ping ping the slurm controller
/reconfigure force the slurm controller to reload its configuration file
/shutdown shutdown the slurm controller
/takeover force the slurm backup controller to take over the primary controller

Test it with cURL

Get the conf

$ curl --cert ./client.crt --cacert ./ca.crt --key ./client.key --insecure -d @- https://localhost:8443/conf <<EOF
{
    "UpdateTime":0
}
EOF

Submit a batch job

$ curl --cert ./client.crt --cacert ./ca.crt --key ./client.key --insecure -d @- https://localhost:8443/job/submit <<EOF
{                 
    "Name":"test",
    "TimeLimit":200,
    "MinNodes":1,
    "UserId":$(id -u),
    "GroupId":$(id -g),
    "WorkDir":"${HOME}",
    "Script":"#!/bin/sh\nhostname\n"
}                                   
EOF

slurm-https's People

Contributors

angt avatar kunthar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.