Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rhos-infra/devnest
https://github.com/rhos-infra/devnest
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rhos-infra/devnest
- Owner: rhos-infra
- License: apache-2.0
- Created: 2017-11-24T08:07:11.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-08T18:35:36.000Z (8 months ago)
- Last Synced: 2024-11-11T21:55:41.200Z (about 2 months ago)
- Language: Python
- Size: 103 KB
- Stars: 2
- Watchers: 6
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
README
# 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
```