Skip to main content

TBD

Project description

# Devnest Tool

A simple CLI to manage “reservations” for the hardware in devnest.

The primary use case for this tool is to reserve shared node for debugging and development work.

Current implementation uses Jenkins APIs and metadata stored inside Jenkins to manage lifecycle of hardware in the DevNest.

Once the node is reserved it’s being put offline, so no other Jenkins user is able to use it, until reservation expires and it’s being cleaned.

### Usage

## Config File

By default, devnest looks for ~/.config/jenkins_jobs/jenkins_jobs.ini, or /etc/jenkins_jobs/jenkins_jobs.ini (in that order).

It is possible to replace CLI arguments such as user, password and url with config file containing this information and pass path to this file using –conf flag.:

` [jenkins] user=JENKINS_USERNAME password=JENKINS_API_TOKEN url=https://JENKINS_URL `

JENKINS_API_TOKEN can be found using Jenkins at:

https://JENKINS_URL/user/JENKINS_USERNAME/configure

## Run DevNest CLI

Running in virtual environment:

` git clone https://github.com/mpryc/devnest.git virtualenv my-devnest-virtenv source my-devnest-virtenv/bin/activate pushd devnest pip install . devnest --help `

## Sample commands

To list based on regexp in a “shared” pool of servers ` devnest --conf config.ini list -g shared "*my_node_0?" `

To list all i a “shared” pool of servers ` devnest --conf config.ini list -g shared `

To reserve node from “shared” pool for 4h (regex must match only 1 node) ` devnest --conf config.ini reserve -g shared -t 4 *my_node_03 `

To release reservation ` devnest --conf config.ini release *my_node_03 `

CHANGES

  • Enable packaging

  • User can select parseable type output

  • Default location for config file

  • Rename Jenkins to DevNest

  • Added extra metadata to easy login to the box

  • Rename jenkinsnodecli to devnest

  • Added vCPU capability

  • Introduced node capabilities

  • Changed column names in the output

  • Changed termnology for the node status

  • Add option to specify owner who reserved the node

  • Fixed issue where node was not in sync with description

  • Added options to manage node groups/labels

  • Changed CLI arguments and supporting functions to be more restrictive for standard user, e.g. one user can’t release box of another user

  • Added info for the better user experience

  • Fix improper call to Jenkins.node (performance)

  • Fixed function get_reservation_endtime_epoch

  • Added error when no argument is specified

  • Initial commit of Jenkins Node CLI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devnest-0.0.1.dev18.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

devnest-0.0.1.dev18-py2.py3-none-any.whl (20.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file devnest-0.0.1.dev18.tar.gz.

File metadata

File hashes

Hashes for devnest-0.0.1.dev18.tar.gz
Algorithm Hash digest
SHA256 2cfa1c401a976bd93460ef9bfcf645a3b7aa129a92d69906ee2d1e576929f317
MD5 d83c3184fb739374ee95c2d7a889a612
BLAKE2b-256 c37e644f57a7abcfe4a02bf50a9db43dac10c26fadd7b6f022dadb1743d0b625

See more details on using hashes here.

File details

Details for the file devnest-0.0.1.dev18-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for devnest-0.0.1.dev18-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b2192a96e321c840e5f176a91a80001925050aa8c0e026deede820090f50b6bf
MD5 e8f1c211b0fee749d13ff082aa3e266a
BLAKE2b-256 5f86c5184ca851fd72dcdd78e88e7511b6bfccbd8e6182ac0420e7834ee105b1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page