An open API service indexing awesome lists of open source software.

https://github.com/hughperkins/nimbix-admin

utility scripts for start/stop/ssh to nimbix instances
https://github.com/hughperkins/nimbix-admin

Last synced: 7 months ago
JSON representation

utility scripts for start/stop/ssh to nimbix instances

Awesome Lists containing this project

README

          

# nimbix scripts

Use to start/stop nimbix instances, ssh to them, or simply run a single command on them, in batch mode

There's also a systray indicator, so you can see which instances are currently running.

## Contents

* interactive usage
* batch usage
* systray icon

## Interactive Usage

### start
```
./nimbix-launch --type ng0 --image foo
```
... for bitstream boost, and assuming you created an image called `foo`, or:
```
./nimbix-launch --type ngd3 --image foo2
```
... for dual Titan X instance, assuming you have an image called `foo2`

You can add image names and instance types to the config file (see below), if you want, so that you can
give a default type for each image. Then, you just need to specify the image name on the commandline, and
it will choose the instance type from the config file for you.

### ssh

eg if you want to connect to an instance created from an image called `foo`, do:
```
./nimbix-ssh --image foo
```
This assumes you have added your ssh publickey to your nimbix account

Note that this turns off hostkey checking. You may or may not want to do this (risk of man-in-middle attacks)

### shutdown

eg if you want to shut down an instance running from an image called `foo`, do:
```
./nimbix-shutdown --image foo
```

## Batch Usage

(doc in progress)

### run.py - run a single command, then exit

eg, to run `hostname`, on instance type `ng0`, using an image called `s1`:
```
./nimbix-run --type ng0 --image s1 hostname
```

Output:
```
command ['hostname']
jobnumber 66999
Opening Vault...
Initializing NAE...
CPU cores count: 2
CPU thread count: 2
passwd: password expiry information changed.
passwd: password expiry information changed.
Starting NAE...
Initializing networking...
NAE started in 1 second(s).

JARVICE
wall time 00:00:08
```

### script.py - run a single batch script, then exit

copies the named script to your `/data` folder, then runs it, and shows the output

eg:
```
cat >/tmp/test.sh</dev/null 2>&1 &
python ubuntuindicator.py --configfile $scriptdir/pers/foo.yaml --iconfile $scriptdir/pers/icon/foo.png >/dev/null 2>&1 &
```

## prerequisites / setup

- have python 3 installed (probably runs on python 2, but not tested)
- create a virtualenv, activate it, and run:
```
pip install -r requirements.txt
```
- copy `nimbix.yaml.templ` to `nimbix.yaml` and customize it with your username and nimbix apikey