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/rhos-infra/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

  • add ‘distro’ and ‘selinux’ to setup_requires

  • latest changes and improvments (offline, post_xml)

  • Improve error handling

  • Lint fix in setup.py

  • Python3.8 deprecates platform.linux_distribution

  • add hostname to the devnest offline message

0.0.2

  • offline the slave after it’s been set up

  • offline the slave after it’s been set up

  • add support for ‘disconnect’ from Jenkins master cli command - lint fix

  • add support for ‘disconnect’ from Jenkins master cli command

0.0.1.dev49

  • Add IP address to the list column

  • Add dump config options

  • Add directory options to update multiply slaves at once

  • Ensure force reservation is only for not reserved nodes

  • Add force reserve without specific node

  • Add host to json output when reserving

  • Pep8 simple fix

  • If no regex is specified to match the host, reserve first available within group

  • Add json output to management command

  • Few tox fixes

  • Add python3 compability

  • Allow to extend node which is already reserved

  • Add option to force reserve node which is currently running CI job

  • Add new status for the node which isn’t idle

  • Allows loading params from environment variables

  • Use CrumbRequester instead of Requester

  • Ensure node is temporary offline before bringing it online

  • Ensure node is temp offline before marking it online

  • Add option to list nodes based on state

  • Updated links after moving devnest from private to rhos-infra repo

  • Fix linting

  • Fix parsing of json if one contains wrong quotes

  • Add functions to setup slave based on XML file

  • Fix function argument name

  • Added AUTHORS file

  • Added option to set reprovision pending state

  • Enhance groups in columns to be comma separated list

  • Updated options to be more user friendly

  • 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.3.dev9.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

devnest-0.0.3.dev9-py2.py3-none-any.whl (27.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file devnest-0.0.3.dev9.tar.gz.

File metadata

  • Download URL: devnest-0.0.3.dev9.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.23.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for devnest-0.0.3.dev9.tar.gz
Algorithm Hash digest
SHA256 eba8c382c19857960c97012e792ffa69dfe7176fede75c0011486bc3cf774974
MD5 39482250f48cae6bd3d8214b9527c8b6
BLAKE2b-256 5b23741c3b1e780ec3c4ce4e72bbad84eb2a16c473e41832b24cb61025c7bf5b

See more details on using hashes here.

File details

Details for the file devnest-0.0.3.dev9-py2.py3-none-any.whl.

File metadata

  • Download URL: devnest-0.0.3.dev9-py2.py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.23.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for devnest-0.0.3.dev9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eb70f0cfe5bdfd4b5562a58077b772389eb6e0b2e17f6283a7ea2da8faabf541
MD5 8a143e79001b2a6e6866580a2e174196
BLAKE2b-256 83df6f59bc5603f13724ab582221890d2db6bd21c37eebbe2bffc03a4f5e725f

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